[libvirt] [PATCH 0/4] tests: Tweaks and updates to *-headless and *-graphics

*** BLURBY MCBLURBFACE *** Andrea Bolognani (4): tests: Normalize quotes for *-graphics tests: Update *-headless and *-graphics tests: Add riscv64-virt-graphics tests: Enable *-headless and *-graphics in qemuxml2xml .../aarch64-virt-graphics.aarch64-latest.args | 6 +- .../aarch64-virt-graphics.xml | 52 ++++---- .../aarch64-virt-headless.aarch64-latest.args | 21 +-- .../aarch64-virt-headless.xml | 22 +++- .../ppc64-pseries-graphics.xml | 49 +++---- .../ppc64-pseries-headless.ppc64-latest.args | 8 +- .../ppc64-pseries-headless.xml | 18 ++- ...riscv64-virt-graphics.riscv64-latest.args} | 18 ++- .../riscv64-virt-graphics.xml | 45 +++++++ .../riscv64-virt-headless.riscv64-latest.args | 16 ++- .../riscv64-virt-headless.xml | 18 ++- .../s390x-ccw-graphics.s390x-latest.args | 6 +- tests/qemuxml2argvdata/s390x-ccw-graphics.xml | 49 +++---- .../s390x-ccw-headless.s390x-latest.args | 12 +- tests/qemuxml2argvdata/s390x-ccw-headless.xml | 21 ++- tests/qemuxml2argvdata/x86_64-pc-graphics.xml | 57 +++++---- .../x86_64-pc-headless.x86_64-latest.args | 23 ++-- tests/qemuxml2argvdata/x86_64-pc-headless.xml | 30 ++++- .../qemuxml2argvdata/x86_64-q35-graphics.xml | 57 +++++---- .../x86_64-q35-headless.x86_64-latest.args | 15 ++- .../qemuxml2argvdata/x86_64-q35-headless.xml | 30 ++++- tests/qemuxml2argvtest.c | 1 + .../aarch64-virt-graphics.aarch64-latest.xml | 115 +++++++++++++++++ .../aarch64-virt-headless.aarch64-latest.xml | 101 +++++++++++++++ .../ppc64-pseries-graphics.ppc64-latest.xml | 75 +++++++++++ .../ppc64-pseries-headless.ppc64-latest.xml | 66 ++++++++++ .../riscv64-virt-graphics.riscv64-latest.xml | 109 ++++++++++++++++ .../riscv64-virt-headless.riscv64-latest.xml | 95 ++++++++++++++ .../s390x-ccw-graphics.s390x-latest.xml | 66 ++++++++++ .../s390x-ccw-headless.s390x-latest.xml | 53 ++++++++ .../x86_64-pc-graphics.x86_64-latest.xml | 82 ++++++++++++ .../x86_64-pc-headless.x86_64-latest.xml | 74 +++++++++++ .../x86_64-q35-graphics.x86_64-latest.xml | 120 ++++++++++++++++++ .../x86_64-q35-headless.x86_64-latest.xml | 112 ++++++++++++++++ tests/qemuxml2xmltest.c | 16 +++ 35 files changed, 1448 insertions(+), 210 deletions(-) copy tests/qemuxml2argvdata/{aarch64-virt-graphics.aarch64-latest.args => riscv64-virt-graphics.riscv64-latest.args} (79%) create mode 100644 tests/qemuxml2argvdata/riscv64-virt-graphics.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/ppc64-pseries-graphics.ppc64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/ppc64-pseries-headless.ppc64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt-graphics.riscv64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt-headless.riscv64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml create mode 100644 tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-pc-graphics.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-pc-headless.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml -- 2.21.0

