diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index abbf4bc8cd..51d74e89af 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7642,7 +7642,6 @@ static int
qemuBuildGraphicsSDLCommandLine(virQEMUDriverConfigPtr cfg G_GNUC_UNUSED,
virCommandPtr cmd,
virQEMUCapsPtr qemuCaps G_GNUC_UNUSED,
- virDomainDefPtr def,
virDomainGraphicsDefPtr graphics)
{
g_auto(virBuffer) opt = VIR_BUFFER_INITIALIZER;
@@ -7654,15 +7653,6 @@ qemuBuildGraphicsSDLCommandLine(virQEMUDriverConfigPtr cfg G_GNUC_UNUSED,
if (graphics->data.sdl.fullscreen)
virCommandAddArg(cmd, "-full-screen");
- if (def->naudios == 0) {
- /* If using SDL for video, then we should just let it
- * use QEMU's host audio drivers, possibly SDL too
- * User can set these two before starting libvirtd
- */
- virCommandAddEnvPass(cmd, "QEMU_AUDIO_DRV");
- virCommandAddEnvPass(cmd, "SDL_AUDIODRIVER");
- }
-
virCommandAddArg(cmd, "-display");
virBufferAddLit(&opt, "sdl");
@@ -7680,7 +7670,6 @@ static int
qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
virCommandPtr cmd,
virQEMUCapsPtr qemuCaps,
- virDomainDefPtr def,
virDomainGraphicsDefPtr graphics)
{
g_auto(virBuffer) opt = VIR_BUFFER_INITIALIZER;
@@ -7807,17 +7796,6 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
if (graphics->data.vnc.keymap)
virCommandAddArgList(cmd, "-k", graphics->data.vnc.keymap, NULL);
- if (def->naudios == 0) {
- /* Unless user requested it, set the audio backend to none, to
- * prevent it opening the host OS audio devices, since that causes
- * security issues and might not work when using VNC.
- */
- if (cfg->vncAllowHostAudio)
- virCommandAddEnvPass(cmd, "QEMU_AUDIO_DRV");
- else
- virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=none");
- }
-
return 0;
}
@@ -7825,7 +7803,6 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
static int
qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
virCommandPtr cmd,
- virDomainDefPtr def,
virDomainGraphicsDefPtr graphics)
{
g_auto(virBuffer) opt = VIR_BUFFER_INITIALIZER;
@@ -8024,13 +8001,6 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
virCommandAddArgList(cmd, "-k",
graphics->data.spice.keymap, NULL);
- if (def->naudios == 0) {
- /* SPICE includes native support for tunnelling audio, so we
- * set the audio backend to point at SPICE's own driver
- */
- virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=spice");
- }
-
return 0;
}
@@ -8071,19 +8041,19 @@ qemuBuildGraphicsCommandLine(virQEMUDriverConfigPtr cfg,
switch (graphics->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
if (qemuBuildGraphicsSDLCommandLine(cfg, cmd,
- qemuCaps, def, graphics) < 0)
+ qemuCaps, graphics) < 0)
return -1;
break;
case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
if (qemuBuildGraphicsVNCCommandLine(cfg, cmd,
- qemuCaps, def, graphics) < 0)
+ qemuCaps, graphics) < 0)
return -1;
break;
case VIR_DOMAIN_GRAPHICS_TYPE_SPICE:
if (qemuBuildGraphicsSPICECommandLine(cfg, cmd,
- def, graphics) < 0)
+ graphics) < 0)
return -1;
break;
@@ -10081,13 +10051,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
if (!def->ngraphics) {
virCommandAddArg(cmd, "-display");
virCommandAddArg(cmd, "none");
-
- if (def->naudios == 0) {
- if (cfg->nogfxAllowHostAudio)
- virCommandAddEnvPass(cmd, "QEMU_AUDIO_DRV");
- else
- virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=none");
- }
}
/* Disable global config files and default devices */
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 73e2473dce..df332ad870 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3573,9 +3573,112 @@ qemuDomainDefAddImplicitInputDevice(virDomainDef *def)
return 0;
}
+static int
+qemuDomainDefAddDefaultAudioBackend(virQEMUDriverPtr driver,
+ virDomainDefPtr def)
+{
+ size_t i;
+ bool addAudio = false;
+ bool audioPassthrough = false;
+ int audioBackend = VIR_DOMAIN_AUDIO_TYPE_NONE;
+ g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
+
+ if (def->naudios > 0) {
+ return 0;
+ }
+
+ for (i = 0; i < def->ngraphics; i++) {
+ virDomainGraphicsDefPtr graph = def->graphics[i];
+
+ switch ((virDomainGraphicsType)graph->type) {
+ case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
+ if (cfg->vncAllowHostAudio) {
+ audioPassthrough = true;
+ } else {
+ audioPassthrough = false;
+ audioBackend = VIR_DOMAIN_AUDIO_TYPE_NONE;
+ }
+ addAudio = true;
+ break;
+ case VIR_DOMAIN_GRAPHICS_TYPE_SPICE:
+ audioPassthrough = false;
+ audioBackend = VIR_DOMAIN_AUDIO_TYPE_SPICE;
+ addAudio = true;
+ break;
+ case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
+ audioPassthrough = true;
+ addAudio = true;
+ break;
+
+ case VIR_DOMAIN_GRAPHICS_TYPE_RDP:
+ case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP:
+ case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS:
+ break;
+ case VIR_DOMAIN_GRAPHICS_TYPE_LAST:
+ default:
+ virReportEnumRangeError(virDomainGraphicsType, graph->type);
+ return -1;
+ }
+ }
+
+ if (!def->ngraphics) {
+ if (cfg->nogfxAllowHostAudio) {
+ audioPassthrough = true;
+ } else {
+ audioPassthrough = false;
+ audioBackend = VIR_DOMAIN_AUDIO_TYPE_NONE;
+ }
+ addAudio = true;
+ }
+
+ if (addAudio && audioPassthrough) {
+ const char *audioenv = g_getenv("QEMU_AUDIO_DRV");
+ if (audioenv == NULL) {
+ addAudio = false;
+ } else {
+ /*
+ * QEMU audio driver names are mostly the same as
+ * libvirt XML audio backend names
+ */
+ if (STREQ(audioenv, "pa")) {
+ audioBackend = VIR_DOMAIN_AUDIO_TYPE_PULSEAUDIO;
+ } else {
+ if ((audioBackend = virDomainAudioTypeTypeFromString(audioenv)) < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unknown QEMU_AUDIO_DRV setting %s"), audioenv);
+ return -1;
+ }
+ }
+ }
+ }
+ if (addAudio) {
+ virDomainAudioDefPtr audio = g_new0(virDomainAudioDef, 1);
+
+ audio->type = audioBackend;
+ audio->id = 1;
+
+ def->naudios = 1;
+ def->audios = g_new0(virDomainAudioDefPtr, def->naudios);
+ def->audios[0] = audio;
+
+ if (audioBackend == VIR_DOMAIN_AUDIO_TYPE_SDL) {
+ const char *sdldriver = g_getenv("SDL_AUDIODRIVER");
+ if (sdldriver != NULL &&
+ ((audio->backend.sdl.driver =
+ virDomainAudioSDLDriverTypeFromString(sdldriver)) <= 0)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unknown SDL_AUDIODRIVER setting %s"), sdldriver);
+ return -1;
+ }
+ }
+ }
+
+ return 0;
+}
static int
-qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
+qemuDomainDefAddDefaultDevices(virQEMUDriverPtr driver,
+ virDomainDefPtr def,
virQEMUCapsPtr qemuCaps)
{
bool addDefaultUSB = true;
@@ -3827,6 +3930,9 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
}
}
+ if (qemuDomainDefAddDefaultAudioBackend(driver, def) < 0)
+ return -1;
+
return 0;
}
@@ -4419,7 +4525,7 @@ qemuDomainDefPostParse(virDomainDefPtr def,
qemuDomainNVRAMPathGenerate(cfg, def);
- if (qemuDomainDefAddDefaultDevices(def, qemuCaps) < 0)
+ if (qemuDomainDefAddDefaultDevices(driver, def, qemuCaps) < 0)
return -1;
if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
diff --git a/tests/qemudomaincheckpointxml2xmlout/redefine.xml b/tests/qemudomaincheckpointxml2xmlout/redefine.xml
index 524360fb4c..b7c9d9dc6c 100644
--- a/tests/qemudomaincheckpointxml2xmlout/redefine.xml
+++ b/tests/qemudomaincheckpointxml2xmlout/redefine.xml
@@ -57,6 +57,7 @@
+
diff --git a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml
index 12bc6d953e..24b41ba7c5 100644
--- a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml
+++ b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml
@@ -85,6 +85,7 @@
+
diff --git a/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml b/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml
index c165e1f81d..eae4691c1c 100644
--- a/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml
+++ b/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml
@@ -45,6 +45,7 @@
+
diff --git a/tests/qemudomainsnapshotxml2xmlout/full_domain.xml b/tests/qemudomainsnapshotxml2xmlout/full_domain.xml
index 080f6d50a3..1ddaa2a9aa 100644
--- a/tests/qemudomainsnapshotxml2xmlout/full_domain.xml
+++ b/tests/qemudomainsnapshotxml2xmlout/full_domain.xml
@@ -38,6 +38,7 @@
+
diff --git a/tests/qemudomainsnapshotxml2xmlout/metadata.xml b/tests/qemudomainsnapshotxml2xmlout/metadata.xml
index e5fa60819c..4b14c9efde 100644
--- a/tests/qemudomainsnapshotxml2xmlout/metadata.xml
+++ b/tests/qemudomainsnapshotxml2xmlout/metadata.xml
@@ -42,6 +42,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
index f80c4367df..690c85cf85 100644
--- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
@@ -57,6 +57,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
index 7998b978fb..58e156203f 100644
--- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
@@ -64,6 +64,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
index 2a48a97eef..d1e6329812 100644
--- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
@@ -57,6 +57,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
index 90518d1fa9..a119ae44d5 100644
--- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
@@ -64,6 +64,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
index 0d622fc8ae..a0358df432 100644
--- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
+++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
@@ -33,6 +33,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
index ed9deaea4a..a6c6c33a4b 100644
--- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
+++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
@@ -40,6 +40,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
index 342f172108..d16832b116 100644
--- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
+++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
@@ -33,6 +33,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
index b8341c74e5..5edb601297 100644
--- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
+++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
@@ -40,6 +40,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml
index 29da89f5bc..0c675c3db9 100644
--- a/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml
+++ b/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml
@@ -23,6 +23,7 @@
+
diff --git a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
index f81194db5b..5aca6ea5c5 100644
--- a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
+++ b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
@@ -30,6 +30,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
index 59c969e0f2..44f41c6ddd 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
index 6eadbdcd18..0988f8681c 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
@@ -54,6 +54,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
index 68561b50a3..b0151cd690 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
index 0900f3c8e3..0e8075caf6 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
@@ -53,6 +53,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
index 0900f3c8e3..0e8075caf6 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
@@ -53,6 +53,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
index 31979c40f0..240dda4c72 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
@@ -43,6 +43,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
index 844b951940..9a650e340e 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
@@ -34,6 +34,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-multipath.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-multipath.xml
index 40af064d10..caf1c06c2f 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-multipath.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-multipath.xml
@@ -56,6 +56,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml
index 035ec25304..ba99d0c2e4 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml
@@ -66,6 +66,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml
index dd65a48057..66302b3872 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml
@@ -54,6 +54,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
index c161e5b289..b462ad48e4 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
@@ -54,6 +54,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
index 299d595d6e..5b573f1915 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
@@ -54,6 +54,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+guestfwd.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+guestfwd.xml
index 8d7294123b..3bf64326c5 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+guestfwd.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+guestfwd.xml
@@ -49,6 +49,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml
index 40dcc33595..62366bee05 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml
index 066180bb3c..54e5dabdfa 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml
@@ -51,6 +51,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
index 8013264989..86b6ebe19a 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
index 0490310760..3a208a8244 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
index b1ba51b2d8..a0d7e3c704 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
@@ -50,6 +50,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
index 1fddd68a27..31bafb0814 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
index 76b573f25c..c9a2e90433 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml
index d46e20fa58..a02bc39663 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml
@@ -44,6 +44,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
index 5ee6ea25c3..0a04e2ac04 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
@@ -48,6 +48,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
index 72b5174825..f553229a31 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
@@ -58,6 +58,7 @@
+
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
index abe68a0a07..5d688e7748 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
@@ -119,6 +119,7 @@
+