I have containerised my old centos6 physical machine by rsyncing into
an empty container and fixing the uids and so far so good, except lxc
stop doesn't work, it simply does nothing, just hangs in there.
I have launched a centos6 image from images.linuxcontainers.org and
with it it works OK, but even after a few hours spent on this I
couldn't figure out what is it that the official image does
differently than my rsynced copy
how does lxc/lxd signal the container that it needs to shut down? How
does one debug this in general? Triex lxc stop --verbose --debug but
all i'm seeing are API requests going back and forth. tried running
lxd --debug but still nothing in the logs.
I've found some old README for configuring RedHat LXC containers:
# create an upstart handler for SIGPWR
cat <<EOF >/etc/init/power-status-changed.conf
# power-status-changed - shutdown on SIGPWR
start on power-status-changed
exec /sbin/shutdown -h now "SIGPWR received"
# for RHEL5: edit /etc/inittab to set
pf::powerfail:/sbin/shutdown -h now "Power Failure; System Shutting Down"
But I am not sure if this is applicable to CentOS 6.
Hope this helps