You are not logged in.
Whenever I am issueing `lxc-stop` command the containers do not shutdown. It seems lxc-stop command does nothing. I have looked in multiple Wiki articles (LXC, LXC-Systemd, LXC Containers) on Archwiki but there was no solution for this which worked. My container configuration is as following:
# Template used to create this container: /usr/share/lxc/templates/lxc-archlinux
# Parameters passed to the template:
# For additional config options, please look at lxc.conf(5)
lxc.utsname=ws01
lxc.autodev=1
lxc.tty=1
lxc.pts=1024
lxc.mount=/var/lib/lxc/ws01/fstab
lxc.cap.drop=sys_module mac_admin mac_override sys_time
lxc.kmsg=0
lxc.stopsignal=SIGRTMIN+4
#networking
lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up
lxc.network.name=eth0
lxc.network.mtu=1500
#cgroups
lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = c *:* m
lxc.cgroup.devices.allow = b *:* m
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
lxc.cgroup.devices.allow = c 1:7 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.rootfs = /var/lib/lxc/ws01/rootfs
Whenever I issue lxc-stop -n ws01 command it just waits for 60secods and then forces the shutdown. Is there a fix for this to make lxc-stop work on Archlinux containers?
Last edited by wrm (2014-05-03 15:32:48)
knowledge is p0wer..
Offline
Solution:
# ln -s /usr/lib/systemd/system/poweroff.target /var/lib/lxc/<CONTAINER>/rootfs/etc/systemd/system/sigpwr.target
You can also run this inside container instead:
# ln -s /usr/lib/systemd/system/poweroff.target /etc/systemd/system/sigpwr.target
Last edited by wrm (2014-05-03 17:18:38)
knowledge is p0wer..
Offline