LXC Tips

 

 

 


Kill hang container

 

hang 的情況

lxc-start -n sshgw -F

output & hang

lxc-start: utils.c: safe_mount: 1653 Invalid argument
     - Failed to mount /sys/kernel/debug onto /usr/lib/x86_64-linux-gnu/lxc/sys/kernel/debug

kill it

ps aux | grep lxc-start

kill -9 ??


Cleaning up LXC cgroups (remove orphaned cgroups)

 

# U16

manually removing all the child cgroups underneath /sys/fs/cgroup/*/lxc/<container>

find /sys/fs/cgroup/*/lxc/sshgw/ -type d | tac | xargs rmdir