From: Anthony Liguori <anthony@codemonkey.ws>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: "François Revol" <revol@free.fr>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown
Date: Mon, 15 Mar 2010 11:29:13 -0500 [thread overview]
Message-ID: <4B9E6059.3040400@codemonkey.ws> (raw)
In-Reply-To: <20100315155526.GV26239@redhat.com>
On 03/15/2010 10:55 AM, Daniel P. Berrange wrote:
> On Mon, Mar 15, 2010 at 04:01:27PM +0100, Fran?ois Revol wrote:
>
>> Hello,
>> while working on a demonstrator for a green-IT project, to show
>> scheduled machine shutdown and powering depending on various
>> conditions, I wondered if I could use QEMU with wake-on-lan
>> transparently, but it seems it's not implemented at all.
>>
>> I though I could try to add support for it, and with -S it theorically
>> should be doable at least for the first boot, but the network packets
>> do not go much further until the NIC is actually initialized, as most
>> network layers use qemu_can_send_packet() which returns 0 if the
>> machine is stopped.
>> Hacking this function to return 1 seems to push the packet upward, but
>> I couldn't find a single point where I could check for WOL packets,
>> different -net subsystems using different code paths.
>>
>> Also, it seems -no-shutdown doesn't actually "stop the emulation" as
>> said in the manual, it actually keeps the vm running (and using cpu),
>> despite the OS trying to shutdown via ACPI. At least I tested so with
>> Haiku (and acpi=true in kernel config), which properly exits QEMU
>> without -no-shutdown.
>>
> Hmm, I think -no-shutdown should at least stop the CPUs executing. It is
> not really useful on its own though. The app managing QEMU would want to
> use the new JSON based monitor to listen for the SHUTDOWN event to be
> emitted, so it can detect the shutdown completing& then take action it
> wants either reset the guest, or kill QEMU, etc
>
The semantics of -no-shutdown are awful.
I'd personally prefer to see the option deprecated and a new set of
options introduced with clearer semantics.
Currently, -no-shutdown does too many things. It affects reboot
behaviour, shutdown behaviour, the behavior of the SDL close button.
Each of these things should be individual tunables.
Regards,
Anthony Liguori
> Daniel
>
next prev parent reply other threads:[~2010-03-15 16:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-15 15:01 [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown François Revol
2010-03-15 15:26 ` Paul Brook
2010-03-15 15:37 ` François Revol
2010-03-15 15:51 ` Anthony Liguori
2010-03-15 16:00 ` François Revol
2010-03-15 15:55 ` Daniel P. Berrange
2010-03-15 16:29 ` Anthony Liguori [this message]
2010-03-15 16:36 ` François Revol
2010-03-16 17:28 ` Jamie Lokier
2010-03-16 17:44 ` Daniel P. Berrange
2010-03-16 18:22 ` François Revol
2010-03-16 13:53 ` Luiz Capitulino
2010-03-16 14:26 ` François Revol
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B9E6059.3040400@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=revol@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).