From feac9b76e745f958ddc096a803586926b90eda20 Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Fri, 14 Sep 2018 22:02:24 -0500 Subject: [PATCH] qemu_vm: add net_dev_disable_option_rom In the obsense of romfile= or rombar=0, QEMU will load the iPXE option rom from the ipxe-roms-qemu package into the network device NIC's ROM BAR. In some cases you may need to disable the option rom loading. Signed-off-by: Brijesh Singh --- virttest/qemu_vm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py index af353ef1c0..9734f2f92e 100644 --- a/virttest/qemu_vm.py +++ b/virttest/qemu_vm.py @@ -627,6 +627,12 @@ def add_nic(devices, vlan, model=None, mac=None, device_id=None, if ctrl_mac_addr and ctrl_mac_addr in ["on", "off"]: dev.set_param('ctrl_mac_addr', ctrl_mac_addr) dev.set_param('mac', mac, dynamic=True) + + # passing romfile= tells QEMU to disable ROM entirely for + # this device + no_romfile = params.get("net_dev_disable_option_rom", None) + if no_romfile: + dev.set_param("romfile", "EMPTY_STRING") # only pci domain=0,bus=0,function=0 is supported for now. # # libvirt gains the pci_slot, free_pci_addr here,