Right now *-headless and *-graphics tests are using different quoting styles, which results in the diff between them being basically useless, whereas we would like it to be possible to compare these files directly and easily spot the differences. Convert all *-graphics tests to single quotes, which is the overwhelmingly more popular style and also the one libvirt itself uses when formatting XML, which is a fact that will come in handy later. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../aarch64-virt-graphics.xml | 50 ++++++++--------- .../ppc64-pseries-graphics.xml | 48 ++++++++-------- tests/qemuxml2argvdata/s390x-ccw-graphics.xml | 46 +++++++-------- tests/qemuxml2argvdata/x86_64-pc-graphics.xml | 56 +++++++++---------- .../qemuxml2argvdata/x86_64-q35-graphics.xml | 56 +++++++++---------- 5 files changed, 128 insertions(+), 128 deletions(-) diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml index 0748b8da2d..54cfea634c 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml +++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml @@ -1,49 +1,49 @@ -<domain type="qemu"> +<domain type='qemu'> <name>guest</name> <uuid>33844184-97c0-4cc0-aa7d-206f5803530b</uuid> <metadata> - <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> - <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> </libosinfo:libosinfo> </metadata> <memory>4194304</memory> <currentMemory>4194304</currentMemory> <vcpu>4</vcpu> <os> - <type arch="aarch64" machine="virt">hvm</type> - <loader readonly="yes" type="pflash">/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> - <boot dev="hd"/> + <boot dev='hd'/> </os> <features> <acpi/> </features> - <clock offset="utc"/> + <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> - <disk type="file" device="disk"> - <driver name="qemu" type="qcow2"/> - <source file="/var/lib/libvirt/images/guest.qcow2"/> - <target dev="vda" bus="virtio"/> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> </disk> - <controller type="usb" index="0" model="qemu-xhci" ports="15"/> - <interface type="user"> - <mac address="52:54:00:53:45:a5"/> - <model type="virtio"/> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> + <interface type='user'> + <mac address='52:54:00:53:45:a5'/> + <model type='virtio'/> </interface> - <console type="pty"/> - <channel type="unix"> - <source mode="bind"/> - <target type="virtio" name="org.qemu.guest_agent.0"/> + <console type='pty'/> + <channel type='unix'> + <source mode='bind'/> + <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> - <input type="tablet" bus="usb"/> - <input type="keyboard" bus="usb"/> - <graphics type="vnc" port="-1"/> + <input type='tablet' bus='usb'/> + <input type='keyboard' bus='usb'/> + <graphics type='vnc' port='-1'/> <video> - <model type="virtio"/> + <model type='virtio'/> </video> - <rng model="virtio"> - <backend model="random">/dev/urandom</backend> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml b/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml index 3d54a4f171..c4ef08b2bf 100644 --- a/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml +++ b/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml @@ -1,44 +1,44 @@ -<domain type="qemu"> +<domain type='qemu'> <name>guest</name> <uuid>b35969f7-e7cf-4d90-a9a0-4dd9000f9824</uuid> <metadata> - <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> - <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> </libosinfo:libosinfo> </metadata> <memory>4194304</memory> <currentMemory>4194304</currentMemory> <vcpu>4</vcpu> <os> - <type arch="ppc64le" machine="pseries">hvm</type> - <boot dev="hd"/> + <type arch='ppc64le' machine='pseries'>hvm</type> + <boot dev='hd'/> </os> - <clock offset="utc"/> + <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <disk type="file" device="disk"> - <driver name="qemu" type="qcow2"/> - <source file="/var/lib/libvirt/images/guest.qcow2"/> - <target dev="vda" bus="virtio"/> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> </disk> - <controller type="usb" index="0" model="qemu-xhci" ports="15"/> - <interface type="user"> - <mac address="52:54:00:a2:44:92"/> - <model type="virtio"/> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> + <interface type='user'> + <mac address='52:54:00:a2:44:92'/> + <model type='virtio'/> </interface> - <console type="pty"/> - <channel type="unix"> - <source mode="bind"/> - <target type="virtio" name="org.qemu.guest_agent.0"/> + <console type='pty'/> + <channel type='unix'> + <source mode='bind'/> + <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> - <input type="tablet" bus="usb"/> - <input type="keyboard" bus="usb"/> - <graphics type="vnc" port="-1"/> + <input type='tablet' bus='usb'/> + <input type='keyboard' bus='usb'/> + <graphics type='vnc' port='-1'/> <video> - <model type="vga"/> + <model type='vga'/> </video> - <rng model="virtio"> - <backend model="random">/dev/urandom</backend> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/s390x-ccw-graphics.xml b/tests/qemuxml2argvdata/s390x-ccw-graphics.xml index 3f54fdf9bd..a9bb3485db 100644 --- a/tests/qemuxml2argvdata/s390x-ccw-graphics.xml +++ b/tests/qemuxml2argvdata/s390x-ccw-graphics.xml @@ -1,43 +1,43 @@ -<domain type="qemu"> +<domain type='qemu'> <name>guest</name> <uuid>a7ca230a-fbe0-48b8-8ea6-25836f8cbc32</uuid> <metadata> - <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> - <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> </libosinfo:libosinfo> </metadata> <memory>4194304</memory> <currentMemory>4194304</currentMemory> <vcpu>4</vcpu> <os> - <type arch="s390x" machine="s390-ccw">hvm</type> - <boot dev="hd"/> + <type arch='s390x' machine='s390-ccw'>hvm</type> + <boot dev='hd'/> </os> - <clock offset="utc"/> + <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-s390x</emulator> - <disk type="file" device="disk"> - <driver name="qemu" type="qcow2"/> - <source file="/var/lib/libvirt/images/guest.qcow2"/> - <target dev="vda" bus="virtio"/> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> </disk> - <interface type="user"> - <mac address="52:54:00:09:1a:29"/> - <model type="virtio"/> + <interface type='user'> + <mac address='52:54:00:09:1a:29'/> + <model type='virtio'/> </interface> - <console type="pty"/> - <channel type="unix"> - <source mode="bind"/> - <target type="virtio" name="org.qemu.guest_agent.0"/> + <console type='pty'/> + <channel type='unix'> + <source mode='bind'/> + <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> - <input type="tablet" bus="virtio"/> - <input type="keyboard" bus="virtio"/> - <graphics type="vnc" port="-1"/> + <input type='tablet' bus='virtio'/> + <input type='keyboard' bus='virtio'/> + <graphics type='vnc' port='-1'/> <video> - <model type="virtio"/> + <model type='virtio'/> </video> - <rng model="virtio"> - <backend model="random">/dev/urandom</backend> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/x86_64-pc-graphics.xml b/tests/qemuxml2argvdata/x86_64-pc-graphics.xml index 03745eabf4..3c7dbc9438 100644 --- a/tests/qemuxml2argvdata/x86_64-pc-graphics.xml +++ b/tests/qemuxml2argvdata/x86_64-pc-graphics.xml @@ -1,55 +1,55 @@ -<domain type="qemu"> +<domain type='qemu'> <name>guest</name> <uuid>2c0abd3d-8f18-42c0-a132-9708213aaac9</uuid> <metadata> - <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> - <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> </libosinfo:libosinfo> </metadata> <memory>4194304</memory> <currentMemory>4194304</currentMemory> <vcpu>4</vcpu> <os> - <type arch="x86_64" machine="pc">hvm</type> - <boot dev="hd"/> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> - <clock offset="utc"> - <timer name="rtc" tickpolicy="catchup"/> - <timer name="pit" tickpolicy="delay"/> - <timer name="hpet" present="no"/> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> </clock> <pm> - <suspend-to-mem enabled="no"/> - <suspend-to-disk enabled="no"/> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <disk type="file" device="disk"> - <driver name="qemu" type="qcow2"/> - <source file="/var/lib/libvirt/images/guest.qcow2"/> - <target dev="vda" bus="virtio"/> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> </disk> - <controller type="usb" index="0" model="qemu-xhci" ports="15"/> - <interface type="user"> - <mac address="52:54:00:4c:e3:86"/> - <model type="virtio"/> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> + <interface type='user'> + <mac address='52:54:00:4c:e3:86'/> + <model type='virtio'/> </interface> - <console type="pty"/> - <channel type="unix"> - <source mode="bind"/> - <target type="virtio" name="org.qemu.guest_agent.0"/> + <console type='pty'/> + <channel type='unix'> + <source mode='bind'/> + <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> - <input type="tablet" bus="usb"/> - <graphics type="vnc" port="-1"/> + <input type='tablet' bus='usb'/> + <graphics type='vnc' port='-1'/> <video> - <model type="qxl"/> + <model type='qxl'/> </video> - <rng model="virtio"> - <backend model="random">/dev/urandom</backend> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/x86_64-q35-graphics.xml b/tests/qemuxml2argvdata/x86_64-q35-graphics.xml index 56db898e64..d3ad87c963 100644 --- a/tests/qemuxml2argvdata/x86_64-q35-graphics.xml +++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.xml @@ -1,55 +1,55 @@ -<domain type="qemu"> +<domain type='qemu'> <name>guest</name> <uuid>61288c03-0b0d-4f1e-9496-0f0256f2e013</uuid> <metadata> - <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> - <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> </libosinfo:libosinfo> </metadata> <memory>4194304</memory> <currentMemory>4194304</currentMemory> <vcpu>4</vcpu> <os> - <type arch="x86_64" machine="q35">hvm</type> - <boot dev="hd"/> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> - <clock offset="utc"> - <timer name="rtc" tickpolicy="catchup"/> - <timer name="pit" tickpolicy="delay"/> - <timer name="hpet" present="no"/> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> </clock> <pm> - <suspend-to-mem enabled="no"/> - <suspend-to-disk enabled="no"/> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <disk type="file" device="disk"> - <driver name="qemu" type="qcow2"/> - <source file="/var/lib/libvirt/images/guest.qcow2"/> - <target dev="vda" bus="virtio"/> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> </disk> - <controller type="usb" index="0" model="qemu-xhci" ports="15"/> - <interface type="user"> - <mac address="52:54:00:d2:70:0b"/> - <model type="virtio"/> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> + <interface type='user'> + <mac address='52:54:00:d2:70:0b'/> + <model type='virtio'/> </interface> - <console type="pty"/> - <channel type="unix"> - <source mode="bind"/> - <target type="virtio" name="org.qemu.guest_agent.0"/> + <console type='pty'/> + <channel type='unix'> + <source mode='bind'/> + <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> - <input type="tablet" bus="usb"/> - <graphics type="vnc" port="-1"/> + <input type='tablet' bus='usb'/> + <graphics type='vnc' port='-1'/> <video> - <model type="qxl"/> + <model type='qxl'/> </video> - <rng model="virtio"> - <backend model="random">/dev/urandom</backend> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> -- 2.21.0

