diff --git a/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml new file mode 100644 index 00000000..e183b738 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml @@ -0,0 +1,133 @@ + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + + + + + + + + + + core2duo + + + + + + + destroy + destroy + destroy + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + + + + + + + + + core2duo + + + + + + + destroy + restart + restart + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml new file mode 100644 index 00000000..e183b738 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml @@ -0,0 +1,133 @@ + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + + + + + + + + + + core2duo + + + + + + + destroy + destroy + destroy + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + + + + + + + + + core2duo + + + + + + + destroy + restart + restart + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml new file mode 100644 index 00000000..e183b738 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml @@ -0,0 +1,133 @@ + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + + + + + + + + + + core2duo + + + + + + + destroy + destroy + destroy + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + foobar + 00000000-1111-2222-3333-444444444444 + 65536 + 65536 + 1 + + hvm + + + + + + + + + core2duo + + + + + + + destroy + restart + restart + + /usr/bin/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/clitest.py b/tests/clitest.py index edfc0e7a..3b1e47b0 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -523,6 +523,9 @@ c.add_compare("--arch armv7l --machine vexpress-a9 --boot kernel=/f19-arm.kernel 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 rw root=/dev/vda3\",extra_args=foo --disk %(EXISTIMG1)s --nographics --os-variant fedora19", "arm-vexpress-f19", skip_check=support.SUPPORT_CONN_VIRTIO_MMIO) c.add_compare("--arch ppc64 --machine pseries --boot network --disk %(EXISTIMG1)s --os-variant fedora20 --network none", "ppc64-pseries-f20") c.add_compare("--disk none --location /tmp/fake.iso --nonetworks", "location-iso") # Using --location iso mounting +c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel6.4", "kvm-rhel6") # RHEL6 defaults +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_valid("--cdrom %(EXISTIMG2)s --file %(EXISTIMG1)s --os-variant win2k3 --wait 0 --sound") # HVM windows install with disk c.add_valid("--os-variant fedora20 --file %(EXISTIMG1)s --location %(TREEDIR)s --extra-args console=ttyS0 --sound") # F14 Directory tree URL install with extra-args c.add_invalid("--disk none --boot network --machine foobar") # Unknown machine type diff --git a/virtinst/osdict.py b/virtinst/osdict.py index f4bdbe0d..16a1fb1d 100644 --- a/virtinst/osdict.py +++ b/virtinst/osdict.py @@ -325,10 +325,14 @@ class _OsVariant(_OsVariantType): if not self._os: return _SENTINEL + if self.name.split(".")[0] in ["rhel7", "rhel6", "centos7", "centos6"]: + return True + if self._os.get_distro() == "fedora": if self._os.get_version() == "unknown": return _SENTINEL return int(self._os.get_version()) >= 18 or _SENTINEL + return _SENTINEL def _is_hyperv_features(self):