From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSSBV-0002uI-Jb for qemu-devel@nongnu.org; Wed, 06 Jan 2010 04:28:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSSBQ-0002pN-Ik for qemu-devel@nongnu.org; Wed, 06 Jan 2010 04:28:08 -0500 Received: from [199.232.76.173] (port=41476 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSSBQ-0002pE-F9 for qemu-devel@nongnu.org; Wed, 06 Jan 2010 04:28:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35302) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSSBQ-0000up-0J for qemu-devel@nongnu.org; Wed, 06 Jan 2010 04:28:04 -0500 Message-ID: <4B445798.7040401@redhat.com> Date: Wed, 06 Jan 2010 10:27:52 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] [virtio] Add virtio block device sanboot support References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: gpxe@etherboot.org, qemu-devel@nongnu.org On 01/05/10 21:46, Stefan Hajnoczi wrote: > This patch adds virtio block device support alongside the existing iSCSI, > ATA-over-Ethernet, and ramdisk block devices. The virtio block device provides > storage in virtualized environments. > > Using this patch, a gPXE option ROM can boot a QEMU/KVM virtual machine > directly from a virtio block device. Great. > Here is an example QEMU invocation: > qemu -drive if=virtio,file=debian.qcow2 -option-rom gpxe/src/bin/1af41001.rom > Perhaps the first available device should be chosen if virtio_blk: is given > without PCI bus, device, and function. I am open to suggestions on how virtio > block device option ROMs should work. Clear answer: as PCI ROM. Try this (requires qemu 0.12): qemu -drive if=none,id=boot,file=debian.qcow2 \ -device virtio-blk-pci,drive=boot,romfile=gpxe/src/bin/1af41001.rom You should end up with a virtio-blk device with a pci rom bar holding the option rom. seabios should load and run the rom. The disk should appear in the boot menu (enabled by '-boot menu=on'). cheers, Gerd