diff --git a/tests/data/cli/compare/virt-install-win11.xml b/tests/data/cli/compare/virt-install-win11.xml new file mode 100644 index 000000000..4270c7406 --- /dev/null +++ b/tests/data/cli/compare/virt-install-win11.xml @@ -0,0 +1,180 @@ + + win11 + 00000000-1111-2222-3333-444444444444 + + + + + + 65536 + 65536 + 4 + + hvm + + + + + + + + + + + + + + + + + + + + + + + + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + destroy + + + win11 + 00000000-1111-2222-3333-444444444444 + + + + + + 65536 + 65536 + 4 + + hvm + + + + + + + + + + + + + + + + + + + + + + + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml index 04476b22e..4e0a41eda 100644 --- a/tests/data/testdriver/testdriver.xml +++ b/tests/data/testdriver/testdriver.xml @@ -1598,9 +1598,9 @@ ba pool-dir 35bb2ad9-388a-cdfe-461a-b8907f6e53fe - 107374182400 + 32 0 - 107374182400 + 32 diff --git a/tests/test_cli.py b/tests/test_cli.py index 3d299c12e..34249639f 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -123,6 +123,12 @@ def no_osinfo_linux2020_virtio(): return "osinfo is too old: missing linux2020 with virtio-gpu" +def no_osinfo_win11(): + win11 = OSDB.lookup_os("win11") + if not win11: + return "osinfo is too old: no win11 entry" + + ###################### # Test class helpers # ###################### @@ -1091,6 +1097,7 @@ c.add_compare("--cdrom %(EXISTIMG2)s --file %(EXISTIMG1)s --os-variant win2k3 -- c.add_compare("--os-variant name=ubuntusaucy --nodisks --boot cdrom --virt-type qemu --cpu Penryn --input tablet --boot uefi --graphics vnc", "qemu-plain") # plain qemu c.add_compare("--os-variant fedora20 --nodisks --boot network --graphics default --arch i686 --rng none", "qemu-32-on-64", prerun_check=has_old_osinfo) # 32 on 64 c.add_compare("--osinfo linux2020 --pxe", "linux2020", prerun_check=no_osinfo_linux2020_virtio) +c.add_compare("--check disk_size=off --osinfo win11 --cdrom %(EXISTIMG1)s", "win11", prerun_check=no_osinfo_win11) c.add_compare("--osinfo generic --disk none --location %(ISO-NO-OS)s,kernel=frib.img,initrd=/frob.img", "location-manual-kernel", prerun_check=missing_xorriso) # --location with an unknown ISO but manually specified kernel paths c.add_compare("--disk %(EXISTIMG1)s --location %(ISOTREE)s --nonetworks", "location-iso", prerun_check=missing_xorriso) # Using --location iso mounting c.add_compare("--disk %(EXISTIMG1)s --cdrom %(ISOLABEL)s", "cdrom-centos-label") # Using --cdrom with centos CD label, should use virtio etc. diff --git a/virtinst/osdict.py b/virtinst/osdict.py index c04b1e599..0e7eb319c 100644 --- a/virtinst/osdict.py +++ b/virtinst/osdict.py @@ -464,13 +464,6 @@ class _OsVariant(object): except Exception: # pragma: no cover log.debug("Error checking osinfo firmware support", exc_info=True) - if self.name == "win11": # pragma: no cover - # 2022-03 the libosinfo APIs for firmware haven't landed, and - # there's no osinfo-db entry for win11. But we know win11 requires - # UEFI. Hardcode it for now, so the next virt-install release has - # a better chance of doing the right thing for win11 when - # it pops up in a osinfo-db release. - ret = True return ret def get_recommended_resources(self):