mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 15:45:28 +00:00
3801831cdf
This patch addresses: https://bugzilla.redhat.com/show_bug.cgi?id=781562 Along with the "rombar" option that controls whether or not a boot rom is made visible to the guest, qemu also has a "romfile" option that allows specifying a binary file to present as the ROM BIOS of any emulated or passthrough PCI device. This patch adds support for specifying romfile to both passthrough PCI devices, and emulated network devices that attach to the guest's PCI bus (just about everything other than ne2k_isa). One example of the usefulness of this option is described in the bugzilla report: 82576 sriov network adapters don't provide a ROM BIOS for the cards virtual functions (VF), but an image of such a ROM is available, and with this ROM visible to the guest, it can PXE boot. In libvirt's xml, the new option is configured like this: <hostdev> ... <rom file='/etc/fake/boot.bin'/> ... </hostdev (similarly for <interface>).
48 lines
1.4 KiB
XML
48 lines
1.4 KiB
XML
<domain type='qemu'>
|
|
<name>QEMUGuest2</name>
|
|
<uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
|
|
<memory>219100</memory>
|
|
<currentMemory>219100</currentMemory>
|
|
<vcpu>1</vcpu>
|
|
<os>
|
|
<type arch='i686' machine='pc'>hvm</type>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu</emulator>
|
|
<disk type='block' device='disk'>
|
|
<source dev='/dev/HostVG/QEMUGuest2'/>
|
|
<target dev='hda' bus='ide'/>
|
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
|
</disk>
|
|
<controller type='ide' index='0'/>
|
|
<interface type='user'>
|
|
<mac address='52:54:00:24:a5:9f'/>
|
|
<model type='virtio'/>
|
|
<rom bar='on'/>
|
|
</interface>
|
|
<interface type='user'>
|
|
<mac address='52:54:00:24:a5:9e'/>
|
|
<model type='virtio'/>
|
|
<rom file='/etc/fake/bootrom.bin'/>
|
|
</interface>
|
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
|
<source>
|
|
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
|
|
</source>
|
|
<rom bar='off'/>
|
|
</hostdev>
|
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
|
<source>
|
|
<address domain='0x0000' bus='0x06' slot='0x12' function='0x6'/>
|
|
</source>
|
|
<rom bar='on' file='/etc/fake/bootrom.bin'/>
|
|
</hostdev>
|
|
<memballoon model='virtio'/>
|
|
</devices>
|
|
</domain>
|