Red Hat Bugzilla – Bug 811227
RFE: Ability to specify custom BIOS for QEMU/KVM using <loader> XML (for WHQL testing)
Last modified: 2012-07-05 11:55:44 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): libvirt-0.9.10-10.el6 How reproducible: Always 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:
Upstream patch: https://www.redhat.com/archives/libvir-list/2012-April/msg00399.html
Verify using kernel-2.6.32-250.el6.x86_64 libvirt-0.9.10-11.el6.x86_64 qemu-kvm-0.12.1.2-2.270.el6.x86_64 Steps 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 127.0.0.1:3 -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.
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. http://rhn.redhat.com/errata/RHSA-2012-0748.html
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.
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,? cirrus-vga.addr=pci-devfn cirrus-vga.romfile=string cirrus-vga.rombar=uint32 cirrus-vga.multifunction=on/off cirrus-vga.command_serr_enable=on/off 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.
You can embed the video driver in the main ROM: http://lists.xen.org/archives/html/xen-devel/2012-03/msg01992.html
Thanks, that worked. Sorry for the noise.