diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-11-01 08:00:46 +0000 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-11-01 08:00:46 +0000 |
| commit | 70d24aaa020ecc7fc31db135539b4f670a613f89 (patch) | |
| tree | 0a4e586624a758a9d5690e49e4441c012cbb49ef | |
| parent | 140b1c1a89431f28ee2401255e006d1f4f516af2 (diff) | |
| download | vyos-build-70d24aaa020ecc7fc31db135539b4f670a613f89.tar.gz vyos-build-70d24aaa020ecc7fc31db135539b4f670a613f89.zip | |
Testsuite: T3871: attach NICs to the root bus of the emulated machine
Pinning the NICs to fixed PCI slots assumed a root bus named pci.0, which
only i440fx provides. On q35, used by the Secure Boot test, and on the arm64
virt machine it is pcie.0, so QEMU refused to start.
Pick the bus name from the machine type.
| -rwxr-xr-x | scripts/check-qemu-install | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index f710158b..425dd616 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -290,6 +290,9 @@ def get_qemu_cmd(name, enable_uefi, disk_img, raid=None, iso_img=None, tpm=False # Changing UEFI settings require a display vga = '-vga virtio' + # Only i440fx calls its root bus pci.0 - q35 and arm64 virt use pcie.0 + pci_bus = 'pci.0' if machine == 'pc' else 'pcie.0' + cdrom = "" nested_cdrom = "" if iso_img: @@ -335,14 +338,14 @@ def get_qemu_cmd(name, enable_uefi, disk_img, raid=None, iso_img=None, tpm=False -uuid {uuid} \ {enable_kvm} \ -monitor unix:/tmp/qemu-monitor-socket-{disk_img},server,nowait \ - -netdev user,id=n0,net=192.0.2.0/24,dhcpstart=192.0.2.101,dns=192.0.2.10 -device {nic_model},id=nic0,netdev=n0,mac={macbase}:00,romfile="",bus=pci.0,addr=0x4{nic_opts} \ - -netdev user,id=n1 -device {nic_model},id=nic1,netdev=n1,mac={macbase}:01,romfile="",bus=pci.0,addr=0x5{nic_opts} \ - -netdev user,id=n2 -device {nic_model},id=nic2,netdev=n2,mac={macbase}:02,romfile="",bus=pci.0,addr=0x6{nic_opts} \ - -netdev user,id=n3 -device {nic_model},id=nic3,netdev=n3,mac={macbase}:03,romfile="",bus=pci.0,addr=0x7{nic_opts} \ - -netdev user,id=n4 -device e1000e,id=nic4,netdev=n4,mac={macbase}:04,romfile="",bus=pci.0,addr=0xa \ - -netdev user,id=n5 -device e1000e,id=nic5,netdev=n5,mac={macbase}:05,romfile="",bus=pci.0,addr=0xb \ - -netdev user,id=n6 -device vmxnet3,id=nic6,netdev=n6,mac={macbase}:06,romfile="",bus=pci.0,addr=0xe \ - -netdev user,id=n7 -device vmxnet3,id=nic7,netdev=n7,mac={macbase}:07,romfile="",bus=pci.0,addr=0xf \ + -netdev user,id=n0,net=192.0.2.0/24,dhcpstart=192.0.2.101,dns=192.0.2.10 -device {nic_model},id=nic0,netdev=n0,mac={macbase}:00,romfile="",bus={pci_bus},addr=0x4{nic_opts} \ + -netdev user,id=n1 -device {nic_model},id=nic1,netdev=n1,mac={macbase}:01,romfile="",bus={pci_bus},addr=0x5{nic_opts} \ + -netdev user,id=n2 -device {nic_model},id=nic2,netdev=n2,mac={macbase}:02,romfile="",bus={pci_bus},addr=0x6{nic_opts} \ + -netdev user,id=n3 -device {nic_model},id=nic3,netdev=n3,mac={macbase}:03,romfile="",bus={pci_bus},addr=0x7{nic_opts} \ + -netdev user,id=n4 -device e1000e,id=nic4,netdev=n4,mac={macbase}:04,romfile="",bus={pci_bus},addr=0xa \ + -netdev user,id=n5 -device e1000e,id=nic5,netdev=n5,mac={macbase}:05,romfile="",bus={pci_bus},addr=0xb \ + -netdev user,id=n6 -device vmxnet3,id=nic6,netdev=n6,mac={macbase}:06,romfile="",bus={pci_bus},addr=0xe \ + -netdev user,id=n7 -device vmxnet3,id=nic7,netdev=n7,mac={macbase}:07,romfile="",bus={pci_bus},addr=0xf \ -device virtio-scsi-pci,id=scsi0 \ {cdrom}{nested_cdrom} \ -drive format={disk_format},file={disk_img},if=none,media=disk,id=drive-hd1,readonly=off \ |