On Fri, Jun 14, 2019 at 10:04:36AM +0200, Andrea Bolognani wrote:
Right now *-headless and *-graphics tests are using different quoting styles, which results in the diff between them being basically useless, whereas we would like it to be possible to compare these files directly and easily spot the differences.
Convert all *-graphics tests to single quotes, which is the overwhelmingly more popular style
Irrelevant.
and also the one libvirt itself uses when formatting XML,
This is the argument worth mentioning.
which is a fact that will come in handy later.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../aarch64-virt-graphics.xml | 50 ++++++++--------- .../ppc64-pseries-graphics.xml | 48 ++++++++-------- tests/qemuxml2argvdata/s390x-ccw-graphics.xml | 46 +++++++-------- tests/qemuxml2argvdata/x86_64-pc-graphics.xml | 56 +++++++++---------- .../qemuxml2argvdata/x86_64-q35-graphics.xml | 56 +++++++++---------- 5 files changed, 128 insertions(+), 128 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Use the latest virt-manager to regenerate the files. The command line is once again along the lines of $ virt-install \ --name guest --os-variant fedora29 \ --vcpus 4 --memory 4096 --disk size=5 \ --graphics (none|vnc) \ --print-xml with some minor tweaks performed afterwards. This removes a number of inconsistencies between the files, and makes it so the only differences are actually relevant either to the architecture and machine type at hand, or to having graphics rather than being headless. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../aarch64-virt-graphics.aarch64-latest.args | 6 ++-- .../aarch64-virt-graphics.xml | 2 +- .../aarch64-virt-headless.aarch64-latest.args | 21 ++++++++----- .../aarch64-virt-headless.xml | 22 +++++++++++--- .../ppc64-pseries-graphics.xml | 3 +- .../ppc64-pseries-headless.ppc64-latest.args | 8 ++--- .../ppc64-pseries-headless.xml | 18 ++++++++--- .../riscv64-virt-headless.riscv64-latest.args | 16 +++++----- .../riscv64-virt-headless.xml | 18 ++++++++--- .../s390x-ccw-graphics.s390x-latest.args | 6 ++-- tests/qemuxml2argvdata/s390x-ccw-graphics.xml | 7 +++-- .../s390x-ccw-headless.s390x-latest.args | 12 ++++---- tests/qemuxml2argvdata/s390x-ccw-headless.xml | 21 +++++++++---- tests/qemuxml2argvdata/x86_64-pc-graphics.xml | 1 + .../x86_64-pc-headless.x86_64-latest.args | 23 +++++++------- tests/qemuxml2argvdata/x86_64-pc-headless.xml | 30 ++++++++++++++++--- .../qemuxml2argvdata/x86_64-q35-graphics.xml | 1 + .../x86_64-q35-headless.x86_64-latest.args | 15 ++++++---- .../qemuxml2argvdata/x86_64-q35-headless.xml | 30 ++++++++++++++++--- 19 files changed, 185 insertions(+), 75 deletions(-) diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args index 7f18f5e9e8..129fac5838 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args +++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args @@ -36,6 +36,7 @@ addr=0x1 \ -device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \ -device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ -device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \ +-device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \ -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \ -drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ @@ -53,9 +54,10 @@ id=channel0,name=org.qemu.guest_agent.0 \ -device usb-tablet,id=input0,bus=usb.0,port=1 \ -device usb-kbd,id=input1,bus=usb.0,port=2 \ -vnc 127.0.0.1:0 \ --device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.6,addr=0x0 \ +-device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.7,addr=0x0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.5,addr=0x0 \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml index 54cfea634c..490eb45daf 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml +++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml @@ -12,7 +12,6 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> - <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features> @@ -42,6 +41,7 @@ <video> <model type='virtio'/> </video> + <memballoon model='virtio'/> <rng model='virtio'> <backend model='random'>/dev/urandom</backend> </rng> diff --git a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args index cc1189031a..b4947f9b0f 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args +++ b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args @@ -13,9 +13,13 @@ QEMU_AUDIO_DRV=none \ -object secret,id=masterKey0,format=raw,\ file=/tmp/lib/domain--1-guest/master-key.aes \ -machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2 \ --m 1024 \ +-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,\ +readonly=on \ +-drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,\ +unit=1 \ +-m 4096 \ -overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ +-smp 4,sockets=4,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ -display none \ -no-user-config \ @@ -24,7 +28,6 @@ file=/tmp/lib/domain--1-guest/master-key.aes \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ --no-acpi \ -boot strict=on \ -device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ addr=0x1 \ @@ -33,10 +36,12 @@ addr=0x1 \ -device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \ -device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \ -device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ --device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \ +-device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \ +-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \ +-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \ -drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.3,addr=0x0,drive=drive-virtio-disk0,\ +-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,\ id=virtio-disk0,bootindex=1 \ -netdev user,id=hostnet0 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.1,\ @@ -46,9 +51,9 @@ addr=0x0 \ -chardev socket,id=charchannel0,fd=1729,server,nowait \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ id=channel0,name=org.qemu.guest_agent.0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \ --object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.5,addr=0x0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \ +-object rng-random,id=objrng0,filename=/dev/urandom \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-virt-headless.xml b/tests/qemuxml2argvdata/aarch64-virt-headless.xml index ec9ce78c91..2ed7d9a904 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-headless.xml +++ b/tests/qemuxml2argvdata/aarch64-virt-headless.xml @@ -1,11 +1,23 @@ <domain type='qemu'> <name>guest</name> <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> - <memory unit='KiB'>1048576</memory> - <vcpu placement='static'>1</vcpu> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> + </libosinfo:libosinfo> + </metadata> + <memory>4194304</memory> + <currentMemory>4194304</currentMemory> + <vcpu>4</vcpu> <os> <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <boot dev='hd'/> </os> + <features> + <acpi/> + </features> + <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <disk type='file' device='disk'> @@ -13,17 +25,19 @@ <source file='/var/lib/libvirt/images/guest.qcow2'/> <target dev='vda' bus='virtio'/> </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> </interface> - <serial type='pty'/> + <console type='pty'/> <channel type='unix'> + <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> <memballoon model='virtio'/> <rng model='virtio'> - <backend model='random'/> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml b/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml index c4ef08b2bf..2ba16813de 100644 --- a/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml +++ b/tests/qemuxml2argvdata/ppc64-pseries-graphics.xml @@ -10,7 +10,7 @@ <currentMemory>4194304</currentMemory> <vcpu>4</vcpu> <os> - <type arch='ppc64le' machine='pseries'>hvm</type> + <type arch='ppc64' machine='pseries'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -37,6 +37,7 @@ <video> <model type='vga'/> </video> + <memballoon model='virtio'/> <rng model='virtio'> <backend model='random'>/dev/urandom</backend> </rng> diff --git a/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args b/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args index c84443c97f..821c6976f0 100644 --- a/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args +++ b/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args @@ -13,9 +13,9 @@ QEMU_AUDIO_DRV=none \ -object secret,id=masterKey0,format=raw,\ file=/tmp/lib/domain--1-guest/master-key.aes \ -machine pseries,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ +-m 4096 \ -overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ +-smp 4,sockets=4,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ -display none \ -no-user-config \ @@ -25,7 +25,7 @@ file=/tmp/lib/domain--1-guest/master-key.aes \ -rtc base=utc \ -no-shutdown \ -boot strict=on \ --device pci-ohci,id=usb,bus=pci.0,addr=0x2 \ +-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.0,addr=0x2 \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 \ -drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ id=drive-virtio-disk0 \ @@ -40,7 +40,7 @@ addr=0x1 \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ id=channel0,name=org.qemu.guest_agent.0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 \ --object rng-random,id=objrng0,filename=/dev/random \ +-object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x6 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/ppc64-pseries-headless.xml b/tests/qemuxml2argvdata/ppc64-pseries-headless.xml index b94d47d9d4..ca91240903 100644 --- a/tests/qemuxml2argvdata/ppc64-pseries-headless.xml +++ b/tests/qemuxml2argvdata/ppc64-pseries-headless.xml @@ -1,11 +1,19 @@ <domain type='qemu'> <name>guest</name> <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> - <memory unit='KiB'>1048576</memory> - <vcpu placement='static'>1</vcpu> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> + </libosinfo:libosinfo> + </metadata> + <memory>4194304</memory> + <currentMemory>4194304</currentMemory> + <vcpu>4</vcpu> <os> <type arch='ppc64' machine='pseries'>hvm</type> + <boot dev='hd'/> </os> + <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> <disk type='file' device='disk'> @@ -13,17 +21,19 @@ <source file='/var/lib/libvirt/images/guest.qcow2'/> <target dev='vda' bus='virtio'/> </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> </interface> - <serial type='pty'/> + <console type='pty'/> <channel type='unix'> + <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> <memballoon model='virtio'/> <rng model='virtio'> - <backend model='random'/> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args index 42b1ffc568..9a595dc4ee 100644 --- a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args +++ b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args @@ -13,9 +13,9 @@ QEMU_AUDIO_DRV=none \ -object secret,id=masterKey0,format=raw,\ file=/tmp/lib/domain--1-guest/master-key.aes \ -machine virt,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ +-m 4096 \ -overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ +-smp 4,sockets=4,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ -display none \ -no-user-config \ @@ -32,10 +32,12 @@ addr=0x1 \ -device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \ -device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \ -device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ --device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \ +-device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \ +-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \ +-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \ -drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.3,addr=0x0,drive=drive-virtio-disk0,\ +-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,\ id=virtio-disk0,bootindex=1 \ -netdev user,id=hostnet0 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.1,\ @@ -45,9 +47,9 @@ addr=0x0 \ -chardev socket,id=charchannel0,fd=1729,server,nowait \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ id=channel0,name=org.qemu.guest_agent.0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \ --object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.5,addr=0x0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \ +-object rng-random,id=objrng0,filename=/dev/urandom \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/riscv64-virt-headless.xml b/tests/qemuxml2argvdata/riscv64-virt-headless.xml index 936f341da1..ff1e0903b1 100644 --- a/tests/qemuxml2argvdata/riscv64-virt-headless.xml +++ b/tests/qemuxml2argvdata/riscv64-virt-headless.xml @@ -1,11 +1,19 @@ <domain type='qemu'> <name>guest</name> <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> - <memory unit='KiB'>1048576</memory> - <vcpu placement='static'>1</vcpu> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> + </libosinfo:libosinfo> + </metadata> + <memory>4194304</memory> + <currentMemory>4194304</currentMemory> + <vcpu>4</vcpu> <os> <type arch='riscv64' machine='virt'>hvm</type> + <boot dev='hd'/> </os> + <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-riscv64</emulator> <disk type='file' device='disk'> @@ -13,17 +21,19 @@ <source file='/var/lib/libvirt/images/guest.qcow2'/> <target dev='vda' bus='virtio'/> </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> </interface> - <serial type='pty'/> + <console type='pty'/> <channel type='unix'> + <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> <memballoon model='virtio'/> <rng model='virtio'> - <backend model='random'/> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args b/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args index f33a66af68..64c11cd046 100644 --- a/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args +++ b/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args @@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ -object secret,id=masterKey0,format=raw,\ file=/tmp/lib/domain--1-guest/master-key.aes \ --machine s390-ccw,accel=tcg,usb=off,dump-guest-core=off \ +-machine s390-ccw-virtio,accel=tcg,usb=off,dump-guest-core=off \ -m 4096 \ -overcommit mem-lock=off \ -smp 4,sockets=4,cores=1,threads=1 \ @@ -32,11 +32,11 @@ id=virtio-disk0,bootindex=1 \ -netdev user,id=hostnet0 \ -device virtio-net-ccw,netdev=hostnet0,id=net0,mac=52:54:00:09:1a:29,\ devno=fe.0.0001 \ --chardev pty,id=charserial0 \ --device sclpconsole,chardev=charserial0,id=serial0 \ -chardev socket,id=charchannel0,fd=1729,server,nowait \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ id=channel0,name=org.qemu.guest_agent.0 \ +-chardev pty,id=charconsole0 \ +-device sclpconsole,chardev=charconsole0,id=console0 \ -device virtio-tablet-ccw,id=input0,devno=fe.0.0004 \ -device virtio-keyboard-ccw,id=input1,devno=fe.0.0005 \ -vnc 127.0.0.1:0 \ diff --git a/tests/qemuxml2argvdata/s390x-ccw-graphics.xml b/tests/qemuxml2argvdata/s390x-ccw-graphics.xml index a9bb3485db..46374c799e 100644 --- a/tests/qemuxml2argvdata/s390x-ccw-graphics.xml +++ b/tests/qemuxml2argvdata/s390x-ccw-graphics.xml @@ -10,7 +10,7 @@ <currentMemory>4194304</currentMemory> <vcpu>4</vcpu> <os> - <type arch='s390x' machine='s390-ccw'>hvm</type> + <type arch='s390x' machine='s390-ccw-virtio'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -25,7 +25,9 @@ <mac address='52:54:00:09:1a:29'/> <model type='virtio'/> </interface> - <console type='pty'/> + <console type='pty'> + <target type='sclp'/> + </console> <channel type='unix'> <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> @@ -36,6 +38,7 @@ <video> <model type='virtio'/> </video> + <memballoon model='virtio'/> <rng model='virtio'> <backend model='random'>/dev/urandom</backend> </rng> diff --git a/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args b/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args index aff73e929a..9b3723eff0 100644 --- a/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args +++ b/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args @@ -12,10 +12,10 @@ QEMU_AUDIO_DRV=none \ -S \ -object secret,id=masterKey0,format=raw,\ file=/tmp/lib/domain--1-guest/master-key.aes \ --machine s390-ccw,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ +-machine s390-ccw-virtio,accel=tcg,usb=off,dump-guest-core=off \ +-m 4096 \ -overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ +-smp 4,sockets=4,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ -display none \ -no-user-config \ @@ -33,13 +33,13 @@ id=virtio-disk0,bootindex=1 \ -netdev user,id=hostnet0 \ -device virtio-net-ccw,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,\ devno=fe.0.0001 \ --chardev pty,id=charserial0 \ --device sclpconsole,chardev=charserial0,id=serial0 \ -chardev socket,id=charchannel0,fd=1729,server,nowait \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ id=channel0,name=org.qemu.guest_agent.0 \ +-chardev pty,id=charconsole0 \ +-device sclpconsole,chardev=charconsole0,id=console0 \ -device virtio-balloon-ccw,id=balloon0,devno=fe.0.0003 \ --object rng-random,id=objrng0,filename=/dev/random \ +-object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-ccw,rng=objrng0,id=rng0,devno=fe.0.0004 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/s390x-ccw-headless.xml b/tests/qemuxml2argvdata/s390x-ccw-headless.xml index a8342ab3a7..70b61674c4 100644 --- a/tests/qemuxml2argvdata/s390x-ccw-headless.xml +++ b/tests/qemuxml2argvdata/s390x-ccw-headless.xml @@ -1,11 +1,19 @@ <domain type='qemu'> <name>guest</name> <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> - <memory unit='KiB'>1048576</memory> - <vcpu placement='static'>1</vcpu> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> + </libosinfo:libosinfo> + </metadata> + <memory>4194304</memory> + <currentMemory>4194304</currentMemory> + <vcpu>4</vcpu> <os> - <type arch='s390x' machine='s390-ccw'>hvm</type> + <type arch='s390x' machine='s390-ccw-virtio'>hvm</type> + <boot dev='hd'/> </os> + <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-s390x</emulator> <disk type='file' device='disk'> @@ -17,13 +25,16 @@ <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> </interface> - <serial type='pty'/> + <console type='pty'> + <target type='sclp'/> + </console> <channel type='unix'> + <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> <memballoon model='virtio'/> <rng model='virtio'> - <backend model='random'/> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/x86_64-pc-graphics.xml b/tests/qemuxml2argvdata/x86_64-pc-graphics.xml index 3c7dbc9438..add61e25c3 100644 --- a/tests/qemuxml2argvdata/x86_64-pc-graphics.xml +++ b/tests/qemuxml2argvdata/x86_64-pc-graphics.xml @@ -48,6 +48,7 @@ <video> <model type='qxl'/> </video> + <memballoon model='virtio'/> <rng model='virtio'> <backend model='random'>/dev/urandom</backend> </rng> diff --git a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args index 1af229afa2..cc33248272 100644 --- a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args @@ -13,24 +13,27 @@ QEMU_AUDIO_DRV=none \ -object secret,id=masterKey0,format=raw,\ file=/tmp/lib/domain--1-guest/master-key.aes \ -machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ +-m 4096 \ -overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ +-smp 4,sockets=4,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ -display none \ -no-user-config \ -nodefaults \ -chardev socket,id=charmonitor,fd=1729,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ +-rtc base=utc,driftfix=slew \ +-global kvm-pit.lost_tick_policy=delay \ +-no-hpet \ -no-shutdown \ --no-acpi \ +-global PIIX4_PM.disable_s3=1 \ +-global PIIX4_PM.disable_s4=1 \ -boot strict=on \ --device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ --device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 \ +-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.0,addr=0x3 \ +-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 \ -drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,\ id=virtio-disk0,bootindex=1 \ -netdev user,id=hostnet0 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.0,\ @@ -40,9 +43,9 @@ addr=0x2 \ -chardev socket,id=charchannel0,fd=1729,server,nowait \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ id=channel0,name=org.qemu.guest_agent.0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 \ --object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x6 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 \ +-object rng-random,id=objrng0,filename=/dev/urandom \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/x86_64-pc-headless.xml b/tests/qemuxml2argvdata/x86_64-pc-headless.xml index 2e8cd8b8ad..a40f09abdf 100644 --- a/tests/qemuxml2argvdata/x86_64-pc-headless.xml +++ b/tests/qemuxml2argvdata/x86_64-pc-headless.xml @@ -1,11 +1,31 @@ <domain type='qemu'> <name>guest</name> <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> - <memory unit='KiB'>1048576</memory> - <vcpu placement='static'>1</vcpu> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> + </libosinfo:libosinfo> + </metadata> + <memory>4194304</memory> + <currentMemory>4194304</currentMemory> + <vcpu>4</vcpu> <os> <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> </os> + <features> + <acpi/> + <apic/> + </features> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> @@ -13,17 +33,19 @@ <source file='/var/lib/libvirt/images/guest.qcow2'/> <target dev='vda' bus='virtio'/> </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> </interface> - <serial type='pty'/> + <console type='pty'/> <channel type='unix'> + <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> <memballoon model='virtio'/> <rng model='virtio'> - <backend model='random'/> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> diff --git a/tests/qemuxml2argvdata/x86_64-q35-graphics.xml b/tests/qemuxml2argvdata/x86_64-q35-graphics.xml index d3ad87c963..cf69f08546 100644 --- a/tests/qemuxml2argvdata/x86_64-q35-graphics.xml +++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.xml @@ -48,6 +48,7 @@ <video> <model type='qxl'/> </video> + <memballoon model='virtio'/> <rng model='virtio'> <backend model='random'>/dev/urandom</backend> </rng> diff --git a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args index 68b984f2ca..b3fb8d8340 100644 --- a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args @@ -13,18 +13,21 @@ QEMU_AUDIO_DRV=none \ -object secret,id=masterKey0,format=raw,\ file=/tmp/lib/domain--1-guest/master-key.aes \ -machine q35,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ +-m 4096 \ -overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ +-smp 4,sockets=4,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ -display none \ -no-user-config \ -nodefaults \ -chardev socket,id=charmonitor,fd=1729,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ +-rtc base=utc,driftfix=slew \ +-global kvm-pit.lost_tick_policy=delay \ +-no-hpet \ -no-shutdown \ --no-acpi \ +-global ICH9-LPC.disable_s3=1 \ +-global ICH9-LPC.disable_s4=1 \ -boot strict=on \ -device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ addr=0x1 \ @@ -34,7 +37,7 @@ addr=0x1 \ -device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \ -device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ -device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \ --device qemu-xhci,id=usb,bus=pci.2,addr=0x0 \ +-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \ -drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ id=drive-virtio-disk0 \ @@ -49,7 +52,7 @@ addr=0x0 \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ id=channel0,name=org.qemu.guest_agent.0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \ --object rng-random,id=objrng0,filename=/dev/random \ +-object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/x86_64-q35-headless.xml b/tests/qemuxml2argvdata/x86_64-q35-headless.xml index 445cc643d5..a92864bc00 100644 --- a/tests/qemuxml2argvdata/x86_64-q35-headless.xml +++ b/tests/qemuxml2argvdata/x86_64-q35-headless.xml @@ -1,11 +1,31 @@ <domain type='qemu'> <name>guest</name> <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> - <memory unit='KiB'>1048576</memory> - <vcpu placement='static'>1</vcpu> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> + </libosinfo:libosinfo> + </metadata> + <memory>4194304</memory> + <currentMemory>4194304</currentMemory> + <vcpu>4</vcpu> <os> <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> </os> + <features> + <acpi/> + <apic/> + </features> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> @@ -13,17 +33,19 @@ <source file='/var/lib/libvirt/images/guest.qcow2'/> <target dev='vda' bus='virtio'/> </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> </interface> - <serial type='pty'/> + <console type='pty'/> <channel type='unix'> + <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> <memballoon model='virtio'/> <rng model='virtio'> - <backend model='random'/> + <backend model='random'>/dev/urandom</backend> </rng> </devices> </domain> -- 2.21.0

