We always place primary video device at first place, to make it easier
to create a qemu command or format an xml, but we should also set the
primary boolean for primary video device to 'true'.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 6 +++++-
src/qemu/qemu_command.c | 17 ++++++++++-------
.../qemuhotplug-console-compat-2+console-virtio.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-console-compat-2.xml | 2 +-
.../qemuxml2xmlout-graphics-listen-network.xml | 2 +-
.../qemuxml2xmlout-graphics-listen-network2.xml | 2 +-
.../qemuxml2xmlout-graphics-sdl-fullscreen.xml | 2 +-
.../qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl.xml | 2 +-
.../qemuxml2xmlout-graphics-spice-compression.xml | 2 +-
.../qemuxml2xmlout-graphics-spice-qxl-vga.xml | 2 +-
.../qemuxml2xmlout-graphics-spice-timeout.xml | 2 +-
.../qemuxml2xmlout-graphics-spice.xml | 2 +-
.../qemuxml2xmlout-graphics-vnc-sasl.xml | 2 +-
.../qemuxml2xmlout-graphics-vnc-tls.xml | 2 +-
.../qemuxml2xmlout-graphics-vnc-websocket.xml | 2 +-
.../qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc.xml | 2 +-
.../qemuxml2xmlout-interface-server.xml | 2 +-
.../qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml | 2 +-
.../qemuxml2xmlout-net-bandwidth2.xml | 2 +-
.../qemuxml2xmlout-pci-autoadd-addr.xml | 2 +-
.../qemuxml2xmlout-pci-autoadd-idx.xml | 2 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge.xml | 2 +-
.../qemuxml2xmlout-pcie-root-port.xml | 2 +-
.../qemuxml2xmlout-pcie-switch-downstream-port.xml | 2 +-
.../qemuxml2xmlout-pcie-switch-upstream-port.xml | 2 +-
.../qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml | 2 +-
.../qemuxml2xmlout-q35-usb2-multi.xml | 2 +-
.../qemuxml2xmlout-q35-usb2-reorder.xml | 2 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml | 2 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml | 2 +-
.../qemuxml2xmlout-seclabel-dynamic-none-relabel.xml | 2 +-
.../qemuxml2xmlout-serial-spiceport.xml | 2 +-
.../qemuxml2xmlout-video-virtio-gpu-device.xml | 2 +-
.../qemuxml2xmlout-video-virtio-gpu-virgl.xml | 2 +-
34 files changed, 47 insertions(+), 40 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3b15cb4..5e9c096 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11918,7 +11918,7 @@ virDomainVideoDefParseXML(xmlNodePtr node,
if ((primary = virXMLPropString(cur, "primary")) != NULL) {
if (STREQ(primary, "yes"))
- def->primary = 1;
+ def->primary = true;
VIR_FREE(primary);
}
@@ -16060,6 +16060,10 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
}
}
+ /* if not specified by user mark the first video as primary */
+ if (n && !primaryVideo)
+ def->videos[0]->primary = true;
+
VIR_FREE(nodes);
/* For backwards compatibility, if no <video> tag is set but there
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 854e51c..20ebb64 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3280,13 +3280,12 @@ qemuBuildSoundCodecStr(virDomainSoundDefPtr sound,
static char *
qemuBuildDeviceVideoStr(virDomainDefPtr def,
virDomainVideoDefPtr video,
- virQEMUCapsPtr qemuCaps,
- bool primary)
+ virQEMUCapsPtr qemuCaps)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
const char *model;
- if (primary) {
+ if (video->primary) {
model = qemuDeviceVideoTypeToString(video->type);
if (!model || STREQ(model, "")) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@@ -3347,8 +3346,10 @@ qemuBuildDeviceVideoStr(virDomainDefPtr def,
virBufferAsprintf(&buf, ",vram_size=%u", video->vram *
1024);
}
- if ((primary && virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_VGA_VGAMEM)) ||
- (!primary && virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_VGAMEM))) {
+ if ((video->primary &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_VGA_VGAMEM)) ||
+ (!video->primary &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_VGAMEM))) {
/* QEMU accepts mebibytes for vgamem_mb. */
virBufferAsprintf(&buf, ",vgamem_mb=%u", video->vgamem /
1024);
}
@@ -8209,7 +8210,8 @@ qemuBuildCommandLine(virConnectPtr conn,
for (i = 0; i < def->nvideos; i++) {
char *str;
virCommandAddArg(cmd, "-device");
- if (!(str = qemuBuildDeviceVideoStr(def, def->videos[i], qemuCaps,
!i)))
+ if (!(str = qemuBuildDeviceVideoStr(def, def->videos[i],
+ qemuCaps)))
goto error;
virCommandAddArg(cmd, str);
@@ -8321,7 +8323,8 @@ qemuBuildCommandLine(virConnectPtr conn,
virCommandAddArg(cmd, "-device");
- if (!(str = qemuBuildDeviceVideoStr(def, def->videos[i],
qemuCaps, false)))
+ if (!(str = qemuBuildDeviceVideoStr(def, def->videos[i],
+ qemuCaps)))
goto error;
virCommandAddArg(cmd, str);
diff --git a/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
b/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
index d848677..a2796ec 100644
--- a/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
+++ b/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
@@ -91,7 +91,7 @@
<address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
</sound>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
index a7209b2..2ae104e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
@@ -88,7 +88,7 @@
<address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
</sound>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network.xml
index 599eda9..79f990c 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network.xml
@@ -32,7 +32,7 @@
<listen type='network' network='Bobsnetwork'/>
</graphics>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
index 8687a6b..a0831aa 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
@@ -33,7 +33,7 @@
<listen type='network' network='Bobsnetwork'/>
</graphics>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl-fullscreen.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl-fullscreen.xml
index cbf7a78..91bf3af 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl-fullscreen.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl-fullscreen.xml
@@ -31,7 +31,7 @@
<input type='keyboard' bus='ps2'/>
<graphics type='sdl' display=':0.1'
xauth='/root/.Xauthority' fullscreen='yes'/>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl.xml
index 536a0f7..3b31e59 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-sdl.xml
@@ -31,7 +31,7 @@
<input type='keyboard' bus='ps2'/>
<graphics type='sdl' display=':0.1'
xauth='/root/.Xauthority'/>
<video>
- <model type='vga' vram='16384' heads='1'/>
+ <model type='vga' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-compression.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-compression.xml
index e0419e1..dea1347 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-compression.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-compression.xml
@@ -37,7 +37,7 @@
<streaming mode='filter'/>
</graphics>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<video>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-qxl-vga.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-qxl-vga.xml
index 82a359d..a17fab2 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-qxl-vga.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-qxl-vga.xml
@@ -34,7 +34,7 @@
<channel name='inputs' mode='insecure'/>
</graphics>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<video>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
index 8a0711e..33b5465 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
@@ -82,7 +82,7 @@
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
</sound>
<video>
- <model type='vga' vram='16384' heads='1'/>
+ <model type='vga' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice.xml
index 38d3507..59ed507 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice.xml
@@ -41,7 +41,7 @@
<filetransfer enable='no'/>
</graphics>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<video>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-sasl.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-sasl.xml
index 7146529..f29abe2 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-sasl.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-sasl.xml
@@ -33,7 +33,7 @@
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-tls.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-tls.xml
index 7146529..f29abe2 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-tls.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-tls.xml
@@ -33,7 +33,7 @@
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-websocket.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-websocket.xml
index 3f23c79..6e879eb 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-websocket.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-websocket.xml
@@ -24,7 +24,7 @@
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc.xml
index 73d3b1b..0627bbd 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc.xml
@@ -33,7 +33,7 @@
<listen type='address' address='2001:1:2:3:4:5:1234:1234'/>
</graphics>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
index a92aff4..9bc610b 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
@@ -124,7 +124,7 @@
<address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
</sound>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
index 7dc55e0..b9c9015 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
@@ -68,7 +68,7 @@
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
</sound>
<video>
- <model type='vga' vram='16384' heads='1'/>
+ <model type='vga' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
index 46e5d61..411b409 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
@@ -57,7 +57,7 @@
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
</sound>
<video>
- <model type='vga' vram='16384' heads='1'/>
+ <model type='vga' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-addr.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-addr.xml
index b4d6a41..0ee137f 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-addr.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-addr.xml
@@ -71,7 +71,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-idx.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-idx.xml
index 8ca1e39..692025e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-idx.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-autoadd-idx.xml
@@ -76,7 +76,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge.xml
index 3958ab3..61de009 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge.xml
@@ -241,7 +241,7 @@
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
- <model type='cirrus' vram='16384' heads='1'/>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml
index cb1c60f..ea61bcf 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml
@@ -45,7 +45,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml
index 8f0e5ac..22cfeaa 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml
@@ -83,7 +83,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml
index 79c0304..813ba97 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml
@@ -53,7 +53,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml
index 0845413..7e9a366 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml
@@ -37,7 +37,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-multi.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-multi.xml
index 04cf91e..35e8fed 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-multi.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-multi.xml
@@ -80,7 +80,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-reorder.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-reorder.xml
index eef74d7..914c7f8 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-reorder.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-reorder.xml
@@ -80,7 +80,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml
index 19729cc..3fd2c0e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml
@@ -50,7 +50,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml
index 19729cc..3fd2c0e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml
@@ -50,7 +50,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-dynamic-none-relabel.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-dynamic-none-relabel.xml
index 1b36533..050967b 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-dynamic-none-relabel.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-dynamic-none-relabel.xml
@@ -42,7 +42,7 @@
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
- <model type='cirrus' vram='8192' heads='1'/>
+ <model type='cirrus' vram='8192' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
index 5808960..5b18cac 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
@@ -41,7 +41,7 @@
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
- <model type='qxl' ram='65536' vram='65536'
vgamem='8192' heads='1'/>
+ <model type='qxl' ram='65536' vram='65536'
vgamem='8192' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-device.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-device.xml
index 726c0d3..a17b86e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-device.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-device.xml
@@ -30,7 +30,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='virtio' heads='1'/>
+ <model type='virtio' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-virgl.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-virgl.xml
index 3655a39..8ec0d1a 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-virgl.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-video-virtio-gpu-virgl.xml
@@ -30,7 +30,7 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<video>
- <model type='virtio' heads='1'>
+ <model type='virtio' heads='1' primary='yes'>
<acceleration accel3d='yes'/>
</model>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
--
2.7.1