Hide Forgot
Description of problem: Failed to shutdown lxc guest Version-Release number of selected component (if applicable): libvirt-0.9.1-1.el6.x86_64 kernel-2.6.32-131.0.15.el6.x86_64 qemu-kvm-0.12.1.2-2.162.el6.x86_64 How reproducible: 3/3 Steps to Reproduce: 1. virsh # define vm1.xml Domain fedora-rawhide defined from vm1.xml 2. virsh # start fedora-rawhide Domain fedora-rawhide started virsh # list --all Id Name State ---------------------------------- 28251 fedora-rawhide running 3. virsh # shutdown fedora-rawhide error: Failed to shutdown domain fedora-rawhide error: this function is not supported by the connection driver: virDomainShutdown virsh # list --all Id Name State ---------------------------------- 28251 fedora-rawhide running 4. virsh # destroy fedora-rawhide Domain fedora-rawhide destroyed virsh # list --all Id Name State ---------------------------------- - fedora-rawhide shut off Actual results: In step3, failed to shutdown the guest while can destroy the guest Expected results: Should be able to shutdown the lxc guest as before Additional info: It is a regression bug
LXC driver has never supported domain shutdown, so this shouldn't be a regression.
Added upstream by: commit cbb106f807b32f1f6af22d1e92fe0ff9ba6d73b3 Author: Daniel P. Berrange <berrange> AuthorDate: 2012-11-28 13:26:52 +0000 Commit: Daniel P. Berrange <berrange> CommitDate: 2012-11-30 19:20:14 +0000 Add support for shutdown / reboot APIs in LXC driver Add support for doing controlled shutdown / reboot in the LXC driver. The default behaviour is to try talking to /dev/initctl inside the container's virtual root (/proc/$INITPID/root). This works with sysvinit or systemd. If that file does not exist then send SIGTERM (for shutdown) or SIGHUP (for reboot). These signals are not any kind of particular standard for shutdown or reboot, just something apps can choose to handle. The new virDomainSendProcessSignal allows for sending custom signals. We might allow the choice of SIGTERM/HUP to be configured for LXC containers via the XML in the future. Signed-off-by: Daniel P. Berrange <berrange> git describe: v1.0.0-204-gcbb106f contains: v1.0.1-rc1~113