On Fri, Jun 14, 2019 at 10:04:37AM +0200, Andrea Bolognani wrote:
Use the latest virt-manager to regenerate the files.
The command line is once again along the lines of
$ virt-install \ --name guest --os-variant fedora29 \ --vcpus 4 --memory 4096 --disk size=5 \ --graphics (none|vnc) \ --print-xml
with some minor tweaks performed afterwards.
This removes a number of inconsistencies between the files, and makes it so the only differences are actually relevant either to the architecture and machine type at hand, or to having graphics rather than being headless.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../aarch64-virt-graphics.aarch64-latest.args | 6 ++-- .../aarch64-virt-graphics.xml | 2 +- .../aarch64-virt-headless.aarch64-latest.args | 21 ++++++++----- .../aarch64-virt-headless.xml | 22 +++++++++++--- .../ppc64-pseries-graphics.xml | 3 +- .../ppc64-pseries-headless.ppc64-latest.args | 8 ++--- .../ppc64-pseries-headless.xml | 18 ++++++++--- .../riscv64-virt-headless.riscv64-latest.args | 16 +++++----- .../riscv64-virt-headless.xml | 18 ++++++++--- .../s390x-ccw-graphics.s390x-latest.args | 6 ++-- tests/qemuxml2argvdata/s390x-ccw-graphics.xml | 7 +++-- .../s390x-ccw-headless.s390x-latest.args | 12 ++++---- tests/qemuxml2argvdata/s390x-ccw-headless.xml | 21 +++++++++---- tests/qemuxml2argvdata/x86_64-pc-graphics.xml | 1 + .../x86_64-pc-headless.x86_64-latest.args | 23 +++++++------- tests/qemuxml2argvdata/x86_64-pc-headless.xml | 30 ++++++++++++++++--- .../qemuxml2argvdata/x86_64-q35-graphics.xml | 1 + .../x86_64-q35-headless.x86_64-latest.args | 15 ++++++---- .../qemuxml2argvdata/x86_64-q35-headless.xml | 30 ++++++++++++++++--- 19 files changed, 185 insertions(+), 75 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Support for this has only relatively recently been added to virt-manager. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../riscv64-virt-graphics.riscv64-latest.args | 59 +++++++++++++++++++ .../riscv64-virt-graphics.xml | 45 ++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 105 insertions(+) create mode 100644 tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args create mode 100644 tests/qemuxml2argvdata/riscv64-virt-graphics.xml diff --git a/tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args b/tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args new file mode 100644 index 0000000000..f8e2154f8f --- /dev/null +++ b/tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args @@ -0,0 +1,59 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-riscv64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-guest/master-key.aes \ +-machine virt,accel=tcg,usb=off,dump-guest-core=off \ +-m 4096 \ +-overcommit mem-lock=off \ +-smp 4,sockets=4,cores=1,threads=1 \ +-uuid 96bc2754-8842-4714-a45f-3f69e7a9a852 \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ +addr=0x1 \ +-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ +-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \ +-device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \ +-device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ +-device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \ +-device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \ +-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \ +-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \ +-drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ +id=drive-virtio-disk0 \ +-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=1 \ +-netdev user,id=hostnet0 \ +-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.1,\ +addr=0x0 \ +-chardev pty,id=charserial0 \ +-serial chardev:charserial0 \ +-chardev socket,id=charchannel0,fd=1729,server,nowait \ +-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ +id=channel0,name=org.qemu.guest_agent.0 \ +-device usb-tablet,id=input0,bus=usb.0,port=1 \ +-device usb-kbd,id=input1,bus=usb.0,port=2 \ +-vnc 127.0.0.1:0 \ +-device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.7,addr=0x0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \ +-object rng-random,id=objrng0,filename=/dev/urandom \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/riscv64-virt-graphics.xml b/tests/qemuxml2argvdata/riscv64-virt-graphics.xml new file mode 100644 index 0000000000..f0751ab222 --- /dev/null +++ b/tests/qemuxml2argvdata/riscv64-virt-graphics.xml @@ -0,0 +1,45 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>96bc2754-8842-4714-a45f-3f69e7a9a852</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'> + <libosinfo:os id='http://fedoraproject.org/fedora/29'/> + </libosinfo:libosinfo> + </metadata> + <memory>4194304</memory> + <currentMemory>4194304</currentMemory> + <vcpu>4</vcpu> + <os> + <type arch='riscv64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <devices> + <emulator>/usr/bin/qemu-system-riscv64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'/> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + </interface> + <console type='pty'/> + <channel type='unix'> + <source mode='bind'/> + <target type='virtio' name='org.qemu.guest_agent.0'/> + </channel> + <input type='tablet' bus='usb'/> + <input type='keyboard' bus='usb'/> + <graphics type='vnc' port='-1'/> + <video> + <model type='virtio'/> + </video> + <memballoon model='virtio'/> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 49220733ae..e8fd944bd2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2950,6 +2950,7 @@ mymain(void) /* Simple guests with graphics for various architectures */ DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-graphics", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-graphics", "ppc64"); + DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-graphics", "riscv64"); DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-graphics", "s390x"); DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-graphics", "x86_64"); DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-graphics", "x86_64"); -- 2.21.0

