From: Cole Robinson Date: Wed, 8 Aug 2018 15:11:19 -0400 Subject: [PATCH virt-manager] virt-install: Support armv7l and i686 uefi (cherry picked from commit eb0f4a612fe4c12f498ed8a80e5665d368b5f76c) --- tests/capabilities-xml/kvm-x86_64-domcaps.xml | 2 + .../compare/virt-install-arm-kvm-import.xml | 1 + .../compare/virt-install-kvm-i686-uefi.xml | 115 ++++++++++++++++++ tests/clitest.py | 1 + virt-install | 6 +- 5 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml diff --git a/tests/capabilities-xml/kvm-x86_64-domcaps.xml b/tests/capabilities-xml/kvm-x86_64-domcaps.xml index d2a3d11f..451f5844 100644 --- a/tests/capabilities-xml/kvm-x86_64-domcaps.xml +++ b/tests/capabilities-xml/kvm-x86_64-domcaps.xml @@ -8,6 +8,8 @@ /usr/share/AAVMF/AAVMF_CODE.fd /usr/share/OVMF/OVMF_CODE.fd + /usr/share/edk2/ovmf-ia32/OVMF_CODE.fd + /usr/share/edk2/arm/QEMU_EFI-pflash.raw rom pflash 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..802589b3 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 @@ -6,6 +6,7 @@ 1 hvm + /usr/share/edk2/arm/QEMU_EFI-pflash.raw diff --git a/tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml b/tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml new file mode 100644 index 00000000..9aabfef2 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml @@ -0,0 +1,115 @@ + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + /usr/share/edk2/ovmf-ia32/OVMF_CODE.fd + + + + + + + + + + + + + + destroy + + + + + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + /usr/share/edk2/ovmf-ia32/OVMF_CODE.fd + + + + + + + + + + + + + + + + + + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/clitest.py b/tests/clitest.py index a62a9105..c3e1b807 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -772,6 +772,7 @@ c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel6.4", "kvm-rhel6") # c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel7.0", "kvm-rhel7") # RHEL7 defaults c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant centos7.0", "kvm-centos7") # Centos 7 defaults c.add_compare("--os-variant win7 --cdrom %(EXISTIMG2)s --boot loader_type=pflash,loader=CODE.fd,nvram_template=VARS.fd --disk %(EXISTIMG1)s", "win7-uefi") # no HYPER-V with UEFI +c.add_compare("--arch i686 --boot uefi --pxe --disk none", "kvm-i686-uefi") # i686 uefi c.add_compare("--machine q35 --cdrom %(EXISTIMG2)s --disk %(EXISTIMG1)s", "q35-defaults") # proper q35 disk defaults c.add_compare("--disk size=20 --os-variant solaris10", "solaris10-defaults") # test solaris OS defaults c.add_compare("--connect %(URI-KVM-REMOTE)s --import --disk %(EXISTIMG1)s --os-variant fedora21 --pm suspend_to_disk=yes", "f21-kvm-remote") diff --git a/virt-install b/virt-install index c0a028c9..4b39b350 100755 --- a/virt-install +++ b/virt-install @@ -609,7 +609,7 @@ def build_guest_instance(conn, options): guest.add_default_devices() # Default to UEFI for aarch64 - if (guest.os.is_arm64() and + if ((guest.os.is_arm64() or guest.os.is_arm32()) and not guest.os.kernel and not guest.os.loader and guest.os.loader_ro is None and @@ -617,10 +617,10 @@ def build_guest_instance(conn, options): try: guest.set_uefi_default() except Exception as e: - logging.debug("Error setting UEFI default for aarch64", + logging.debug("Error setting UEFI default", exc_info=True) logging.warning("Couldn't configure UEFI: %s", e) - logging.warning("Your aarch64 VM may not boot successfully.") + logging.warning("Your VM may not boot successfully.") # Check usability of SMM feature if guest.features.smm: