From d6612564dbb569c8b702d068a495f772e470e3b0 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 9 Apr 2024 09:17:21 +0200 Subject: [PATCH] put cirrus-vga on a high PCI slot, so it doesn't clash VGA cards get PCI slot 2 by default from QEMU [1], however, as we actually disable graphics (so that we don't race for an VNC port), QEMU thinks it's smart and also gives slot 2 to the storage controller, leading to: Call to virDomainCreateWithFlags failed: internal error: QEMU unexpectedly closed the monitor (vm='forklift_debian11'): qemu-system-x86_64: -device {"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"libvirt-1-format","id":"ua-box-volume-0","bootindex":1,"write-cache":"on"}: PCI: slot 2 function 0 not available for virtio-blk-pci, in use by cirrus-vga,id=video0 (Libvirt::Error) Let's be smarter than QEMU and plug our unused video card (that is needed for [2]) into slot 9 instead. [1] https://libvirt.org/pci-addresses.html [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021298 --- playbooks/setup_forklift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/setup_forklift.yml b/playbooks/setup_forklift.yml index d5b0687c7..e80b718a5 100644 --- a/playbooks/setup_forklift.yml +++ b/playbooks/setup_forklift.yml @@ -22,7 +22,7 @@ graphics_type: none qemu_args: - :value: '-device' - - :value: 'cirrus-vga,id=video0' + - :value: 'cirrus-vga,id=video0,bus=pci.0,addr=0x9' boxes: exclude: - '^[^p]'