On Fri, Jun 14, 2019 at 10:04:38AM +0200, Andrea Bolognani wrote:
Support for this has only relatively recently been added to virt-manager.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../riscv64-virt-graphics.riscv64-latest.args | 59 +++++++++++++++++++ .../riscv64-virt-graphics.xml | 45 ++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 105 insertions(+) create mode 100644 tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args create mode 100644 tests/qemuxml2argvdata/riscv64-virt-graphics.xml
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

We didn't do this earlier because the DO_TEST_CAPS_ARCH_LATEST() macro was limited to qemuxml2argv until recently. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../aarch64-virt-graphics.aarch64-latest.xml | 115 +++++++++++++++++ .../aarch64-virt-headless.aarch64-latest.xml | 101 +++++++++++++++ .../ppc64-pseries-graphics.ppc64-latest.xml | 75 +++++++++++ .../ppc64-pseries-headless.ppc64-latest.xml | 66 ++++++++++ .../riscv64-virt-graphics.riscv64-latest.xml | 109 ++++++++++++++++ .../riscv64-virt-headless.riscv64-latest.xml | 95 ++++++++++++++ .../s390x-ccw-graphics.s390x-latest.xml | 66 ++++++++++ .../s390x-ccw-headless.s390x-latest.xml | 53 ++++++++ .../x86_64-pc-graphics.x86_64-latest.xml | 82 ++++++++++++ .../x86_64-pc-headless.x86_64-latest.xml | 74 +++++++++++ .../x86_64-q35-graphics.x86_64-latest.xml | 120 ++++++++++++++++++ .../x86_64-q35-headless.x86_64-latest.xml | 112 ++++++++++++++++ tests/qemuxml2xmltest.c | 16 +++ 13 files changed, 1084 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/ppc64-pseries-graphics.ppc64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/ppc64-pseries-headless.ppc64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt-graphics.riscv64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt-headless.riscv64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml create mode 100644 tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-pc-graphics.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-pc-headless.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml new file mode 100644 index 0000000000..bf55bdace5 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml @@ -0,0 +1,115 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>33844184-97c0-4cc0-aa7d-206f5803530b</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <gic version='2'/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0xa'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0xb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0xc'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/> + </controller> + <controller type='pci' index='6' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='6' port='0xd'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/> + </controller> + <controller type='pci' index='7' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='7' port='0xe'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/> + </controller> + <controller type='pci' index='8' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='8' port='0xf'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/> + </controller> + <interface type='user'> + <mac address='52:54:00:53:45:a5'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </interface> + <serial type='pty'> + <target type='system-serial' port='0'> + <model name='pl011'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='tablet' bus='usb'/> + <input type='keyboard' bus='usb'/> + <graphics type='vnc' port='-1' autoport='yes'> + <listen type='address'/> + </graphics> + <video> + <model type='virtio' heads='1' primary='yes'/> + <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml new file mode 100644 index 0000000000..75d86878a1 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml @@ -0,0 +1,101 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <gic version='2'/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0xa'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0xb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0xc'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/> + </controller> + <controller type='pci' index='6' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='6' port='0xd'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/> + </controller> + <controller type='pci' index='7' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='7' port='0xe'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </interface> + <serial type='pty'> + <target type='system-serial' port='0'> + <model name='pl011'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/ppc64-pseries-graphics.ppc64-latest.xml b/tests/qemuxml2xmloutdata/ppc64-pseries-graphics.ppc64-latest.xml new file mode 100644 index 0000000000..bbb1e33007 --- /dev/null +++ b/tests/qemuxml2xmloutdata/ppc64-pseries-graphics.ppc64-latest.xml @@ -0,0 +1,75 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>b35969f7-e7cf-4d90-a9a0-4dd9000f9824</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='ppc64' machine='pseries'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-ppc64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <model name='spapr-pci-host-bridge'/> + <target index='0'/> + </controller> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + <interface type='user'> + <mac address='52:54:00:a2:44:92'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </interface> + <serial type='pty'> + <target type='spapr-vio-serial' port='0'> + <model name='spapr-vty'/> + </target> + <address type='spapr-vio' reg='0x30000000'/> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + <address type='spapr-vio' reg='0x30000000'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='tablet' bus='usb'/> + <input type='keyboard' bus='usb'/> + <graphics type='vnc' port='-1' autoport='yes'> + <listen type='address'/> + </graphics> + <video> + <model type='vga' vram='16384' heads='1' primary='yes'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </rng> + <panic model='pseries'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/ppc64-pseries-headless.ppc64-latest.xml b/tests/qemuxml2xmloutdata/ppc64-pseries-headless.ppc64-latest.xml new file mode 100644 index 0000000000..8634f8ae3c --- /dev/null +++ b/tests/qemuxml2xmloutdata/ppc64-pseries-headless.ppc64-latest.xml @@ -0,0 +1,66 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='ppc64' machine='pseries'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-ppc64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <model name='spapr-pci-host-bridge'/> + <target index='0'/> + </controller> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </interface> + <serial type='pty'> + <target type='spapr-vio-serial' port='0'> + <model name='spapr-vty'/> + </target> + <address type='spapr-vio' reg='0x30000000'/> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + <address type='spapr-vio' reg='0x30000000'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </rng> + <panic model='pseries'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/riscv64-virt-graphics.riscv64-latest.xml b/tests/qemuxml2xmloutdata/riscv64-virt-graphics.riscv64-latest.xml new file mode 100644 index 0000000000..c51ddd8f83 --- /dev/null +++ b/tests/qemuxml2xmloutdata/riscv64-virt-graphics.riscv64-latest.xml @@ -0,0 +1,109 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>96bc2754-8842-4714-a45f-3f69e7a9a852</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='riscv64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-riscv64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0xa'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0xb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0xc'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/> + </controller> + <controller type='pci' index='6' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='6' port='0xd'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/> + </controller> + <controller type='pci' index='7' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='7' port='0xe'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/> + </controller> + <controller type='pci' index='8' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='8' port='0xf'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </interface> + <serial type='pty'> + <target type='system-serial' port='0'> + <model name='16550a'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='tablet' bus='usb'/> + <input type='keyboard' bus='usb'/> + <graphics type='vnc' port='-1' autoport='yes'> + <listen type='address'/> + </graphics> + <video> + <model type='virtio' heads='1' primary='yes'/> + <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/riscv64-virt-headless.riscv64-latest.xml b/tests/qemuxml2xmloutdata/riscv64-virt-headless.riscv64-latest.xml new file mode 100644 index 0000000000..5e09ea3c6f --- /dev/null +++ b/tests/qemuxml2xmloutdata/riscv64-virt-headless.riscv64-latest.xml @@ -0,0 +1,95 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='riscv64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-riscv64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0xa'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0xb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0xc'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/> + </controller> + <controller type='pci' index='6' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='6' port='0xd'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/> + </controller> + <controller type='pci' index='7' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='7' port='0xe'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </interface> + <serial type='pty'> + <target type='system-serial' port='0'> + <model name='16550a'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml new file mode 100644 index 0000000000..a601ab85c2 --- /dev/null +++ b/tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml @@ -0,0 +1,66 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>a7ca230a-fbe0-48b8-8ea6-25836f8cbc32</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='s390x' machine='s390-ccw-virtio'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-s390x</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/> + </disk> + <controller type='pci' index='0' model='pci-root'/> + <controller type='virtio-serial' index='0'> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:1a:29'/> + <model type='virtio'/> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/> + </interface> + <console type='pty'> + <target type='sclp' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='tablet' bus='virtio'> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0004'/> + </input> + <input type='keyboard' bus='virtio'> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0005'/> + </input> + <graphics type='vnc' port='-1' autoport='yes'> + <listen type='address'/> + </graphics> + <video> + <model type='virtio' heads='1' primary='yes'/> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/> + </video> + <memballoon model='virtio'> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0006'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0007'/> + </rng> + <panic model='s390'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml new file mode 100644 index 0000000000..55de903c0a --- /dev/null +++ b/tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml @@ -0,0 +1,53 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='s390x' machine='s390-ccw-virtio'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-s390x</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/> + </disk> + <controller type='pci' index='0' model='pci-root'/> + <controller type='virtio-serial' index='0'> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/> + </interface> + <console type='pty'> + <target type='sclp' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <memballoon model='virtio'> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0004'/> + </rng> + <panic model='s390'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/x86_64-pc-graphics.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-pc-graphics.x86_64-latest.xml new file mode 100644 index 0000000000..a30926083b --- /dev/null +++ b/tests/qemuxml2xmloutdata/x86_64-pc-graphics.x86_64-latest.xml @@ -0,0 +1,82 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>2c0abd3d-8f18-42c0-a132-9708213aaac9</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + </features> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </controller> + <interface type='user'> + <mac address='52:54:00:4c:e3:86'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <serial type='pty'> + <target type='isa-serial' port='0'> + <model name='isa-serial'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='tablet' bus='usb'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes'> + <listen type='address'/> + </graphics> + <video> + <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/x86_64-pc-headless.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-pc-headless.x86_64-latest.xml new file mode 100644 index 0000000000..3b200c22ac --- /dev/null +++ b/tests/qemuxml2xmloutdata/x86_64-pc-headless.x86_64-latest.xml @@ -0,0 +1,74 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + </features> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </interface> + <serial type='pty'> + <target type='isa-serial' port='0'> + <model name='isa-serial'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml new file mode 100644 index 0000000000..79c82f9d4f --- /dev/null +++ b/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml @@ -0,0 +1,120 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>61288c03-0b0d-4f1e-9496-0f0256f2e013</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + </features> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </controller> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x10'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x11'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0x12'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0x13'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0x14'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/> + </controller> + <controller type='pci' index='6' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='6' port='0x15'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/> + </controller> + <controller type='pci' index='7' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='7' port='0x16'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/> + </controller> + <interface type='user'> + <mac address='52:54:00:d2:70:0b'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </interface> + <serial type='pty'> + <target type='isa-serial' port='0'> + <model name='isa-serial'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='tablet' bus='usb'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes'> + <listen type='address'/> + </graphics> + <video> + <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml new file mode 100644 index 0000000000..18cfe8a94c --- /dev/null +++ b/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml @@ -0,0 +1,112 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + </features> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/guest.qcow2'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='qemu-xhci' ports='15'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </controller> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='virtio-serial' index='0'> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0xa'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0xb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0xc'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/> + </controller> + <controller type='pci' index='6' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='6' port='0xd'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/> + </controller> + <controller type='pci' index='7' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='7' port='0xe'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </interface> + <serial type='pty'> + <target type='isa-serial' port='0'> + <model name='isa-serial'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <channel type='unix'> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + </memballoon> + <rng model='virtio'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 06d1ad5ec0..a64b17ac28 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1297,6 +1297,22 @@ mymain(void) DO_TEST_CAPS_LATEST("virtio-transitional"); DO_TEST_CAPS_LATEST("virtio-non-transitional"); + /* Simple headless guests for various architectures */ + DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-headless", "ppc64"); + DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-headless", "riscv64"); + DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-headless", "s390x"); + DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-headless", "x86_64"); + DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-headless", "x86_64"); + + /* Simple guests with graphics for various architectures */ + DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-graphics", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-graphics", "ppc64"); + DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-graphics", "riscv64"); + DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-graphics", "s390x"); + DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-graphics", "x86_64"); + DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-graphics", "x86_64"); + if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL) virFileDeleteTree(fakerootdir); -- 2.21.0

