From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> If the host and guest support <vmcoreinfo/>, add it by default. Update the tests. Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> --- .../compare/virt-convert-ovf-compare.xml | 1 + .../compare/virt-convert-vmx-compare.xml | 1 + .../compare/virt-install-aarch64-cdrom.xml | 6 ++++ .../compare/virt-install-aarch64-graphics.xml | 3 ++ .../compare/virt-install-aarch64-kvm-gic.xml | 1 + .../compare/virt-install-aarch64-kvm-import.xml | 3 ++ .../compare/virt-install-aarch64-machdefault.xml | 3 ++ .../compare/virt-install-aarch64-machvirt.xml | 3 ++ .../compare/virt-install-arm-defaultmach-f20.xml | 3 ++ .../compare/virt-install-arm-kvm-import.xml | 3 ++ .../compare/virt-install-arm-virt-f20.xml | 3 ++ .../compare/virt-install-boot-uefi.xml | 1 + .../compare/virt-install-f21-kvm-remote.xml | 1 + .../compare/virt-install-kvm-centos7.xml | 2 ++ .../compare/virt-install-kvm-f14-url.xml | 2 ++ .../compare/virt-install-kvm-rhel6.xml | 2 ++ .../compare/virt-install-kvm-rhel7.xml | 2 ++ .../compare/virt-install-kvm-session-defaults.xml | 2 ++ .../compare/virt-install-kvm-win2k3-cdrom.xml | 2 ++ .../compare/virt-install-location-iso.xml | 2 ++ .../compare/virt-install-location-nfs.xml | 2 ++ .../compare/virt-install-many-devices.xml | 1 + .../compare/virt-install-panic-default.xml | 1 + .../compare/virt-install-panic-isa-iobase.xml | 1 + .../compare/virt-install-panic-isa.xml | 1 + .../compare/virt-install-q35-defaults.xml | 2 ++ .../compare/virt-install-qemu-32-on-64.xml | 1 + .../compare/virt-install-qemu-plain.xml | 1 + .../compare/virt-install-singleton-config-1.xml | 1 + .../compare/virt-install-solaris10-defaults.xml | 1 + .../cli-test-xml/compare/virt-install-spice-gl.xml | 1 + .../compare/virt-install-win7-uefi.xml | 2 ++ tests/clitest.py | 41 ++++++++++++---------- .../ovf2libvirt_ovf_directory.libvirt | 1 + .../libvirt_output/ovf2libvirt_test1.libvirt | 1 + .../ovf2libvirt_test1.libvirt.disk_qcow2 | 1 + .../libvirt_output/ovf2libvirt_test2.libvirt | 1 + .../libvirt_output/ovf2libvirt_test_gzip.libvirt | 1 + .../ovf2libvirt_test_gzip.libvirt.disk_raw | 1 + .../vmx2libvirt_test-nodisks.libvirt | 1 + .../vmx2libvirt_test-vmx-zip.libvirt | 1 + .../libvirt_output/vmx2libvirt_test1.libvirt | 1 + .../vmx2libvirt_test1.libvirt.disk_raw | 1 + .../libvirt_output/vmx2libvirt_vmx-dir.libvirt | 1 + tests/virtconvtest.py | 2 ++ virtinst/guest.py | 5 +++ 46 files changed, 101 insertions(+), 19 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml b/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml index 2d90abfc..b42452e9 100644 --- a/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml +++ b/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml b/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml index 21dbcd65..deafc161 100644 --- a/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml +++ b/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml b/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml index 86eebdc0..16849454 100644 --- a/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml +++ b/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml @@ -11,6 +11,9 @@ <boot dev="cdrom"/> <boot dev="hd"/> </os> + <features> + <vmcoreinfo/> + </features> <clock offset="utc"/> <on_poweroff>restart</on_poweroff> <on_reboot>destroy</on_reboot> @@ -50,6 +53,9 @@ <nvram template="VARS.fd"/> <boot dev="hd"/> </os> + <features> + <vmcoreinfo/> + </features> <clock offset="utc"/> <on_poweroff>restart</on_poweroff> <on_reboot>destroy</on_reboot> diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml b/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml index 9ee6ced3..092668a9 100644 --- a/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml +++ b/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml @@ -9,6 +9,9 @@ <loader readonly="yes" type="pflash">/usr/share/AAVMF/AAVMF_CODE.fd</loader> <boot dev="hd"/> </os> + <features> + <vmcoreinfo/> + </features> <cpu mode="host-passthrough"/> <clock offset="utc"/> <devices> diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml index 3a761902..08d84623 100644 --- a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml +++ b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml @@ -11,6 +11,7 @@ </os> <features> <gic version="host"/> + <vmcoreinfo/> </features> <cpu mode="host-passthrough"/> <clock offset="utc"/> diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml index 447741f1..0e1faad4 100644 --- a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml +++ b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml @@ -9,6 +9,9 @@ <loader readonly="yes" type="pflash">/usr/share/AAVMF/AAVMF_CODE.fd</loader> <boot dev="hd"/> </os> + <features> + <vmcoreinfo/> + </features> <cpu mode="host-passthrough"/> <clock offset="utc"/> <devices> diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml b/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml index 2a60a967..a0b7eaaa 100644 --- a/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml +++ b/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml @@ -10,6 +10,9 @@ <initrd>/f19-arm.initrd</initrd> <cmdline>console=ttyAMA0,1234 rw root=/dev/vda3</cmdline> </os> + <features> + <vmcoreinfo/> + </features> <cpu mode="custom" match="exact"> <model>cortex-a57</model> </cpu> diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml b/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml index 2a60a967..a0b7eaaa 100644 --- a/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml +++ b/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml @@ -10,6 +10,9 @@ <initrd>/f19-arm.initrd</initrd> <cmdline>console=ttyAMA0,1234 rw root=/dev/vda3</cmdline> </os> + <features> + <vmcoreinfo/> + </features> <cpu mode="custom" match="exact"> <model>cortex-a57</model> </cpu> diff --git a/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml b/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml index 50ac211b..8daadafc 100644 --- a/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml +++ b/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml @@ -10,6 +10,9 @@ <initrd>/f19-arm.initrd</initrd> <cmdline>foo</cmdline> </os> + <features> + <vmcoreinfo/> + </features> <clock offset="utc"/> <devices> <emulator>/usr/bin/qemu-system-arm</emulator> diff --git a/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml b/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml index b1a98b75..0b96d19e 100644 --- a/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml +++ b/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml @@ -8,6 +8,9 @@ <type arch="armv7l" machine="virt">hvm</type> <boot dev="hd"/> </os> + <features> + <vmcoreinfo/> + </features> <cpu mode="host-passthrough"/> <clock offset="utc"/> <devices> diff --git a/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml b/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml index 6744b723..35f418cb 100644 --- a/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml +++ b/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml @@ -10,6 +10,9 @@ <initrd>/f19-arm.initrd</initrd> <cmdline>console=ttyAMA0,1234 rw root=/dev/vda3</cmdline> </os> + <features> + <vmcoreinfo/> + </features> <clock offset="utc"/> <devices> <emulator>/usr/bin/qemu-system-arm</emulator> diff --git a/tests/cli-test-xml/compare/virt-install-boot-uefi.xml b/tests/cli-test-xml/compare/virt-install-boot-uefi.xml index 22f31e6b..349ce36c 100644 --- a/tests/cli-test-xml/compare/virt-install-boot-uefi.xml +++ b/tests/cli-test-xml/compare/virt-install-boot-uefi.xml @@ -14,6 +14,7 @@ <apic/> <smm state="on"/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml b/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml index 34f95aaf..7fa445af 100644 --- a/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml +++ b/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml index 22c81fde..01eea36a 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -83,6 +84,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml b/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml index d8443261..46cd298f 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml @@ -14,6 +14,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="host-model"/> <clock offset="utc"> @@ -74,6 +75,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="host-model"/> <clock offset="utc"> diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml index 22c81fde..01eea36a 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -83,6 +84,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml index 22c81fde..01eea36a 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -83,6 +84,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml b/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml index 423c0680..2889883e 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -91,6 +92,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml b/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml index 357cbd23..41490737 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> <hyperv> <relaxed state="on"/> <vapic state="on"/> @@ -81,6 +82,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> <hyperv> <relaxed state="on"/> <vapic state="on"/> diff --git a/tests/cli-test-xml/compare/virt-install-location-iso.xml b/tests/cli-test-xml/compare/virt-install-location-iso.xml index 8a627629..896ba620 100644 --- a/tests/cli-test-xml/compare/virt-install-location-iso.xml +++ b/tests/cli-test-xml/compare/virt-install-location-iso.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -74,6 +75,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-location-nfs.xml b/tests/cli-test-xml/compare/virt-install-location-nfs.xml index 5496a1d3..c50415f8 100644 --- a/tests/cli-test-xml/compare/virt-install-location-nfs.xml +++ b/tests/cli-test-xml/compare/virt-install-location-nfs.xml @@ -14,6 +14,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -73,6 +74,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml index e265b049..dcc559ae 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -11,6 +11,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu> <topology sockets="4" cores="1" threads="1"/> diff --git a/tests/cli-test-xml/compare/virt-install-panic-default.xml b/tests/cli-test-xml/compare/virt-install-panic-default.xml index b391a290..df66e53b 100644 --- a/tests/cli-test-xml/compare/virt-install-panic-default.xml +++ b/tests/cli-test-xml/compare/virt-install-panic-default.xml @@ -11,6 +11,7 @@ <features> <acpi/> <apic/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-panic-isa-iobase.xml b/tests/cli-test-xml/compare/virt-install-panic-isa-iobase.xml index 714cb56b..6cd279e9 100644 --- a/tests/cli-test-xml/compare/virt-install-panic-isa-iobase.xml +++ b/tests/cli-test-xml/compare/virt-install-panic-isa-iobase.xml @@ -11,6 +11,7 @@ <features> <acpi/> <apic/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-panic-isa.xml b/tests/cli-test-xml/compare/virt-install-panic-isa.xml index b391a290..df66e53b 100644 --- a/tests/cli-test-xml/compare/virt-install-panic-isa.xml +++ b/tests/cli-test-xml/compare/virt-install-panic-isa.xml @@ -11,6 +11,7 @@ <features> <acpi/> <apic/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-q35-defaults.xml b/tests/cli-test-xml/compare/virt-install-q35-defaults.xml index 657c5e07..528a57aa 100644 --- a/tests/cli-test-xml/compare/virt-install-q35-defaults.xml +++ b/tests/cli-test-xml/compare/virt-install-q35-defaults.xml @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -83,6 +84,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml b/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml index 1597b2cd..971ea5ec 100644 --- a/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml +++ b/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml @@ -12,6 +12,7 @@ <acpi/> <apic/> <pae/> + <vmcoreinfo/> </features> <clock offset="utc"> <timer name="rtc" tickpolicy="catchup"/> diff --git a/tests/cli-test-xml/compare/virt-install-qemu-plain.xml b/tests/cli-test-xml/compare/virt-install-qemu-plain.xml index 3273e0e4..249e355a 100644 --- a/tests/cli-test-xml/compare/virt-install-qemu-plain.xml +++ b/tests/cli-test-xml/compare/virt-install-qemu-plain.xml @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Penryn</model> diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml index fc22e0ac..da1047b6 100644 --- a/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml +++ b/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml @@ -22,6 +22,7 @@ <features> <acpi/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="host-model"/> <clock offset="localtime"> diff --git a/tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml b/tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml index 6d8b9fde..c52f55e7 100644 --- a/tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml +++ b/tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-spice-gl.xml b/tests/cli-test-xml/compare/virt-install-spice-gl.xml index 095c43e5..ee60f78a 100644 --- a/tests/cli-test-xml/compare/virt-install-spice-gl.xml +++ b/tests/cli-test-xml/compare/virt-install-spice-gl.xml @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/cli-test-xml/compare/virt-install-win7-uefi.xml b/tests/cli-test-xml/compare/virt-install-win7-uefi.xml index 796ff73f..5c9256a0 100644 --- a/tests/cli-test-xml/compare/virt-install-win7-uefi.xml +++ b/tests/cli-test-xml/compare/virt-install-win7-uefi.xml @@ -15,6 +15,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> @@ -88,6 +89,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/clitest.py b/tests/clitest.py index 90f9c995..3c8a902d 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -417,7 +417,8 @@ c.add_compare(""" \ --panic default \ --tpm /dev/tpm0 \ --rng /dev/random \ -""", "singleton-config-1", compare_check=support.SUPPORT_CONN_VMPORT) +""", "singleton-config-1", compare_check=[support.SUPPORT_CONN_VMPORT, + support.SUPPORT_CONN_VMCOREINFO]) # Singleton element test #2, for complex strings c.add_compare("""--pxe \ @@ -440,7 +441,7 @@ cache.mode=emulate,cache.level=3 \ --memtune hard_limit=10,soft_limit=20,swap_hard_limit=30,min_guarantee=40 \ --blkiotune weight=100,device_path=/home/test/1.img,device_weight=200 \ --memorybacking size=1,unit='G',nodeset='1,2-5',nosharepages=yes,locked=yes \ ---features acpi=off,eoi=on,privnet=on,hyperv_synic=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=1234,vmport=off,pmu=off \ +--features acpi=off,eoi=on,privnet=on,hyperv_synic=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=1234,vmport=off,pmu=off,vmcoreinfo=off \ --clock offset=utc,hpet_present=no,rtc_tickpolicy=merge \ --sysinfo type=smbios,bios_vendor="Acme LLC",bios_version=1.2.3,bios_date=01/01/1970,bios_release=10.22 \ --sysinfo type=smbios,system_manufacturer="Acme Inc.",system_product=Computer,system_version=3.2.1,system_serial=123456789,system_uuid=00000000-1111-2222-3333-444444444444,system_sku=abc-123,system_family=Server \ @@ -559,14 +560,15 @@ c.add_compare(""" \ --qemu-commandline="-display gtk,gl=on" \ --qemu-commandline="-device vfio-pci,addr=05.0,sysfsdev=/sys/class/mdev_bus/0000:00:02.0/f321853c-c584-4a6b-b99a-3eee22a3919c" \ --qemu-commandline="-set device.video0.driver=virtio-vga" \ -""", "many-devices", compare_check="2.0.0") # compare_check=graphics listen=socket support +""", "many-devices", compare_check="3.10.0") # compare_check=graphics listen=socket support, vmcoreinfo # Test the implied defaults for gl=yes setting virgl=on c.add_compare(""" \ --memory 1024 \ --disk none \ --graphics spice,gl=yes \ -""", "spice-gl", compare_check=support.SUPPORT_CONN_VMPORT) +""", "spice-gl", compare_check=[support.SUPPORT_CONN_VMPORT, + support.SUPPORT_CONN_VMCOREINFO]) ############################ @@ -670,9 +672,9 @@ c.add_invalid("--disk size=1 --security model=foo,type=bar") # Libvirt will err ################ c = vinst.add_category("panic", "--connect %(URI-KVM)s --noautoconsole --import --disk none --graphics none --controller usb,model=none --network none") -c.add_compare("--panic default", "panic-default") -c.add_compare("--panic isa", "panic-isa") -c.add_compare("--panic isa,iobase=0x505", "panic-isa-iobase") +c.add_compare("--panic default", "panic-default", compare_check=support.SUPPORT_CONN_VMCOREINFO) +c.add_compare("--panic isa", "panic-isa", compare_check=support.SUPPORT_CONN_VMCOREINFO) +c.add_compare("--panic isa,iobase=0x505", "panic-isa-iobase", compare_check=support.SUPPORT_CONN_VMCOREINFO) c = vinst.add_category("panic", "--connect %(URI-KVM-PPC64LE)s --noautoconsole --import --disk none --graphics none --controller usb,model=none --network none") c.add_compare("--panic default", "panic-pseries-default") @@ -767,7 +769,8 @@ c.add_invalid("--file /foo/bar/baz --pxe") # Trying to use unmanaged storage wi # QEMU/KVM specific tests # ########################### -c = vinst.add_category("kvm", "--connect %(URI-KVM)s --noautoconsole", compare_check=support.SUPPORT_CONN_VMPORT) +c = vinst.add_category("kvm", "--connect %(URI-KVM)s --noautoconsole", compare_check=[support.SUPPORT_CONN_VMPORT, + support.SUPPORT_CONN_VMCOREINFO]) c.add_compare("--os-variant fedora-unknown --file %(EXISTIMG1)s --location %(TREEDIR)s --extra-args console=ttyS0 --cpu host --channel none --console none --sound none --redirdev none", "kvm-f14-url") # Fedora Directory tree URL install with extra-args c.add_compare("--test-media-detection %(TREEDIR)s", "test-url-detection") # --test-media-detection c.add_compare("--os-variant fedora20 --disk %(NEWIMG1)s,size=.01,format=vmdk --location %(TREEDIR)s --extra-args console=ttyS0 --quiet", "quiet-url") # Quiet URL install should make no noise @@ -778,17 +781,17 @@ c.add_compare("--os-variant fedora20 --nodisks --boot network --nographics --arc # armv7l tests c.add_compare("--arch armv7l --machine vexpress-a9 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,dtb=/f19-arm.dtb,extra_args=\"console=ttyAMA0 rw root=/dev/mmcblk0p3\" --disk %(EXISTIMG1)s --nographics", "arm-vexpress-plain") c.add_compare("--arch armv7l --machine vexpress-a15 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,dtb=/f19-arm.dtb,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s --nographics --os-variant fedora19", "arm-vexpress-f19") -c.add_compare("--arch armv7l --machine virt --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s --nographics --os-variant fedora20", "arm-virt-f20", compare_check=support.SUPPORT_CONN_QEMU_XHCI) -c.add_compare("--arch armv7l --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\",extra_args=foo --disk %(EXISTIMG1)s --os-variant fedora20", "arm-defaultmach-f20", compare_check=support.SUPPORT_CONN_QEMU_XHCI) -c.add_compare("--connect %(URI-KVM-ARMV7L)s --disk %(EXISTIMG1)s --import --os-variant fedora20", "arm-kvm-import", compare_check=support.SUPPORT_CONN_QEMU_XHCI) +c.add_compare("--arch armv7l --machine virt --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s --nographics --os-variant fedora20", "arm-virt-f20", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) +c.add_compare("--arch armv7l --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\",extra_args=foo --disk %(EXISTIMG1)s --os-variant fedora20", "arm-defaultmach-f20", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) +c.add_compare("--connect %(URI-KVM-ARMV7L)s --disk %(EXISTIMG1)s --import --os-variant fedora20", "arm-kvm-import", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) # aarch64 tests -c.add_compare("--arch aarch64 --machine virt --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s", "aarch64-machvirt", compare_check=support.SUPPORT_CONN_QEMU_XHCI) -c.add_compare("--arch aarch64 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s", "aarch64-machdefault", compare_check=support.SUPPORT_CONN_QEMU_XHCI) -c.add_compare("--arch aarch64 --cdrom %(EXISTIMG2)s --boot loader=CODE.fd,nvram_template=VARS.fd --disk %(EXISTIMG1)s --cpu none --events on_crash=preserve,on_reboot=destroy,on_poweroff=restart", "aarch64-cdrom", compare_check=support.SUPPORT_CONN_QEMU_XHCI) -c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os-variant fedora21", "aarch64-kvm-import", compare_check=support.SUPPORT_CONN_QEMU_XHCI) -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", compare_check=support.SUPPORT_CONN_QEMU_XHCI) -c.add_compare("--connect %(URI-KVM-AARCH64)s --disk none --network none --os-variant fedora25 --graphics spice", "aarch64-graphics", compare_check=support.SUPPORT_CONN_QEMU_XHCI) +c.add_compare("--arch aarch64 --machine virt --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s", "aarch64-machvirt", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) +c.add_compare("--arch aarch64 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s", "aarch64-machdefault", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) +c.add_compare("--arch aarch64 --cdrom %(EXISTIMG2)s --boot loader=CODE.fd,nvram_template=VARS.fd --disk %(EXISTIMG1)s --cpu none --events on_crash=preserve,on_reboot=destroy,on_poweroff=restart", "aarch64-cdrom", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) +c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os-variant fedora21", "aarch64-kvm-import", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) +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", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) +c.add_compare("--connect %(URI-KVM-AARCH64)s --disk none --network none --os-variant fedora25 --graphics spice", "aarch64-graphics", compare_check=[support.SUPPORT_CONN_QEMU_XHCI, support.SUPPORT_CONN_VMCOREINFO]) # ppc64 tests c.add_compare("--arch ppc64 --machine pseries --boot network --disk %(EXISTIMG1)s --disk device=cdrom --os-variant fedora20 --network none", "ppc64-pseries-f20") @@ -818,7 +821,7 @@ c.add_invalid("--disk none --boot network --machine foobar") # Unknown machine c.add_invalid("--nodisks --boot network --arch mips --virt-type kvm") # Invalid domain type for arch c.add_invalid("--nodisks --boot network --paravirt --arch mips") # Invalid arch/virt combo -c = vinst.add_category("kvm-q35", "--connect %(URI-KVM-Q35)s --noautoconsole", compare_check=support.SUPPORT_CONN_VMPORT) +c = vinst.add_category("kvm-q35", "--connect %(URI-KVM-Q35)s --noautoconsole", compare_check=[support.SUPPORT_CONN_VMPORT, support.SUPPORT_CONN_VMCOREINFO]) c.add_compare("--boot uefi --disk none", "boot-uefi") @@ -1055,7 +1058,7 @@ c.add_invalid("--original-xml %(CLONE_NOEXIST_XML)s --file %(EXISTIMG1)s") # XM ###################### vconv = App("virt-convert") -c = vconv.add_category("misc", "--connect %(URI-KVM)s --dry", compare_check=support.SUPPORT_CONN_VMPORT) +c = vconv.add_category("misc", "--connect %(URI-KVM)s --dry", compare_check=[support.SUPPORT_CONN_VMPORT, support.SUPPORT_CONN_VMCOREINFO]) c.add_invalid("%(VMX_IMG1)s --input-format foo") # invalid input format c.add_invalid("%(EXISTIMG1)s") # invalid input file diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt index 92629480..37db0860 100644 --- a/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt +++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt index a3d5b8d7..de252a4f 100644 --- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt +++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 index 60d7818b..16ebab5b 100644 --- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 +++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt index b8bd1ab9..72909948 100644 --- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt +++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt @@ -13,6 +13,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt index 76a5b514..5b9f8f2c 100644 --- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt +++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw index 3fbece09..8b74a867 100644 --- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw +++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt index f00794ce..d63d8d5b 100644 --- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt +++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt index 60055b7d..48dc68bb 100644 --- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt +++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt index 065df6da..6c3b1479 100644 --- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt +++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw index 910de78d..8b1bbe3a 100644 --- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw +++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt index e72a7184..cf298478 100644 --- a/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt +++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt @@ -12,6 +12,7 @@ <acpi/> <apic/> <vmport state="off"/> + <vmcoreinfo/> </features> <cpu mode="custom" match="exact"> <model>Opteron_G4</model> diff --git a/tests/virtconvtest.py b/tests/virtconvtest.py index 188b4fd0..f765fc10 100644 --- a/tests/virtconvtest.py +++ b/tests/virtconvtest.py @@ -54,6 +54,8 @@ class TestVirtConv(unittest.TestCase): if not conn.check_support(conn.SUPPORT_CONN_VMPORT): self.skipTest("Not comparing XML because vmport isn't supported") + if not conn.check_support(conn.SUPPORT_CONN_VMCOREINFO): + self.skipTest("Not comparing XML because vmcoreinfo isn't supported") utils.diff_compare(out_expect, outfile) utils.test_create(conn, out_xml) diff --git a/virtinst/guest.py b/virtinst/guest.py index 04bbcf38..35528f06 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -959,6 +959,11 @@ class Guest(XMLBuilder): self.conn.check_support(self.conn.SUPPORT_CONN_VMPORT)): self.features.vmport = False + if (self.features.vmcoreinfo == "default" and + (self.os.is_x86() or self.os.is_arm_machvirt()) and + self.conn.check_support(self.conn.SUPPORT_CONN_VMCOREINFO)): + self.features.vmcoreinfo = True + if (self._os_object.is_windows() and self._hyperv_supported() and self.conn.check_support(self.conn.SUPPORT_CONN_HYPERV_VAPIC)): -- 2.16.1.73.g5832b7e9f2 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list