public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* How to send ACPI events to kvm guests
@ 2008-12-08 15:03 Christian Roessner
  2008-12-08 15:12 ` Daniel P. Berrange
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Roessner @ 2008-12-08 15:03 UTC (permalink / raw)
  To: kvm

Hi,

first of all I am not sure, if this is the right place for my question,
so if not, please speak friendly :-)

I use kvm-72 directly over the command line, because I use vde, which is
not enabled in Ubuntu intrepid & co in package libvirt-bin.

Anything is doing really fine, but I can not find out on how to send
ACPI-events to a guest, i.e. power-button.

The libvirt tool seems to be able to do the trick. So what command does
virsh, whatever invoke to send the event?

A friend and I have spend hours and hours with Google, tried to study
the source-code of kvm and libvirt, but could not find the answer.

I want to write s simple init-script for the kvm instances, so I really
would like a clean solution. A bad hack would be ssh guest "shutdown -h
now", but I would prefer the ACPI version, if possible.

So, I hope, somebody may help me with this question.

Thanks alot. I really like kvm.

Kind regards
Christian

-- 
Roessner Network Solutions (R.N.S.)
Licher Str. 19a, 35394 Gießen
Telefon: +49 641 5879091, Mobil: +49 176 78168371
USt-IdNr.: DE225643613

URL: http://www.roessner-net.com/
PGP: http://www.roessner-net.com/0x6B929997.asc

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to send ACPI events to kvm guests
  2008-12-08 15:03 How to send ACPI events to kvm guests Christian Roessner
@ 2008-12-08 15:12 ` Daniel P. Berrange
  2008-12-08 18:53   ` Christian Roessner
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2008-12-08 15:12 UTC (permalink / raw)
  To: Christian Roessner; +Cc: kvm

On Mon, Dec 08, 2008 at 04:03:43PM +0100, Christian Roessner wrote:
> Hi,
> 
> first of all I am not sure, if this is the right place for my question,
> so if not, please speak friendly :-)
> 
> I use kvm-72 directly over the command line, because I use vde, which is
> not enabled in Ubuntu intrepid & co in package libvirt-bin.
> 
> Anything is doing really fine, but I can not find out on how to send
> ACPI-events to a guest, i.e. power-button.
> 
> The libvirt tool seems to be able to do the trick. So what command does
> virsh, whatever invoke to send the event?

The  virsh shutdown command / virDomainShutdown() API will use the
QEMU monitor console to invoke 'system_powerdown' command. This
then triggers the ACPI event.

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 :|

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to send ACPI events to kvm guests
  2008-12-08 15:12 ` Daniel P. Berrange
@ 2008-12-08 18:53   ` Christian Roessner
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Roessner @ 2008-12-08 18:53 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: kvm

Hi Daniel,

thanks alot. I got my scripts running :-)

Kind regards
Christian

> The  virsh shutdown command / virDomainShutdown() API will use the
> QEMU monitor console to invoke 'system_powerdown' command. This
> then triggers the ACPI event.
> 
> Daniel


-- 
Roessner Network Solutions (R.N.S.)
Licher Str. 19a, 35394 Gießen
Telefon: +49 641 5879091, Mobil: +49 176 78168371
USt-IdNr.: DE225643613

URL: http://www.roessner-net.com/
PGP: http://www.roessner-net.com/0x6B929997.asc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-08 18:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-08 15:03 How to send ACPI events to kvm guests Christian Roessner
2008-12-08 15:12 ` Daniel P. Berrange
2008-12-08 18:53   ` Christian Roessner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox