KVM/Qemu Guest Shutdown problems
Solution 1
Check that acpid
is running inside the guests. If it isn't you need to install the acpid
package. This is what receives the ACPI power button signal from KVM and causes the guest to shut itself down.
Solution 2
For CentOS.6.3 this worked well:
# yum -y install acpid; /etc/init.d/acpid start; chkconfig --level 235 acpid on;
Comments
-
Gaia over 1 year
on both host and guest running CentOS 6.3 with KVM/Qemu virtualization, I have the following scenarios:
- "virsh shutdown kvm1" did not shutdown at all. virsh lists guest as running.
- "service libvirt-guests stop" did not shutdown in 280 seconds (shutdown_timeout=300. on_shutdown=shutdown)
- "shutdown now" from within guest, guest becomes unreachable. virsh lists guest as running, though it could not connect to it.
- "shutdown -h now" from within guest works.
- "shutdown -r now" from within guest works.
Libvirt logs show nothing for the first 3 scenarios. I can pause the guest fine.
Grub doesnt have acpi=off. ACPI was installed after the reply by @mgorven below. There is nothing on guest logs regarding ACPI aside from these entries from /var/log/messages. It is puzzling to me that there are entries regarding ACPI since it was not installed up until the last line of the log.
Bottom line, I cannot shutdown from outside the guest. What do I check to figure out what is going on?
-
Gaia over 11 years"virsh shutdown domain" did nothing with acpi installed on the guest domain.
-
Michael Hampton over 11 years@Gaia What on earth is an Atomic Rocket Turtle? I would always suspect strangeness in a niche distribution like that.
-
Gaia over 11 years@MichaelHampton, sorry I mean ASL by www.atomicorp.com (ART is their repo)
-
daff over 11 yearsHave you made sure the
acpid
daemon is actually running after installing the package? -
Gaia over 11 years@daffI did, I restarted the guest after installing the package and things work fine (virsh is able to shutdown). what I don't understand is all the ACPI messages in the log (see OP) before ACPI was installed, but that doesnt matter much...
-
cbliard almost 11 yearsNote for Debian users: if you disabled installation of Recommended packages, then
acpid
alone does not much because it only contains the binaries. You need to installacpi-support-base
package to handle power button ACPI events. For Ubuntu,acpid
contains both binaries and base event handlers and is sufficient.