On Fri, Jun 14, 2019 at 10:04:39AM +0200, Andrea Bolognani wrote:
We didn't do this earlier because the DO_TEST_CAPS_ARCH_LATEST() macro was limited to qemuxml2argv until recently.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../aarch64-virt-graphics.aarch64-latest.xml | 115 +++++++++++++++++ .../aarch64-virt-headless.aarch64-latest.xml | 101 +++++++++++++++ .../ppc64-pseries-graphics.ppc64-latest.xml | 75 +++++++++++ .../ppc64-pseries-headless.ppc64-latest.xml | 66 ++++++++++ .../riscv64-virt-graphics.riscv64-latest.xml | 109 ++++++++++++++++ .../riscv64-virt-headless.riscv64-latest.xml | 95 ++++++++++++++ .../s390x-ccw-graphics.s390x-latest.xml | 66 ++++++++++ .../s390x-ccw-headless.s390x-latest.xml | 53 ++++++++ .../x86_64-pc-graphics.x86_64-latest.xml | 82 ++++++++++++ .../x86_64-pc-headless.x86_64-latest.xml | 74 +++++++++++ .../x86_64-q35-graphics.x86_64-latest.xml | 120 ++++++++++++++++++ .../x86_64-q35-headless.x86_64-latest.xml | 112 ++++++++++++++++ tests/qemuxml2xmltest.c | 16 +++ 13 files changed, 1084 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/ppc64-pseries-graphics.ppc64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/ppc64-pseries-headless.ppc64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt-graphics.riscv64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/riscv64-virt-headless.riscv64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml create mode 100644 tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-pc-graphics.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-pc-headless.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml new file mode 100644 index 0000000000..bf55bdace5 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml @@ -0,0 +1,115 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>33844184-97c0-4cc0-aa7d-206f5803530b</uuid> + <metadata> + <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> + <libosinfo:os id="http://fedoraproject.org/fedora/29"/> + </libosinfo:libosinfo> + </metadata> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram>
Haha, nope. 928) QEMU XML-2-XML-inactive aarch64-virt-graphics ... In '/home/jtomko/work/libvirt/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml': Offset 582 Expect [abologna] Actual [jtomko] ... Expected result code=0 but received code=4FAILED Jano
+ <boot dev='hd'/> + </os> + <features> + <acpi/> + <gic version='2'/>

