kubevirt/fix-virsh-domcapabilities-error.patch

28 lines
1.3 KiB
Diff
Raw Normal View History

Fix 'virsh domcapabilities' error
Calling `virsh domcapabilities ...` produces an error with some older
versions of libvirt:
error: failed to get emulator capabilities
error: invalid argument: unable to find any emulator to serve 'x86_64' architecture
The issue seems fixed if `virsh capabilites` is run first.
diff --git a/cmd/virt-launcher/node-labeller/node-labeller.sh b/cmd/virt-launcher/node-labeller/node-labeller.sh
index 8ea181963..55a920bdd 100755
--- a/cmd/virt-launcher/node-labeller/node-labeller.sh
+++ b/cmd/virt-launcher/node-labeller/node-labeller.sh
@@ -13,8 +13,10 @@ chmod o+rw /dev/kvm
libvirtd -d
+virsh capabilities > /dev/null
+
virsh domcapabilities --machine q35 --arch x86_64 --virttype kvm > /var/lib/kubevirt-node-labeller/virsh_domcapabilities.xml
cp -r /usr/share/libvirt/cpu_map /var/lib/kubevirt-node-labeller
-virsh domcapabilities --machine q35 --arch x86_64 --virttype kvm | virsh hypervisor-cpu-baseline --features /dev/stdin --machine q35 --arch x86_64 --virttype kvm > /var/lib/kubevirt-node-labeller/supported_features.xml
\ No newline at end of file
+virsh domcapabilities --machine q35 --arch x86_64 --virttype kvm | virsh hypervisor-cpu-baseline --features /dev/stdin --machine q35 --arch x86_64 --virttype kvm > /var/lib/kubevirt-node-labeller/supported_features.xml