From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrBnS-0005ny-Jr for qemu-devel@nongnu.org; Mon, 15 Mar 2010 11:01:34 -0400 Received: from [199.232.76.173] (port=45706 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrBnS-0005nq-3c for qemu-devel@nongnu.org; Mon, 15 Mar 2010 11:01:34 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NrBnQ-0004IJ-Ky for qemu-devel@nongnu.org; Mon, 15 Mar 2010 11:01:33 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:51286) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NrBnP-0004IB-TU for qemu-devel@nongnu.org; Mon, 15 Mar 2010 11:01:32 -0400 Received: from smtp2-g21.free.fr (localhost [127.0.0.1]) by smtp2-g21.free.fr (Postfix) with ESMTP id 86AE34B0093 for ; Mon, 15 Mar 2010 16:01:26 +0100 (CET) Received: from laptop (vaf26-2-82-244-111-82.fbx.proxad.net [82.244.111.82]) by smtp2-g21.free.fr (Postfix) with ESMTP id 961A74B000F for ; Mon, 15 Mar 2010 16:01:24 +0100 (CET) From: "=?utf-8?q?Fran=C3=A7ois?= Revol" Date: Mon, 15 Mar 2010 16:01:27 +0100 CET Message-Id: <2378452091-BeMail@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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=5Fcan=5Fsend=5Fpacket() 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=3Dtrue in kernel config), which properly exits QEMU without -no-shutdown. Ideally this would evolve into supporting IPMI, which would allow managing VMs exactly like physical servers without concern, appart launching the actual process first. cf. http://en.wikipedia.org/wiki/Intelligent=5FPlatform=5FManagement=5FInterface http://openipmi.sourceforge.net/ Anyone interested in this =3F Anyone tried already =3F Fran=C3=A7ois.