On Tue, 2019-06-25 at 20:38 +0200, Ján Tomko wrote:
On Fri, Jun 14, 2019 at 10:04:39AM +0200, Andrea Bolognani wrote: [...]
+ <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram>
Haha, nope. 928) QEMU XML-2-XML-inactive aarch64-virt-graphics ... In '/home/jtomko/work/libvirt/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml': Offset 582 Expect [abologna] Actual [jtomko] ... Expected result code=0 but received code=4FAILED
Just rename your home directory and it will pass O:-) Anyway, if I squash the diff below into 2/4 this problem will go away. I'm a bit confused by the fact that it would only show up with xml2xml and not with xml2argv, which generates the correct NVRAM path just as I would expect... I'd have to dig a bit further to figure out what's going on there. In the meantime, are you okay with this going in once I've squashed the diff below into 2/4? diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml index 490eb45daf..e908d24ac2 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml +++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml @@ -12,6 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features> diff --git a/tests/qemuxml2argvdata/aarch64-virt-headless.xml b/tests/qemuxml2argvdata/aarch64-virt-headless.xml index 2ed7d9a904..7e4fe64b43 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-headless.xml +++ b/tests/qemuxml2argvdata/aarch64-virt-headless.xml @@ -12,6 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features> -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jun 26, 2019 at 09:58:51AM +0200, Andrea Bolognani wrote:
On Tue, 2019-06-25 at 20:38 +0200, Ján Tomko wrote:
On Fri, Jun 14, 2019 at 10:04:39AM +0200, Andrea Bolognani wrote: [...]
+ <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram>
Haha, nope. 928) QEMU XML-2-XML-inactive aarch64-virt-graphics ... In '/home/jtomko/work/libvirt/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml': Offset 582 Expect [abologna] Actual [jtomko] ... Expected result code=0 but received code=4FAILED
Just rename your home directory and it will pass O:-)
Anyway, if I squash the diff below into 2/4 this problem will go away. I'm a bit confused by the fact that it would only show up with xml2xml and not with xml2argv, which generates the correct NVRAM path just as I would expect... I'd have to dig a bit further to figure out what's going on there.
In the meantime, are you okay with this going in once I've squashed the diff below into 2/4?
diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml index 490eb45daf..e908d24ac2 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-graphics.xml +++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.xml @@ -12,6 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features> diff --git a/tests/qemuxml2argvdata/aarch64-virt-headless.xml b/tests/qemuxml2argvdata/aarch64-virt-headless.xml index 2ed7d9a904..7e4fe64b43 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-headless.xml +++ b/tests/qemuxml2argvdata/aarch64-virt-headless.xml @@ -12,6 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features>
And with this squashed into 4/4: diff --git a/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml index bf55bdace5..418fa29def 100644 --- a/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml +++ b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml @@ -12,7 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> - <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features> diff --git a/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml index 75d86878a1..9b08a03981 100644 --- a/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml +++ b/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml @@ -12,7 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> - <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features> Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

