Bug 811227 - RFE: Ability to specify custom BIOS for QEMU/KVM using <loader> XML (for WHQL testing)
Summary: RFE: Ability to specify custom BIOS for QEMU/KVM using <loader> XML (for WHQL...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 811235
TreeView+ depends on / blocked
 
Reported: 2012-04-10 13:32 UTC by Daniel Berrangé
Modified: 2012-07-05 15:55 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.9.10-11.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:52:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Daniel Berrangé 2012-04-10 13:32:22 UTC
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:

Comment 1 Daniel Berrangé 2012-04-10 14:03:52 UTC
Upstream patch:

https://www.redhat.com/archives/libvir-list/2012-April/msg00399.html

Comment 5 hongming 2012-04-12 10:12:43 UTC
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.

Comment 7 errata-xmlrpc 2012-06-20 06:52:59 UTC
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

Comment 8 Laszlo Ersek 2012-07-05 14:53:47 UTC
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 Berrangé 2012-07-05 14:58:47 UTC
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.

Comment 10 Paolo Bonzini 2012-07-05 14:59:29 UTC
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 15:55:44 UTC
Thanks, that worked. Sorry for the noise.


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