Bug 811227 - RFE: Ability to specify custom BIOS for QEMU/KVM using <loader> XML (for WHQL testing)
RFE: Ability to specify custom BIOS for QEMU/KVM using <loader> XML (for WHQL...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
: FutureFeature
Depends On:
Blocks: 811235
  Show dependency treegraph
Reported: 2012-04-10 09:32 EDT by Daniel Berrange
Modified: 2012-07-05 11:55 EDT (History)
9 users (show)

See Also:
Fixed In Version: libvirt-0.9.10-11.el6
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 02:52:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2012-04-10 09:32:22 EDT
Description of problem:
For WHQL testing we need the ability to specify an alternative BIOS impl to QEMU. Libvirt already has XML for doing this (<loader>) but this is not wired up for QEMU.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. virsh edit GUESTNAME
2. Add <loader>/usr/share/seabios/bios-s3.bin</loader>
3. virsh start GUESTNAME
4. ps -axuf | grep -- -bios 
Actual results:
No process shown

Expected results:
Process shown using the -bios command line arg

Additional info:
Comment 1 Daniel Berrange 2012-04-10 10:03:52 EDT
Upstream patch:

Comment 5 hongming 2012-04-12 06:12:43 EDT
Verify using 

1.virsh edit guest.
2.Add <loader>/usr/share/seabios/bios.bin</loader> under <os> element.
3.virsh start guest.
4.# ps -ef |grep -- -bios 

qemu     28666     1 30 18:07 ?        00:00:07 /usr/libexec/qemu-kvm -S -M rhel6.3.0 -enable-kvm -bios /usr/share/seabios/bios.bin -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name win7virtio -uuid ef2f06e7-5b95-ca45-e475-7e64a6c80cab -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win7virtio.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/win7-64-virtio.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=26,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:f8:57:6b,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc -vga std -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

So move its status to verified.
Comment 7 errata-xmlrpc 2012-06-20 02:52:59 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

Comment 8 Laszlo Ersek 2012-07-05 10:53:47 EDT
OVMF requires overriding two files,

  bios.bin -> /root/OVMF.fd
  vgabios-cirrus.bin -> /root/OvmfVideo.rom

This patch makes the first override available via libvirt, but the second override is apparently not even supported by upstream qemu. It seems to hardwire VGABIOS_CIRRUS_FILENAME. Perhaps we should introduce a -vgabios command line parameter that overrides "romfile" for whichever -vga is selected.
Comment 9 Daniel Berrange 2012-07-05 10:58:47 EDT
First off all this bug is closed, so please don't use this for making further requests. Open a new bug to track whatever problems you still have.

Secondly, I don't think what you say about QEMU is correct. Every PCI device in QEMU has a 'romfile' option available these days:

$ qemu-kvm  -device cirrus-vga,?

Libvirt supports this against any device too, using

  <rom file="/some/path"/>

but unfortunatelty the QEMU driver is only processing this for <inteface> and <hostdev> devices currently. We ought to be able to wire this up for <video> devices too.
Comment 10 Paolo Bonzini 2012-07-05 10:59:29 EDT
You can embed the video driver in the main ROM: http://lists.xen.org/archives/html/xen-devel/2012-03/msg01992.html
Comment 11 Laszlo Ersek 2012-07-05 11:55:44 EDT
Thanks, that worked. Sorry for the noise.

Note You need to log in before you can comment on or make changes to this bug.