[PATCH 0/5] netdev: Extract GenerateName/ReserveName as common functions
by Shi Lei
Extract ReserveName/GenerateName from netdevtap and netdevmacvlan as
common functions. Along with them, export Lock/Unlock functions
to protect these processes.
So tap, macvlan and veth can reuse them to simplify their
implementations.
Shi Lei (5):
netdev: Introduce several helper functions for generating unique netdev name
netdevtap: Use common helper function to create unique tap name
netdevmacvlan: Use helper function to create unique macvlan/macvtap name
netdev: Enable virNetDevGenerateName to support veth
netdevveth: Simplify virNetDevVethCreate by using virNetDevGenerateName
src/libvirt_private.syms | 4 +
src/lxc/lxc_process.c | 3 +
src/util/virnetdev.c | 142 +++++++++++++++++++++++++++++++++++
src/util/virnetdev.h | 36 +++++++++
src/util/virnetdevmacvlan.c | 107 ++++++--------------------
src/util/virnetdevmacvlan.h | 6 --
src/util/virnetdevtap.c | 58 +-------------
src/util/virnetdevveth.c | 146 ++++++++++--------------------------
8 files changed, 251 insertions(+), 251 deletions(-)
--
2.25.1
4 years
[PATCH v2] xen: recognize device_model_override
by Olaf Hering
Since Xen 4.2 libxl expects device_model_override="/path" instead of
device_model="/path". Adjust the code to parse this as <emulator>.
While libxl also recognizes device_model_version="", this knob is not
required for libvirt. A runtime detection exists in libvirt to select
either "qemu-xen" or "qemu-xen-traditional".
Since qemu-xen-traditional is marked as supported just for stubdoms
there is no need to handle it.
The tests were adjusted with this script:
for i in tests/xlconfigdata/*.cfg tests/xmconfigdata/*.cfg
do
case "$i" in
*basic-hvm*) continue ;;
*cpu-shares-hvm*) continue ;;
*max-eventchannels-hvm*) continue ;;
*max-gntframes-hvm*) continue ;;
*moredevs-hvm*) continue ;;
*variable-clock-hvm*) continue ;;
*vnuma-hvm*) continue ;;
esac
sed -i '
s@^device_model[[:blank:]]@device_model_override @
' "$i"
done
for i in tests/libxlxml2domconfigdata/*.json
do
case "$i" in
*basic-hvm*) continue ;;
*cpu-shares-hvm*) continue ;;
*max-eventchannels-hvm*) continue ;;
*max-gntframes-hvm*) continue ;;
*moredevs-hvm*) continue ;;
*variable-clock-hvm*) continue ;;
*vnuma-hvm*) continue ;;
esac
sed -i '
s@"device_model"@"device_model_override"@
' "$i"
done
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
src/libxl/xen_common.c | 4 ++--
tests/xlconfigdata/test-disk-positional-parms-full.cfg | 2 +-
tests/xlconfigdata/test-disk-positional-parms-partial.cfg | 2 +-
tests/xlconfigdata/test-disk-qed.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-acpi-slic.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-cpuid.cfg | 2 +-
.../test-fullvirt-direct-kernel-boot-bogus-extra.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-hpet-timer.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-multi-timer.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-multiserial.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-multiusb.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-nestedhvm.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-nohap.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-ovmf.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-ovswitch-tagged.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-ovswitch-trunked.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-pci.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-tsc-timer.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-type.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-vnuma-partialdist.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-vnuma.cfg | 2 +-
tests/xlconfigdata/test-net-fakemodel.cfg | 2 +-
tests/xlconfigdata/test-new-disk.cfg | 2 +-
tests/xlconfigdata/test-qemu-passthrough.cfg | 2 +-
tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 2 +-
tests/xlconfigdata/test-spice-features.cfg | 2 +-
tests/xlconfigdata/test-spice.cfg | 2 +-
tests/xlconfigdata/test-vif-multi-ip.cfg | 2 +-
tests/xlconfigdata/test-vif-rate.cfg | 2 +-
tests/xlconfigdata/test-vif-typename.cfg | 2 +-
tests/xmconfigdata/test-escape-paths.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-default-feature.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-localtime.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-nohap.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-file.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-null.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-sound.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-utc.cfg | 2 +-
tests/xmconfigdata/test-no-source-cdrom.cfg | 2 +-
tests/xmconfigdata/test-pci-dev-syntax.cfg | 2 +-
tests/xmconfigdata/test-pci-devs.cfg | 2 +-
61 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index c82e487d80..88a784ed04 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -1508,7 +1508,7 @@ xenParseConfigCommon(virConfPtr conf,
if (xenParseTimeOffset(conf, def) < 0)
return -1;
- if (xenConfigCopyStringOpt(conf, "device_model", &def->emulator) < 0)
+ if (xenConfigCopyStringOpt(conf, "device_model_override", &def->emulator) < 0)
return -1;
if (STREQ(nativeFormat, XEN_CONFIG_FORMAT_XL)) {
@@ -2242,7 +2242,7 @@ static int
xenFormatEmulator(virConfPtr conf, virDomainDefPtr def)
{
if (def->emulator &&
- xenConfigSetString(conf, "device_model", def->emulator) < 0)
+ xenConfigSetString(conf, "device_model_override", def->emulator) < 0)
return -1;
return 0;
diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.cfg b/tests/xlconfigdata/test-disk-positional-parms-full.cfg
index 217d4dccf3..b5965945e1 100644
--- a/tests/xlconfigdata/test-disk-positional-parms-full.cfg
+++ b/tests/xlconfigdata/test-disk-positional-parms-full.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg
index 940304e7b2..be5e23e39e 100644
--- a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg
+++ b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-disk-qed.cfg b/tests/xlconfigdata/test-disk-qed.cfg
index 78421767de..5ae93f4d8a 100644
--- a/tests/xlconfigdata/test-disk-qed.cfg
+++ b/tests/xlconfigdata/test-disk-qed.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-acpi-slic.cfg b/tests/xlconfigdata/test-fullvirt-acpi-slic.cfg
index 99b1726343..b5bd9c9790 100644
--- a/tests/xlconfigdata/test-fullvirt-acpi-slic.cfg
+++ b/tests/xlconfigdata/test-fullvirt-acpi-slic.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-cpuid.cfg b/tests/xlconfigdata/test-fullvirt-cpuid.cfg
index bb7b9c7b32..e71a87dfe8 100644
--- a/tests/xlconfigdata/test-fullvirt-cpuid.cfg
+++ b/tests/xlconfigdata/test-fullvirt-cpuid.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg
index 8012737c88..455ae0cee3 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg
index 4ed5a90e18..10e64b0876 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg
index 110f0a0cd1..f52c33dd3e 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-hpet-timer.cfg b/tests/xlconfigdata/test-fullvirt-hpet-timer.cfg
index a566bd75a3..b73ebf330c 100644
--- a/tests/xlconfigdata/test-fullvirt-hpet-timer.cfg
+++ b/tests/xlconfigdata/test-fullvirt-hpet-timer.cfg
@@ -14,7 +14,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg b/tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg
index 88f018c823..87156cc2db 100644
--- a/tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg
+++ b/tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg
@@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-multi-timer.cfg b/tests/xlconfigdata/test-fullvirt-multi-timer.cfg
index 5a78585821..c897b2a161 100644
--- a/tests/xlconfigdata/test-fullvirt-multi-timer.cfg
+++ b/tests/xlconfigdata/test-fullvirt-multi-timer.cfg
@@ -15,7 +15,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-multiserial.cfg b/tests/xlconfigdata/test-fullvirt-multiserial.cfg
index 1fd765b087..25bc4506e7 100644
--- a/tests/xlconfigdata/test-fullvirt-multiserial.cfg
+++ b/tests/xlconfigdata/test-fullvirt-multiserial.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.cfg b/tests/xlconfigdata/test-fullvirt-multiusb.cfg
index 6d456deb21..afb041d53c 100644
--- a/tests/xlconfigdata/test-fullvirt-multiusb.cfg
+++ b/tests/xlconfigdata/test-fullvirt-multiusb.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.cfg b/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.cfg
index d4b9f452de..bdf94e79e2 100644
--- a/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.cfg
+++ b/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-nestedhvm.cfg b/tests/xlconfigdata/test-fullvirt-nestedhvm.cfg
index 281f1268a5..5882bfee9f 100644
--- a/tests/xlconfigdata/test-fullvirt-nestedhvm.cfg
+++ b/tests/xlconfigdata/test-fullvirt-nestedhvm.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-nohap.cfg b/tests/xlconfigdata/test-fullvirt-nohap.cfg
index e7e933df6e..4235909f07 100644
--- a/tests/xlconfigdata/test-fullvirt-nohap.cfg
+++ b/tests/xlconfigdata/test-fullvirt-nohap.cfg
@@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-ovmf.cfg b/tests/xlconfigdata/test-fullvirt-ovmf.cfg
index b08e7fd98a..4d31a81108 100644
--- a/tests/xlconfigdata/test-fullvirt-ovmf.cfg
+++ b/tests/xlconfigdata/test-fullvirt-ovmf.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.cfg b/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.cfg
index 6a3dc3cfeb..5ba84ad22a 100644
--- a/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.cfg
+++ b/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-ovswitch-trunked.cfg b/tests/xlconfigdata/test-fullvirt-ovswitch-trunked.cfg
index 29e9d38ae8..edd53c9a08 100644
--- a/tests/xlconfigdata/test-fullvirt-ovswitch-trunked.cfg
+++ b/tests/xlconfigdata/test-fullvirt-ovswitch-trunked.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-pci.cfg b/tests/xlconfigdata/test-fullvirt-pci.cfg
index 5a3f572e25..e639cf9c83 100644
--- a/tests/xlconfigdata/test-fullvirt-pci.cfg
+++ b/tests/xlconfigdata/test-fullvirt-pci.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg b/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
index 587d3461f8..a30052dbf7 100644
--- a/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
+++ b/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
@@ -14,7 +14,7 @@ localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-type.cfg b/tests/xlconfigdata/test-fullvirt-type.cfg
index f8ecc2e190..9a9854ef38 100644
--- a/tests/xlconfigdata/test-fullvirt-type.cfg
+++ b/tests/xlconfigdata/test-fullvirt-type.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 0
parallel = "none"
diff --git a/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg b/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg
index edba69a172..98b7ca7f4f 100644
--- a/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg
+++ b/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg b/tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg
index 8186edfee0..88f1c03fcb 100644
--- a/tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg
+++ b/tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-vnuma-partialdist.cfg b/tests/xlconfigdata/test-fullvirt-vnuma-partialdist.cfg
index 861a50e76b..e117794086 100644
--- a/tests/xlconfigdata/test-fullvirt-vnuma-partialdist.cfg
+++ b/tests/xlconfigdata/test-fullvirt-vnuma-partialdist.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-fullvirt-vnuma.cfg b/tests/xlconfigdata/test-fullvirt-vnuma.cfg
index 91e233ac27..2220159ba4 100644
--- a/tests/xlconfigdata/test-fullvirt-vnuma.cfg
+++ b/tests/xlconfigdata/test-fullvirt-vnuma.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-net-fakemodel.cfg b/tests/xlconfigdata/test-net-fakemodel.cfg
index 70bd922ac0..6df0a0dc41 100644
--- a/tests/xlconfigdata/test-net-fakemodel.cfg
+++ b/tests/xlconfigdata/test-net-fakemodel.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-new-disk.cfg b/tests/xlconfigdata/test-new-disk.cfg
index 4fe76b257f..20dca0c257 100644
--- a/tests/xlconfigdata/test-new-disk.cfg
+++ b/tests/xlconfigdata/test-new-disk.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-qemu-passthrough.cfg b/tests/xlconfigdata/test-qemu-passthrough.cfg
index 42aad92205..79347d0ac8 100644
--- a/tests/xlconfigdata/test-qemu-passthrough.cfg
+++ b/tests/xlconfigdata/test-qemu-passthrough.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg
index 01c15d59a1..5906865047 100644
--- a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg
+++ b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-spice-features.cfg b/tests/xlconfigdata/test-spice-features.cfg
index f8a25e497a..944c653d70 100644
--- a/tests/xlconfigdata/test-spice-features.cfg
+++ b/tests/xlconfigdata/test-spice-features.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ]
parallel = "none"
serial = "none"
diff --git a/tests/xlconfigdata/test-spice.cfg b/tests/xlconfigdata/test-spice.cfg
index abdf63dd25..976c166e04 100644
--- a/tests/xlconfigdata/test-spice.cfg
+++ b/tests/xlconfigdata/test-spice.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ]
parallel = "none"
serial = "none"
diff --git a/tests/xlconfigdata/test-vif-multi-ip.cfg b/tests/xlconfigdata/test-vif-multi-ip.cfg
index 4a5d37f960..b082b9b22b 100644
--- a/tests/xlconfigdata/test-vif-multi-ip.cfg
+++ b/tests/xlconfigdata/test-vif-multi-ip.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-vif-rate.cfg b/tests/xlconfigdata/test-vif-rate.cfg
index 34a19a29b6..f6270c2d1e 100644
--- a/tests/xlconfigdata/test-vif-rate.cfg
+++ b/tests/xlconfigdata/test-vif-rate.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xlconfigdata/test-vif-typename.cfg b/tests/xlconfigdata/test-vif-typename.cfg
index fb5d94c27a..b2f1157438 100644
--- a/tests/xlconfigdata/test-vif-typename.cfg
+++ b/tests/xlconfigdata/test-vif-typename.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-escape-paths.cfg b/tests/xmconfigdata/test-escape-paths.cfg
index d3e410ffd2..03abf8d568 100644
--- a/tests/xmconfigdata/test-escape-paths.cfg
+++ b/tests/xmconfigdata/test-escape-paths.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386&test"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386&test"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.cfg b/tests/xmconfigdata/test-fullvirt-default-feature.cfg
index b01e290239..86d1d809c0 100644
--- a/tests/xmconfigdata/test-fullvirt-default-feature.cfg
+++ b/tests/xmconfigdata/test-fullvirt-default-feature.cfg
@@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg
index 16fe985946..1cf6fbd333 100644
--- a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg
+++ b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg
@@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg
index eb118427cc..bf8c4134c0 100644
--- a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg
+++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg
@@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-localtime.cfg b/tests/xmconfigdata/test-fullvirt-localtime.cfg
index 2f8514d5e4..bc7ed271e3 100644
--- a/tests/xmconfigdata/test-fullvirt-localtime.cfg
+++ b/tests/xmconfigdata/test-fullvirt-localtime.cfg
@@ -12,7 +12,7 @@ localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg
index b744b2184e..901f620eff 100644
--- a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg
+++ b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
index f9fce015e0..6fc9283a4c 100644
--- a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
+++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-nohap.cfg b/tests/xmconfigdata/test-fullvirt-nohap.cfg
index e5375dfdb6..6bd4eb4c29 100644
--- a/tests/xmconfigdata/test-fullvirt-nohap.cfg
+++ b/tests/xmconfigdata/test-fullvirt-nohap.cfg
@@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg
index 94c52d975b..62e18c1af3 100644
--- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg
+++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.cfg b/tests/xmconfigdata/test-fullvirt-serial-file.cfg
index 9193cc8717..0574f97ccc 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-file.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-file.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.cfg b/tests/xmconfigdata/test-fullvirt-serial-null.cfg
index 9ef60b4bd5..839818b228 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-null.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-null.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg
index 60e41ab556..bdbfe30d1c 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg
index d4e0763d15..3007e96efa 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg
index efefe109b9..9af628c457 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg
index 224f5274e1..cbbb30a42e 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg
index e70ab847ec..d2b65b5c2d 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg
index 9e7acdf0c4..8d44b053a8 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg
index 964beba4fe..a6cc4a4cd9 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-sound.cfg b/tests/xmconfigdata/test-fullvirt-sound.cfg
index 501463f54c..5a71618f83 100644
--- a/tests/xmconfigdata/test-fullvirt-sound.cfg
+++ b/tests/xmconfigdata/test-fullvirt-sound.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg
index 660f18e776..07d49573d0 100644
--- a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg
+++ b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg
index 90428882cc..45364b1a57 100644
--- a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg
+++ b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-fullvirt-utc.cfg b/tests/xmconfigdata/test-fullvirt-utc.cfg
index f9fce015e0..6fc9283a4c 100644
--- a/tests/xmconfigdata/test-fullvirt-utc.cfg
+++ b/tests/xmconfigdata/test-fullvirt-utc.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-no-source-cdrom.cfg b/tests/xmconfigdata/test-no-source-cdrom.cfg
index 8439961215..a6045244e5 100644
--- a/tests/xmconfigdata/test-no-source-cdrom.cfg
+++ b/tests/xmconfigdata/test-no-source-cdrom.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-pci-dev-syntax.cfg b/tests/xmconfigdata/test-pci-dev-syntax.cfg
index e0f00d9bd7..c3add42e56 100644
--- a/tests/xmconfigdata/test-pci-dev-syntax.cfg
+++ b/tests/xmconfigdata/test-pci-dev-syntax.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
diff --git a/tests/xmconfigdata/test-pci-devs.cfg b/tests/xmconfigdata/test-pci-devs.cfg
index 188227e187..9c6d3311a8 100644
--- a/tests/xmconfigdata/test-pci-devs.cfg
+++ b/tests/xmconfigdata/test-pci-devs.cfg
@@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
-device_model = "/usr/lib/xen/bin/qemu-system-i386"
+device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1
4 years
[PATCH] lxc: Set default security model in XML parser config
by Jim Fehlig
Attempting to create a lxc domain with <seclabel type='none'/> fails
virsh --connect lxc:/// create distro_nosec.xml
error: Failed to create domain from distro_nosec.xml
error: unsupported configuration: Security driver model '(null)' is not available
The lxc driver does not set a default security driver model in the XML
parser config, causing seclabels of type='none' to have a null model.
The lxc driver's security manager is initialized in lxcStateInitialize()
by calling lxcSecurityInit(). Use the model of this manager as the
default in the XML parser config.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
Kind'a, sort'a a V2 of
https://www.redhat.com/archives/libvir-list/2020-December/msg00186.html
It's quite a different approach to solving the problem than that patch.
src/lxc/lxc_conf.c | 3 ++-
src/lxc/lxc_conf.h | 3 ++-
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_driver.c | 5 ++++-
tests/testutilslxc.c | 2 +-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 13da6c4586..e6ad91205e 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -209,9 +209,10 @@ virCapsPtr virLXCDriverGetCapabilities(virLXCDriverPtr driver,
virDomainXMLOptionPtr
-lxcDomainXMLConfInit(virLXCDriverPtr driver)
+lxcDomainXMLConfInit(virLXCDriverPtr driver, const char *defsecmodel)
{
virLXCDriverDomainDefParserConfig.priv = driver;
+ virLXCDriverDomainDefParserConfig.defSecModel = defsecmodel;
return virDomainXMLOptionNew(&virLXCDriverDomainDefParserConfig,
&virLXCDriverPrivateDataCallbacks,
&virLXCDriverDomainXMLNamespace,
diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h
index f2f0e0a570..664bafc7b9 100644
--- a/src/lxc/lxc_conf.h
+++ b/src/lxc/lxc_conf.h
@@ -112,7 +112,8 @@ int virLXCLoadDriverConfig(virLXCDriverConfigPtr cfg,
virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver);
virCapsPtr virLXCDriverGetCapabilities(virLXCDriverPtr driver,
bool refresh);
-virDomainXMLOptionPtr lxcDomainXMLConfInit(virLXCDriverPtr driver);
+virDomainXMLOptionPtr lxcDomainXMLConfInit(virLXCDriverPtr driver,
+ const char *defsecmodel);
static inline void lxcDriverLock(virLXCDriverPtr driver)
{
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 97de0408b6..67e5e63d00 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -169,7 +169,7 @@ virLXCControllerDriverNew(void)
}
driver->caps = virLXCDriverCapsInit(NULL);
- driver->xmlopt = lxcDomainXMLConfInit(driver);
+ driver->xmlopt = lxcDomainXMLConfInit(driver, NULL);
return driver;
}
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index d0503ef2ea..9d94c703ea 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1470,6 +1470,7 @@ static int lxcStateInitialize(bool privileged,
{
virLXCDriverConfigPtr cfg = NULL;
bool autostart = true;
+ const char *defsecmodel;
if (root != NULL) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
@@ -1525,7 +1526,9 @@ static int lxcStateInitialize(bool privileged,
if (!(lxc_driver->hostdevMgr = virHostdevManagerGetDefault()))
goto cleanup;
- if (!(lxc_driver->xmlopt = lxcDomainXMLConfInit(lxc_driver)))
+ defsecmodel = virSecurityManagerGetModel(lxc_driver->securityManager);
+
+ if (!(lxc_driver->xmlopt = lxcDomainXMLConfInit(lxc_driver, defsecmodel)))
goto cleanup;
if (!(lxc_driver->closeCallbacks = virCloseCallbacksNew()))
diff --git a/tests/testutilslxc.c b/tests/testutilslxc.c
index b5e2f542e7..e15ea2bd32 100644
--- a/tests/testutilslxc.c
+++ b/tests/testutilslxc.c
@@ -71,7 +71,7 @@ testLXCDriverInit(void)
}
driver->caps = testLXCCapsInit();
- driver->xmlopt = lxcDomainXMLConfInit(driver);
+ driver->xmlopt = lxcDomainXMLConfInit(driver, NULL);
return driver;
}
--
2.29.2
4 years
[PATCH RESEND v1] xen: recognize device_model_override
by Olaf Hering
Since Xen 4.2 libxl expects device_model_override="/path" instead of
device_model="/path". Adjust the code to parse this as <emulator>.
While libxl also recognizes device_model_version="", this knob is not
supported by libvirt. A runtime detection exists to select either
"qemu-xen" or "qemu-xen-traditional".
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
src/libxl/xen_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index c82e487d80..88a784ed04 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -1508,7 +1508,7 @@ xenParseConfigCommon(virConfPtr conf,
if (xenParseTimeOffset(conf, def) < 0)
return -1;
- if (xenConfigCopyStringOpt(conf, "device_model", &def->emulator) < 0)
+ if (xenConfigCopyStringOpt(conf, "device_model_override", &def->emulator) < 0)
return -1;
if (STREQ(nativeFormat, XEN_CONFIG_FORMAT_XL)) {
@@ -2242,7 +2242,7 @@ static int
xenFormatEmulator(virConfPtr conf, virDomainDefPtr def)
{
if (def->emulator &&
- xenConfigSetString(conf, "device_model", def->emulator) < 0)
+ xenConfigSetString(conf, "device_model_override", def->emulator) < 0)
return -1;
return 0;
4 years
[PATCH 0/7] qemu: Add workaround for apps polling virDomainGetBlockJobInfo with pre-blockdev qemu
by Peter Krempa
This is a workaround for the issue that Nikolay tries to fix in:
https://www.redhat.com/archives/libvir-list/2020-November/msg00669.html
This one is a far more focused hack for apps which don't bother to
update to events for block job completion checking.
Peter Krempa (7):
virDomainGetBlockJobInfo: Discourage polling for block job completion
detection
virDomainGetBlockJobInfo: Reword docs for fallback values
qemuMonitorBlockJobInfo: Store 'ready' and 'ready_present' separately
qemuBlockJobInfoTranslate: Use explicit comparison against 0
qemuDomainGetBlockJobInfo: Use qemuMonitorGetAllBlockJobInfo
qemu: monitor: Remove unused qemuMonitorGetBlockJobInfo
qemuDomainGetBlockJobInfo: Work stats for unfinished pre-blockdev
blockjob
src/libvirt-domain.c | 23 +++++++++++++++------
src/qemu/qemu_driver.c | 39 +++++++++++++++++++++++-------------
src/qemu/qemu_monitor.c | 29 ---------------------------
src/qemu/qemu_monitor.h | 7 ++-----
src/qemu/qemu_monitor_json.c | 8 ++------
src/qemu/qemu_process.c | 4 ++--
6 files changed, 48 insertions(+), 62 deletions(-)
--
2.28.0
4 years
[RFCv2 00/46] RFC: Generate parsexml/formatbuf functions based on directives
by Shi Lei
V1 here: [https://www.redhat.com/archives/libvir-list/2020-June/msg00357.html]
Differ from V1:
* Move the generator into scripts/xmlgen and rename it 'xmlgen'.
* Declare virXMLChildNode and virXMLChildNodeSet in libvirt_private.syms.
* Replace VIR_FREE with g_free and VIR_ALLOC[_N] with g_new0.
* Adjust virReportError to avoid unnecessary translation.
* Remove the macro VIR_USED and use G_GNUC_UNUSED to declare arguments.
* When parsing string member, assign value to it directly instead of
using middle variable.
* Don't set libclang_path. Just use python-clang's default setting.
* Use virEscapeString for escaping xml characters.
* Enable directive 'genformat' with a parameter to support separation mode.
* Add directive 'xmlswitch' and 'xmlgroup' to support discriminated unions.
* Allow directive 'array' and 'specified' to carry with a parameter,
which specifies its counterpart explicitly.
* Enable directive 'xmlattr' with path.
* Add directive 'formatflag' and 'formathook'.
For those new and changed directives, illustrate them by an example:
struct _virDomainGraphicsAuthDef { /* genparse, genformat:separate */
char *passwd; /* xmlattr, formatflag:VIR_DOMAIN_DEF_FORMAT_SECURE */
bool expires;
time_t validTo; /* xmlattr:passwdValidTo, specified:expires */
virDomainGraphicsAuthConnectedType connected; /* xmlattr */
};
struct _virDomainGraphicsListenDef { /* genparse:withhook, genformat */
virDomainGraphicsListenType type; /* xmlattr */
char *address; /* xmlattr, formathook */
char *network; /* xmlattr, formatflag:VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK */
char *socket; /* xmlattr, formathook */
int fromConfig; /* xmlattr, formatflag:%VIR_DOMAIN_DEF_FORMAT_STATUS */
bool autoGenerated; /* xmlattr, formatflag:%VIR_DOMAIN_DEF_FORMAT_STATUS */
};
struct _virDomainGraphicsSDLDef { /* genparse, genformat:separate */
char *display; /* xmlattr */
char *xauth; /* xmlattr */
bool fullscreen; /* xmlattr */
virTristateBool gl; /* xmlattr:gl/enable */
};
struct _virDomainGraphicsDef { /* genparse:concisehook, genformat */
virObjectPtr privateData;
virDomainGraphicsType type; /* xmlattr */
size_t nListens;
virDomainGraphicsListenDefPtr listens; /* xmlelem, array:nListens */
union {
virDomainGraphicsSDLDef sdl; /* xmlgroup */
virDomainGraphicsVNCDef vnc; /* xmlgroup */
virDomainGraphicsRDPDef rdp; /* xmlgroup */
virDomainGraphicsDesktopDef desktop; /* xmlgroup */
virDomainGraphicsSpiceDef spice; /* xmlgroup */
virDomainGraphicsEGLHeadlessDef egl_headless; /* xmlgroup */
} data; /* xmlswitch:type */
};
Explanation for these directives:
- genformat[:separate|onlyattrs|onlyelems]
Only work on a struct.
Generate formatbuf function for this struct only if 'genformat' is specified.
The function name is based on struct-name and suffixed with 'FormatBuf'.
When 'genformat:separate' is specified, generate two formatbuf functions
rather than a single full-mode formatbuf function.
One for formatting attributes and another for formatting elements.
These function names are based on struct-name and suffixed with 'FormatAttr'
and 'FormatElem' respectively.
The 'onlyattrs' and 'onlyelems' are just like 'separate', but only
generate one of those two functions according to its denotation.
- xmlattr[:[parentname/]thename]
Parse/Format the field as an XML attribute or
attribute wrapped by an XML element.
If only 'thename' is specified, use it as the XML attribute name;
or use the filed name.
The 'parentname' is the name of the attribute's parent element.
If 'parentname/thename' is specified, the corresponding form is
<parentname thename='..' />.
- xmlgroup
The field is a struct, but its corresponding form in XML is a group
rather than an element.
- xmlswitch:thename
Only for discriminated union. 'thename' is the name of its relative enum.
The name of each union member should match a shortname of the enum.
- array[:countername]
Parse/Format the field as an array.
Each array field must have an related counter field, which name is
specified by 'countername'.
If 'countername' is omitted, follow the pattern:
n + 'field_name'.
- specified[:thename]
This field has an related field to indicate its existence, and
'thename' specifies the name of this related field.
When 'thename' is omitted, follow the pattern:
'field_name' + '_specified'.
- formatflag:[!|%]flag
This field will be formatted and written out to XML only if the 'flag'
hits a target flagset.
The target flagset is passed into the formatbuf function through the
argument 'opaque'.
Adding a '!' before 'flag' means NOT hitting.
Adding a '%' before 'flag' means that flag hitting-check is the unique
condition for formatting this field. For example,
for 'passwd' in 'virDomainGraphicsAuthDef', the directive is:
formatflag:VIR_DOMAIN_DEF_FORMAT_SECURE
then the generated code:
if (def->passwd && (virXMLFlag(opaque) & VIR_DOMAIN_DEF_FORMAT_SECURE))
virBufferEscapeString(buf, " passwd='%s'", def->passwd);
If '%' is inserted like this:
formatflag:%VIR_DOMAIN_DEF_FORMAT_SECURE
then the generated code:
if ((virXMLFlag(opaque) & VIR_DOMAIN_DEF_FORMAT_SECURE))
virBufferEscapeString(buf, " passwd='%s'", def->passwd);
- formathook
Introduce hooks to handle the field if xmlgen can't deal with it now.
E.g., virDomainGraphicsListenDef have two fields with 'formathook',
which are 'address' and 'socket'.
The xmlgen will generate the declaration of some hooks for formatting
these fields and developers should implement them.
1) Check the declaration of hook by a commandline.
# ./scripts/xmlgen/go show virDomainGraphicsListenDef -kf
int
virDomainGraphicsListenDefFormatHook(const virDomainGraphicsListenDef *def,
const void *parent,
const void *opaque,
virBufferPtr addressBuf,
virBufferPtr socketBuf);
bool
virDomainGraphicsListenDefCheckHook(const virDomainGraphicsListenDef *def,
const void *parent,
void *opaque,
bool result);
2) Implement these two hooks in src/conf/domain_conf.c.
2.1) virXXXFormatHook
It is the hook for formatting field 'address' and 'socket'.
The 'addressBuf' and 'socketBuf' are used for output destinations respectively.
2.2) virXXXCheckHook
For structs, the xmlgen generates virXXXCheck function to come with
the virXXXFormatBuf. The virXXXCheck reports whether the corresponding
XML element is null.
The virXXXCheckHook intercepts the 'result' of virXXXCheck. It changes 'result'
or just forwards it according to those fields with 'formathook'.
Thanks!
Shi Lei (46):
scripts: Add a tool to generate xml parse/format functions
maint: Check python3-clang
maint: Call xmlgen automatically when c-head-files change
util: Add some xml-helper-functions to cooperate with xmlgen
util: Add helper functions for 'bool' and 'time_t' and cooperate with
xmlgen
util: Add parsexml/formatbuf helper functions for virSocketAddr
conf: Extract error-checking code from virNetworkDNSTxtDefParseXML
conf: Replace virNetworkDNSTxtDefParseXML(hardcoded) with
namesake(generated)
conf: Generate virNetworkDNSTxtDefFormatBuf
conf: Extract error-checking code from virNetworkDNSSrvDefParseXML
conf: Replace virNetworkDNSSrvDefParseXML(hardcoded) with
namesake(generated)
conf: Generate virNetworkDNSSrvDefFormatBuf
conf: Extract error-checking code from virNetworkDNSHostDefParseXML
conf: Replace virNetworkDNSHostDefParseXML(hardcoded) with
namesake(generated)
conf: Generate virNetworkDNSHostDefFormatBuf
conf: Extract virNetworkDNSForwarderParseXML from
virNetworkDNSParseXML
conf: Replace virNetworkDNSForwarderParseXML(hardcoded) with
namesake(generated)
conf: Generate virNetworkDNSForwarderFormatBuf
conf: Extract error-checking code from virNetworkDNSDefParseXML
conf: Replace virNetworkDNSDefParseXML(hardcoded) with
namesake(generated)
conf: Generate virNetworkDNSDefFormatBuf
conf: Extract embedded structs from virDomainGraphicsDef as standalone
structs
conf: Replace virDomainGraphicsDefParseXMLSDL(hardcoded) with
virDomainGraphicsSDLDefParseXML(generated)
conf: Generate format functions for virDomainGraphicsSDLDef
conf: Replace virDomainGraphicsAuthDefParseXML(hardcoded) with
namesake(generated)
conf: Generate format functions for virDomainGraphicsAuthDef
conf: Extract error-checking code from virDomainGraphicsDefParseXMLVNC
conf: Replace virDomainGraphicsDefParseXMLVNC(hardcoded) with
virDomainGraphicsVNCDefParseXML(generated)
conf: Generate virDomainGraphicsVNCDefFormatAttr
conf: Extract error-checking code from virDomainGraphicsDefParseXMLRDP
conf: Replace virDomainGraphicsDefParseXMLRDP(hardcoded) with
virDomainGraphicsRDPDefParseXML(generated)
conf: Generate virDomainGraphicsRDPDefFormatAttr
conf: Replace virDomainGraphicsDefParseXMLDesktop(hardcoded) with
virDomainGraphicsDesktopDefParseXML(generated)
conf: Generate virDomainGraphicsDesktopDefFormatAttr
conf: Add virSpiceChannelDef to help to parse the member 'channels' of
virDomainGraphicsSpiceDef
conf: Extract error-checking code from
virDomainGraphicsDefParseXMLSpice
conf: Replace virDomainGraphicsDefParseXMLSpice(hardcoded) with
virDomainGraphicsSpiceDefParseXML(generated)
conf: Generate virDomainGraphicsSpiceDefFormatElem and
virDomainGraphicsSpiceDefFormatAttr
conf: Replace virDomainGraphicsDefParseXMLEGLHeadless(hardcoded) with
virDomainGraphicsEGLHeadlessDefParseXML(generated)
conf: Generate virDomainGraphicsEGLHeadlessDefFormatElem
conf: Extract error-checking code from
virDomainGraphicsListenDefParseXML
conf: Replace virDomainGraphicsListenDefParseXML(hardcoded) with
namesake(generated)
conf: Generate virDomainGraphicsListenDefFormatBuf
conf: Extract error-checking code from virDomainGraphicsDefParseXML
conf: Replace virDomainGraphicsDefParseXML(hardcoded) with
namesake(generated)
conf: Replace virDomainGraphicsDefFormat(hardcoded) with
virDomainGraphicsDefFormatBuf(generated)
meson.build | 5 +
po/POTFILES.in | 3 +
scripts/meson.build | 8 +
scripts/xmlgen/directive.py | 1115 ++++++++++++++++++++
scripts/xmlgen/go | 7 +
scripts/xmlgen/main.py | 439 ++++++++
scripts/xmlgen/utils.py | 121 +++
src/conf/domain_conf.c | 1650 +++++++++---------------------
src/conf/domain_conf.h | 179 ++--
src/conf/meson.build | 41 +
src/conf/network_conf.c | 467 ++-------
src/conf/network_conf.h | 54 +-
src/conf/virconftypes.h | 18 +
src/libvirt_private.syms | 9 +
src/meson.build | 6 +
src/qemu/qemu_command.c | 4 +
src/qemu/qemu_driver.c | 2 +
src/qemu/qemu_hotplug.c | 2 +
src/qemu/qemu_migration_cookie.c | 1 +
src/qemu/qemu_process.c | 5 +
src/qemu/qemu_validate.c | 2 +
src/util/virsocketaddr.c | 42 +
src/util/virsocketaddr.h | 26 +-
src/util/virstring.c | 57 ++
src/util/virstring.h | 9 +
src/util/virxml.c | 105 ++
src/util/virxml.h | 6 +
src/vmx/vmx.c | 1 +
tests/meson.build | 1 +
tools/meson.build | 2 +
30 files changed, 2738 insertions(+), 1649 deletions(-)
create mode 100644 scripts/xmlgen/directive.py
create mode 100755 scripts/xmlgen/go
create mode 100755 scripts/xmlgen/main.py
create mode 100644 scripts/xmlgen/utils.py
--
2.25.1
4 years
[libvirt PATCH] rpm: convert mingw spec to meson
by Daniel P. Berrangé
The meson build system is configured to only ever build shared
libraries, so we delete the -static sub-RPMs.
The few driver conditionals are deleted as there was never any
scenario in which their value changed.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
mingw-libvirt.spec.in | 205 +++++++++++++++++-------------------------
1 file changed, 81 insertions(+), 124 deletions(-)
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
index 06bb9dfe7f..0686cbaf78 100644
--- a/mingw-libvirt.spec.in
+++ b/mingw-libvirt.spec.in
@@ -11,26 +11,6 @@
%define supported_platform 0
%endif
-# Default to skipping autoreconf. Distros can change just this one line
-# (or provide a command-line override) if they backport any patches that
-# touch configure.ac or Makefile.am.
-%{!?enable_autotools:%define enable_autotools 0}
-
-# The mingw build is client only. Set up defaults for hypervisor drivers
-# that talk via a native remote protocol, and for which prereq mingw
-# libraries exist.
-%define with_esx 0%{!?_without_esx:1}
-# missing libwsman, so can't build hyper-v
-%define with_hyperv 0%{!?_without_hyperv:0}
-%define with_xenapi 0%{!?_without_xenapi:1}
-%define with_vz 0%{!?_without_vz:0}
-
-# RHEL ships ESX but not PowerHypervisor, HyperV, or libxenserver (xenapi)
-%if 0%{?rhel}
- %define with_xenapi 0
- %define with_hyperv 0
-%endif
-
Name: mingw-libvirt
Version: @VERSION@
Release: 1%{?dist}
@@ -74,20 +54,15 @@ BuildRequires: libxslt
BuildRequires: python3
BuildRequires: perl-interpreter
BuildRequires: perl(Getopt::Long)
-%if 0%{?enable_autotools}
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: gettext-devel
-BuildRequires: libtool
-%endif
+BuildRequires: make
+BuildRequires: meson
+BuildRequires: ninja-build
BuildRequires: python3-docutils
BuildRequires: mingw32-libssh2
BuildRequires: mingw64-libssh2
-%if %{with_esx}
BuildRequires: mingw32-curl
BuildRequires: mingw64-curl
-%endif
BuildRequires: cpp
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: rpcgen
@@ -101,31 +76,19 @@ MinGW Windows libvirt virtualization library.
# Mingw32
%package -n mingw32-libvirt
Summary: %{summary}
+Obsoletes: mingw32-libvirt < 7.0.0
%description -n mingw32-libvirt
MinGW Windows libvirt virtualization library.
-%package -n mingw32-libvirt-static
-Summary: %{summary}
-Requires: mingw32-libvirt = %{version}-%{release}
-
-%description -n mingw32-libvirt-static
-MinGW Windows libvirt virtualization library, static version.
-
# Mingw64
%package -n mingw64-libvirt
Summary: %{summary}
+Obsoletes: mingw64-libvirt < 7.0.0
%description -n mingw64-libvirt
MinGW Windows libvirt virtualization library.
-%package -n mingw64-libvirt-static
-Summary: %{summary}
-Requires: mingw64-libvirt = %{version}-%{release}
-
-%description -n mingw64-libvirt-static
-MinGW Windows libvirt virtualization library, static version.
-
%{?mingw_debug_package}
@@ -138,55 +101,82 @@ echo "This RPM requires Fedora >= %{min_fedora}"
exit 1
%endif
-%if ! %{with_esx}
- %define _without_esx --without-esx
-%endif
-
-%if ! %{with_hyperv}
- %define _without_hyperv --without-hyperv
-%endif
-
-%if ! %{with_xenapi}
- %define _without_xenapi --without-xenapi
-%endif
-
-%if ! %{with_vz}
- %define _without_vz --without-vz
-%endif
-
-%if 0%{?enable_autotools}
-autoreconf -if
-%endif
-
-# XXX enable SASL in future
-%mingw_configure \
- --enable-static \
- --without-xen \
- --without-qemu \
- --without-openvz \
- --without-lxc \
- --without-vbox \
- %{?_without_xenapi} \
- --without-sasl \
- --without-polkit \
- --without-libvirtd \
- %{?_without_esx} \
- %{?_without_hyperv} \
- --without-vmware \
- --without-parallels \
- --without-netcf \
- --without-audit \
- --without-dtrace \
- --enable-expensive-tests
-
-%mingw_make %{?_smp_mflags}
-
+%mingw_meson \
+ --auto-features=enabled \
+ -Ddriver_remote=enabled \
+ -Ddriver_esx=enabled \
+ -Dcurl=enabled \
+ -Ddocs=enabled \
+ -Dapparmor=disabled \
+ -Dattr=disabled \
+ -Daudit=disabled \
+ -Dbash_completion=disabled \
+ -Dblkid=disabled \
+ -Dcapng=disabled \
+ -Ddriver_bhyve=disabled \
+ -Ddriver_hyperv=disabled \
+ -Ddriver_interface=disabled \
+ -Ddriver_libvirtd=disabled \
+ -Ddriver_libxl=disabled \
+ -Ddriver_lxc=disabled \
+ -Ddriver_network=disabled \
+ -Ddriver_openvz=disabled \
+ -Ddriver_qemu=disabled \
+ -Ddriver_secrets=disabled \
+ -Ddriver_vbox=disabled \
+ -Ddriver_vmware=disabled \
+ -Ddriver_vz=disabled \
+ -Ddtrace=disabled \
+ -Dexpensive_tests=enabled \
+ -Dfirewalld=disabled \
+ -Dfirewalld_zone=disabled \
+ -Dfuse=disabled \
+ -Dglusterfs=disabled \
+ -Dhost_validate=disabled \
+ -Dlibiscsi=disabled \
+ -Dlibnl=disabled \
+ -Dlibpcap=disabled \
+ -Dlibssh2=disabled \
+ -Dlibssh=disabled \
+ -Dlogin_shell=disabled \
+ -Dnetcf=disabled \
+ -Dnls=disabled \
+ -Dnss=disabled \
+ -Dnumactl=disabled \
+ -Dnumad=disabled \
+ -Dopenwsman=disabled \
+ -Dpciaccess=disabled \
+ -Dpm_utils=disabled \
+ -Dpolkit=disabled \
+ -Dreadline=disabled \
+ -Drpath=disabled \
+ -Dsanlock=disabled \
+ -Dsasl=disabled \
+ -Dsecdriver_apparmor=disabled \
+ -Dsecdriver_selinux=disabled \
+ -Dselinux=disabled \
+ -Dstorage_dir=disabled \
+ -Dstorage_disk=disabled \
+ -Dstorage_fs=disabled \
+ -Dstorage_gluster=disabled \
+ -Dstorage_iscsi_direct=disabled \
+ -Dstorage_iscsi=disabled \
+ -Dstorage_lvm=disabled \
+ -Dstorage_mpath=disabled \
+ -Dstorage_rbd=disabled \
+ -Dstorage_scsi=disabled \
+ -Dstorage_sheepdog=disabled \
+ -Dstorage_vstorage=disabled \
+ -Dstorage_zfs=disabled \
+ -Dsysctl_config=disabled \
+ -Dtests=disabled \
+ -Dudev=disabled \
+ -Dwireshark_dissector=disabled \
+ -Dyajl=disabled
+%mingw_ninja
%install
-%mingw_make_install "DESTDIR=$RPM_BUILD_ROOT"
-
-# Libtool files don't need to be bundled
-find $RPM_BUILD_ROOT -name "*.la" -delete
+%mingw_ninja_install
rm -rf $RPM_BUILD_ROOT%{mingw32_sysconfdir}/libvirt/nwfilter
rm -rf $RPM_BUILD_ROOT%{mingw64_sysconfdir}/libvirt/nwfilter
@@ -267,12 +257,6 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
%{mingw32_mandir}/man1/virt-pki-validate.1*
%{mingw32_mandir}/man7/virkey*.7*
-%files -n mingw32-libvirt-static
-%{mingw32_libdir}/libvirt.a
-%{mingw32_libdir}/libvirt-lxc.a
-%{mingw32_libdir}/libvirt-qemu.a
-%{mingw32_libdir}/libvirt-admin.a
-
# Mingw64
%files -n mingw64-libvirt
%dir %{mingw64_sysconfdir}/libvirt/
@@ -299,28 +283,8 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
%dir %{mingw64_datadir}/libvirt/
%dir %{mingw64_datadir}/libvirt/schemas/
-%{mingw64_datadir}/libvirt/schemas/basictypes.rng
-%{mingw64_datadir}/libvirt/schemas/capability.rng
-%{mingw64_datadir}/libvirt/schemas/cputypes.rng
-%{mingw64_datadir}/libvirt/schemas/domain.rng
-%{mingw64_datadir}/libvirt/schemas/domainbackup.rng
-%{mingw64_datadir}/libvirt/schemas/domaincaps.rng
-%{mingw64_datadir}/libvirt/schemas/domaincheckpoint.rng
-%{mingw64_datadir}/libvirt/schemas/domaincommon.rng
-%{mingw64_datadir}/libvirt/schemas/domainsnapshot.rng
-%{mingw64_datadir}/libvirt/schemas/interface.rng
-%{mingw64_datadir}/libvirt/schemas/network.rng
-%{mingw64_datadir}/libvirt/schemas/networkcommon.rng
-%{mingw64_datadir}/libvirt/schemas/networkport.rng
-%{mingw64_datadir}/libvirt/schemas/nodedev.rng
-%{mingw64_datadir}/libvirt/schemas/nwfilter.rng
-%{mingw64_datadir}/libvirt/schemas/nwfilter_params.rng
-%{mingw64_datadir}/libvirt/schemas/nwfilterbinding.rng
-%{mingw64_datadir}/libvirt/schemas/secret.rng
-%{mingw64_datadir}/libvirt/schemas/storagecommon.rng
-%{mingw64_datadir}/libvirt/schemas/storagepool.rng
-%{mingw64_datadir}/libvirt/schemas/storagepoolcaps.rng
-%{mingw64_datadir}/libvirt/schemas/storagevol.rng
+%{mingw64_datadir}/libvirt/schemas/*.rng
+
%dir %{mingw64_datadir}/libvirt/api/
%{mingw64_datadir}/libvirt/api/libvirt-api.xml
%{mingw64_datadir}/libvirt/api/libvirt-lxc-api.xml
@@ -359,11 +323,4 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
%{mingw64_mandir}/man1/virt-pki-validate.1*
%{mingw64_mandir}/man7/virkey*.7*
-%files -n mingw64-libvirt-static
-%{mingw64_libdir}/libvirt.a
-%{mingw64_libdir}/libvirt-lxc.a
-%{mingw64_libdir}/libvirt-qemu.a
-%{mingw64_libdir}/libvirt-admin.a
-
-
%changelog
--
2.28.0
4 years
[libvirt PATCH] libvirt-guests: Remove obsolete Windows comment
by Daniel P. Berrangé
From: Kevin Locke <kevin(a)kevinlocke.name>
The comment that
> For instance, qemu-ga doesn't support guest time synchronization on
> Windows guests, but Linux ones.
Was correct at the time, but has since been addressed by
qemu/qemu@105fad6bb22, which added support for set-time without a time
argument, as used by `virsh domtime --sync` by libvirt-guests.sh. I can
confirm that `virsh domtime --sync` works correctly on a Windows 10
guest, as does `SYNC_TIME=1`. (Note that there can be a significant
delay between when the command completes and when the guest time
finishes synchronizing due to QEMU GA calling `w32tm` with `/nowait`,
which complicates testing.)
Signed-off-by: Kevin Locke <kevin(a)kevinlocke.name>
---
Merged this trivial docs patch from a gitlab MR.
tools/libvirt-guests.sysconf | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
index 0765efec21..4f83edab90 100644
--- a/tools/libvirt-guests.sysconf
+++ b/tools/libvirt-guests.sysconf
@@ -46,7 +46,5 @@
# If non-zero, try to sync guest time on domain resume. Be aware, that
# this requires guest agent with support for time synchronization
-# running in the guest. For instance, qemu-ga doesn't support guest time
-# synchronization on Windows guests, but Linux ones. By default, this
-# functionality is turned off.
+# running in the guest. By default, this functionality is turned off.
#SYNC_TIME=1
--
2.28.0
4 years
[PATCH v2 00/27] Introduce virtio memory support
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2020-November/msg01525.html
diff to v1:
- I've made change to 23/26 which now updates <currentMemory/> on
MEMORY_DEVICE_SIZE_CHANGE event
- virsh manpage was written in 25/26
- 26/26 is new, it's NEWS.rst addition
Original patchset was:
Reviewed-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
Tested-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
Tested-by: Han Han <hhan(a)redhat.com>
and I will add those tags before pushing. However, I'd like have review
for this new version, because of the changes I made.
Michal Prívozník (27):
viruuid: Rework virUUIDIsValid()
internal.h: Introduce VIR_IS_POW2()
docs: Fix nvdimm example wrt to <uuid/>
domain_conf: Check NVDIMM UUID in ABI stability
qemu_domain_address: Reformat qemuDomainAssignS390Addresses()
conf: Require nvdimm path in validate step
domain_conf: Fix virDomainMemoryModel type
virDomainMemorySourceDefFormat: Utilize virXMLFormatElement()
virDomainMemoryTargetDefFormat: Utilize virXMLFormatElement()
qemu: Move mem validation into post parse validator
conf: Move some of virDomainMemoryDef members into a union
conf: Introduce virtio-pmem <memory/> model
qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_{P}MEM_PCI
qemu_validate: Require virtio-mem device for mem model virtio
security: Relabel virtio mem
qemu: Allow virtio-pmem in CGroups
qemu: Create virtio-pmem in domain namespace
qemu_command: Move dimm into qemuBuildDeviceAddressStr()
qemu: Build command line for virtio-pmem
conf: Introduce virtio-mem <memory/> model
qemu: Build command line for virtio-mem
qemu: Wire up <memory/> live update
qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event
qemu: Refresh the actual size of virtio-mem on monitor reconnect
virsh: Simplify @flags handing in cmdSetmem() and cmdSetmaxmem()
virsh: Introduce --virtio to setmem
news: document recent virtio memory addition
NEWS.rst | 9 +
docs/formatdomain.rst | 70 +++-
docs/manpages/virsh.rst | 6 +
docs/schemas/domaincommon.rng | 16 +
src/conf/domain_conf.c | 372 ++++++++++++++----
src/conf/domain_conf.h | 38 +-
src/internal.h | 10 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_alias.c | 59 ++-
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_cgroup.c | 43 +-
src/qemu/qemu_command.c | 172 +++++---
src/qemu/qemu_command.h | 5 +-
src/qemu/qemu_domain.c | 99 +++--
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_domain_address.c | 98 +++--
src/qemu/qemu_domain_address.h | 3 +-
src/qemu/qemu_driver.c | 201 +++++++++-
src/qemu/qemu_hotplug.c | 22 +-
src/qemu/qemu_hotplug.h | 5 +
src/qemu/qemu_monitor.c | 37 ++
src/qemu/qemu_monitor.h | 27 ++
src/qemu/qemu_monitor_json.c | 94 +++--
src/qemu/qemu_monitor_json.h | 5 +
src/qemu/qemu_namespace.c | 19 +-
src/qemu/qemu_process.c | 107 ++++-
src/qemu/qemu_validate.c | 78 ++--
src/security/security_apparmor.c | 35 +-
src/security/security_dac.c | 48 ++-
src/security/security_selinux.c | 48 ++-
src/security/virt-aa-helper.c | 22 +-
src/util/virrandom.c | 2 +-
src/util/viruuid.c | 17 +-
src/util/viruuid.h | 2 +-
.../caps_4.1.0.x86_64.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../caps_5.1.0.x86_64.xml | 2 +
.../caps_5.2.0.x86_64.xml | 2 +
...mory-hotplug-virtio-mem.x86_64-latest.args | 53 +++
.../memory-hotplug-virtio-mem.xml | 78 ++++
...ory-hotplug-virtio-pmem.x86_64-latest.args | 45 +++
.../memory-hotplug-virtio-pmem.xml | 54 +++
tests/qemuxml2argvtest.c | 2 +
...emory-hotplug-virtio-mem.x86_64-latest.xml | 1 +
...mory-hotplug-virtio-pmem.x86_64-latest.xml | 1 +
tests/qemuxml2xmltest.c | 3 +
tools/virsh-domain.c | 138 ++++++-
49 files changed, 1766 insertions(+), 394 deletions(-)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-virtio-mem.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-virtio-pmem.x86_64-latest.xml
--
2.26.2
4 years
[PATCH] qemu_monitor_json: Don't leak "option" in qemuMonitorJSONGetCommandLineOptions()
by Michal Privoznik
In recent commit of bf8bd93df0 (and friends) we switched the way
we process queried command line arguments: from string lists to
virJSONValue stored in a hash table. To achieve this
qemuMonitorJSONGetCommandLineOptions() helper was introduced
which executes the "query-command-line-options" monitor command
and then calls virJSONValueArrayForeachSteal() to process the
output. The array process function is also given
qemuMonitorJSONGetCommandLineOptionsWorker() as the callback
which is called over each item of the returned array. This
callback then steals "parameters" attribute of each array iteam
storing it in the hash table, but it leaves behind "option"
attribute (because it's g_strdup()-ed). After all of this, the
callback returns 0 which is a signal to the array processing
function that the callback took ownership of the array item. But
this is not true. While it removed "parameters" it did not take
the rest ("option" for instance). And therefore, it leads to a
memory leak:
5,347 (1,656 direct, 3,691 indirect) bytes in 69 blocks are definitely lost in loss record 2,752 of 2,794
at 0x483BEC5: calloc (vg_replace_malloc.c:760)
by 0x4E25A10: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.6400.5)
by 0x4943317: virJSONValueNewObject (virjson.c:569)
by 0x4945692: virJSONParserHandleStartMap (virjson.c:1768)
by 0x5825A86: yajl_do_parse (in /usr/lib64/libyajl.so.2.1.0)
by 0x4945BFA: virJSONValueFromString (virjson.c:1896)
by 0xAF5C115: qemuMonitorJSONIOProcessLine (qemu_monitor_json.c:224)
by 0xAF5C45E: qemuMonitorJSONIOProcess (qemu_monitor_json.c:279)
by 0xAF4BB6C: qemuMonitorIOProcess (qemu_monitor.c:342)
by 0xAF4C444: qemuMonitorIO (qemu_monitor.c:574)
by 0x4FEF846: socket_source_dispatch (in /usr/lib64/libgio-2.0.so.0.6400.5)
by 0x4E1F727: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6400.5)
The callback must return 1 so that the array item is properly
freed.
Fixes: ebeff6cd57d07c89d42e191ed0085a9dd89835c5
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_monitor_json.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 4db00e284a..8480338f46 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -6357,7 +6357,7 @@ qemuMonitorJSONGetCommandLineOptionsWorker(size_t pos G_GNUC_UNUSED,
g_hash_table_insert(options, g_strdup(name), parameters);
parameters = NULL;
- return 0;
+ return 1;
}
--
2.26.2
4 years