[libvirt] How does virt-manager send shutdown?

How does virt-manager send shutdown to guests? Does it depend on if you are running kvm or xen? I have been building images with acpid enabled and acpi=force on the command line. After upgrading to f9 and running kvm my images no longer respond to shutdown. Is there a tweak which I have missed? - bk

Bryan Kearney wrote:
How does virt-manager send shutdown to guests? Does it depend on if you are running kvm or xen? I have been building images with acpid enabled and acpi=force on the command line. After upgrading to f9 and running kvm my images no longer respond to shutdown. Is there a tweak which I have missed?
- bk
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Hi Bryan,
What version of KVM does this now mean you are running? Rgds, Henri

Henri Cook wrote:
Bryan Kearney wrote:
How does virt-manager send shutdown to guests? Does it depend on if you are running kvm or xen? I have been building images with acpid enabled and acpi=force on the command line. After upgrading to f9 and running kvm my images no longer respond to shutdown. Is there a tweak which I have missed?
- bk
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Hi Bryan,
What version of KVM does this now mean you are running?
Should have included this: [bkearney@localhost bin]$ rpm -qa | grep kvm kvm-65-7.fc9.i386 [bkearney@localhost bin]$ uname -a Linux localhost.localdomain 2.6.25.11-97.fc9.i686 #1 SMP Mon Jul 21 01:31:09 EDT 2008 i686 i686 i386 GNU/Linux [bkearney@localhost bin]$ -- bk

On Fri, Aug 01, 2008 at 01:22:43PM -0400, Bryan Kearney wrote:
How does virt-manager send shutdown to guests? Does it depend on if you are running kvm or xen? I have been building images with acpid enabled and acpi=force on the command line. After upgrading to f9 and running kvm my images no longer respond to shutdown. Is there a tweak which I have missed?
virt-manager just invokes the shutdown API in libvirt, which has different impls depending on the underlying hypervisor. In KVM case it invokes the QEMU 'system_shutdown' command, which then triggers an ACPI power button event in the guest. You need to make sure your guest has the <acpi/> feature enabled in its XML config of course, and that the kernel has activated ACPI (may need the acpi=force param), and that acpid is running. IIRC certainly KVM versions have a bug wrt this causing it not to work Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Daniel P. Berrange wrote:
On Fri, Aug 01, 2008 at 01:22:43PM -0400, Bryan Kearney wrote:
How does virt-manager send shutdown to guests? Does it depend on if you are running kvm or xen? I have been building images with acpid enabled and acpi=force on the command line. After upgrading to f9 and running kvm my images no longer respond to shutdown. Is there a tweak which I have missed?
virt-manager just invokes the shutdown API in libvirt, which has different impls depending on the underlying hypervisor. In KVM case it invokes the QEMU 'system_shutdown' command, which then triggers an ACPI power button event in the guest. You need to make sure your guest has the <acpi/> feature enabled in its XML config of course, and that the kernel has activated ACPI (may need the acpi=force param), and that acpid is running. IIRC certainly KVM versions have a bug wrt this causing it not to work
Daniel
I added the following to my xml <features> <feature> <acpi/> </feature> </features> and had acpi=force on my kernel line.. still no luck. I looked for bugs in bugzilla.redhat... saw none for kvm with acpi. Is there another to bug tool to look at? -- bk

Bryan Kearney wrote:
Daniel P. Berrange wrote:
On Fri, Aug 01, 2008 at 01:22:43PM -0400, Bryan Kearney wrote:
How does virt-manager send shutdown to guests? Does it depend on if you are running kvm or xen? I have been building images with acpid enabled and acpi=force on the command line. After upgrading to f9 and running kvm my images no longer respond to shutdown. Is there a tweak which I have missed?
virt-manager just invokes the shutdown API in libvirt, which has different impls depending on the underlying hypervisor. In KVM case it invokes the QEMU 'system_shutdown' command, which then triggers an ACPI power button event in the guest. You need to make sure your guest has the <acpi/> feature enabled in its XML config of course, and that the kernel has activated ACPI (may need the acpi=force param), and that acpid is running. IIRC certainly KVM versions have a bug wrt this causing it not to work
Daniel
I added the following to my xml
<features> <feature> <acpi/> </feature> </features>
One follow up question. Any reason that this should _not_ be the default set up by the appliance-creator?

Bryan Kearney wrote:
I added the following to my xml
<features> <feature> <acpi/> </feature> </features>
One follow up question. Any reason that this should _not_ be the default set up by the appliance-creator?
Generally, modern OS's won't work very well if you disable acpi. The ability to shut it off is generally used for compatibility with older OS's, although there are other reasons to occasionally use it (you could workaround the recent KVM time drift problems by shutting off ACPI, for example). So you should always enable acpi unless you have a good reason not to. Chris Lalancette

Chris Lalancette wrote:
Bryan Kearney wrote:
I added the following to my xml
<features> <feature> <acpi/> </feature> </features>
One follow up question. Any reason that this should _not_ be the default set up by the appliance-creator?
Generally, modern OS's won't work very well if you disable acpi. The ability to shut it off is generally used for compatibility with older OS's, although there are other reasons to occasionally use it (you could workaround the recent KVM time drift problems by shutting off ACPI, for example).
So you should always enable acpi unless you have a good reason not to.
ok.. thanks. Huff... can you put this into the appliance creator as the default? --bk

On Mon, Aug 04, 2008 at 09:05:07AM -0400, Bryan Kearney wrote:
I added the following to my xml
<features> <feature> <acpi/> </feature> </features>
and had acpi=force on my kernel line.. still no luck. I looked for bugs in bugzilla.redhat... saw none for kvm with acpi. Is there another to bug tool to look at? You can check if the acpi interrupt got dilivered in /proc/interrupts. If so your OS doesn't handle it (e.g. missing acpi tools), if it didn't get delivered there's probably something broken with kvm. -- Guido
participants (5)
-
Bryan Kearney
-
Chris Lalancette
-
Daniel P. Berrange
-
Guido Günther
-
Henri Cook