On Wed, 2019-06-26 at 10:07 +0200, Ján Tomko wrote:
And with this squashed into 4/4:
diff --git a/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml index bf55bdace5..418fa29def 100644 --- a/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml +++ b/tests/qemuxml2xmloutdata/aarch64-virt-graphics.aarch64-latest.xml @@ -12,7 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> - <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features> diff --git a/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml index 75d86878a1..9b08a03981 100644 --- a/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml +++ b/tests/qemuxml2xmloutdata/aarch64-virt-headless.aarch64-latest.xml @@ -12,7 +12,7 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> - <nvram>/home/abologna/.config/libvirt/qemu/nvram/guest_VARS.fd</nvram> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> </os> <features>
Of course! I didn't leave this out, just forgot to mention it :) Thanks for the review, I'll push in a minute. -- Andrea Bolognani / Red Hat / Virtualization

On Fri, 2019-06-14 at 10:04 +0200, Andrea Bolognani wrote:
*** BLURBY MCBLURBFACE ***
Andrea Bolognani (4): tests: Normalize quotes for *-graphics tests: Update *-headless and *-graphics tests: Add riscv64-virt-graphics tests: Enable *-headless and *-graphics in qemuxml2xml
*** PINGY MCPINGFACE *** -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Ján Tomko