These cover the use case "I want to get an existing guest image running in the cloud, and I don't need graphics". Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- .../compare/virt-install-aarch64-headless.xml | 41 +++++++++++++++ .../compare/virt-install-ppc64-headless.xml | 39 ++++++++++++++ .../compare/virt-install-s390x-headless.xml | 36 +++++++++++++ .../compare/virt-install-x86_64-headless.xml | 52 +++++++++++++++++++ tests/clitest.py | 8 +++ 5 files changed, 176 insertions(+) create mode 100644 tests/cli-test-xml/compare/virt-install-aarch64-headless.xml create mode 100644 tests/cli-test-xml/compare/virt-install-ppc64-headless.xml create mode 100644 tests/cli-test-xml/compare/virt-install-s390x-headless.xml create mode 100644 tests/cli-test-xml/compare/virt-install-x86_64-headless.xml diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-headless.xml b/tests/cli-test-xml/compare/virt-install-aarch64-headless.xml new file mode 100644 index 00000000..b43f5231 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-aarch64-headless.xml @@ -0,0 +1,41 @@ +<domain type="kvm"> + <name>foobar</name> + <uuid>00000000-1111-2222-3333-444444444444</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>65536</memory> + <currentMemory>65536</currentMemory> + <vcpu>1</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> + <cpu mode="host-passthrough"/> + <clock offset="utc"/> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <disk type="file" device="disk"> + <driver name="qemu" type="qcow2"/> + <source file="/dev/default-pool/testvol1.img"/> + <target dev="vda" bus="virtio"/> + </disk> + <controller type="usb" index="0" model="qemu-xhci" ports="15"/> + <interface type="bridge"> + <source bridge="eth0"/> + <mac address="00:11:22:33:44:55"/> + <model type="virtio"/> + </interface> + <console type="pty"/> + <channel type="unix"> + <source mode="bind"/> + <target type="virtio" name="org.qemu.guest_agent.0"/> + </channel> + <rng model="virtio"> + <backend model="random">/dev/urandom</backend> + </rng> + </devices> +</domain> diff --git a/tests/cli-test-xml/compare/virt-install-ppc64-headless.xml b/tests/cli-test-xml/compare/virt-install-ppc64-headless.xml new file mode 100644 index 00000000..0e022067 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-ppc64-headless.xml @@ -0,0 +1,39 @@ +<domain type="kvm"> + <name>foobar</name> + <uuid>00000000-1111-2222-3333-444444444444</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>65536</memory> + <currentMemory>65536</currentMemory> + <vcpu>1</vcpu> + <os> + <type arch="ppc64le" machine="pseries">hvm</type> + <boot dev="hd"/> + </os> + <clock offset="utc"/> + <devices> + <emulator>/usr/libexec/qemu-kvm</emulator> + <disk type="file" device="disk"> + <driver name="qemu" type="qcow2"/> + <source file="/dev/default-pool/testvol1.img"/> + <target dev="vda" bus="virtio"/> + </disk> + <controller type="usb" index="0" model="qemu-xhci" ports="15"/> + <interface type="bridge"> + <source bridge="eth0"/> + <mac address="00:11:22:33:44:55"/> + <model type="virtio"/> + </interface> + <console type="pty"/> + <channel type="unix"> + <source mode="bind"/> + <target type="virtio" name="org.qemu.guest_agent.0"/> + </channel> + <rng model="virtio"> + <backend model="random">/dev/urandom</backend> + </rng> + </devices> +</domain> diff --git a/tests/cli-test-xml/compare/virt-install-s390x-headless.xml b/tests/cli-test-xml/compare/virt-install-s390x-headless.xml new file mode 100644 index 00000000..b5b280c6 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-s390x-headless.xml @@ -0,0 +1,36 @@ +<domain type="kvm"> + <name>foobar</name> + <uuid>00000000-1111-2222-3333-444444444444</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>65536</memory> + <currentMemory>65536</currentMemory> + <vcpu>1</vcpu> + <os> + <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"> + <driver name="qemu" type="qcow2"/> + <source file="/dev/default-pool/testvol1.img"/> + <target dev="vda" bus="virtio"/> + </disk> + <interface type="bridge"> + <source bridge="eth0"/> + <mac address="00:11:22:33:44:55"/> + <model type="virtio"/> + </interface> + <console type="pty"> + <target type="sclp"/> + </console> + <rng model="virtio"> + <backend model="random">/dev/urandom</backend> + </rng> + </devices> +</domain> diff --git a/tests/cli-test-xml/compare/virt-install-x86_64-headless.xml b/tests/cli-test-xml/compare/virt-install-x86_64-headless.xml new file mode 100644 index 00000000..4dbdd461 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-x86_64-headless.xml @@ -0,0 +1,52 @@ +<domain type="kvm"> + <name>foobar</name> + <uuid>00000000-1111-2222-3333-444444444444</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>65536</memory> + <currentMemory>65536</currentMemory> + <vcpu>1</vcpu> + <os> + <type arch="x86_64" machine="q35">hvm</type> + <boot dev="hd"/> + </os> + <features> + <acpi/> + <apic/> + </features> + <cpu mode="host-model"/> + <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-kvm</emulator> + <disk type="file" device="disk"> + <driver name="qemu" type="qcow2"/> + <source file="/dev/default-pool/testvol1.img"/> + <target dev="vda" bus="virtio"/> + </disk> + <controller type="usb" index="0" model="qemu-xhci" ports="15"/> + <interface type="bridge"> + <source bridge="eth0"/> + <mac address="00:11:22:33:44:55"/> + <model type="virtio"/> + </interface> + <console type="pty"/> + <channel type="unix"> + <source mode="bind"/> + <target type="virtio" name="org.qemu.guest_agent.0"/> + </channel> + <rng model="virtio"> + <backend model="random">/dev/urandom</backend> + </rng> + </devices> +</domain> diff --git a/tests/clitest.py b/tests/clitest.py index 119d85b7..b84e7fa9 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -804,6 +804,14 @@ c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os- c.add_compare("--connect %(URI-KVM-AARCH64)s --disk size=1 --os-variant fedora22 --features gic_version=host --network network=default,address.type=pci --controller type=scsi,model=virtio-scsi,address.type=pci", "aarch64-kvm-gic") +# Simple headless guests for various architectures +c = vinst.add_category("kvm-headless", "--os-variant fedora29 --import --disk %(EXISTIMG1)s --network default --rng /dev/urandom --graphics none") +c.add_compare("--connect %(URI-KVM-AARCH64)s --arch aarch64", "aarch64-headless") +c.add_compare("--connect %(URI-KVM-PPC64LE)s --arch ppc64le", "ppc64-headless") +c.add_compare("--connect %(URI-KVM-S390X)s --arch s390x", "s390x-headless") +c.add_compare("--connect %(URI-KVM)s --arch x86_64", "x86_64-headless") + + ###################### # LXC specific tests # -- 2.20.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list