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

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


Reply via email to