diff --git a/tests/cli-test-xml/compare/virt-install-q35-defaults.xml b/tests/cli-test-xml/compare/virt-install-q35-defaults.xml new file mode 100644 index 000000000..b87afe1f8 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-q35-defaults.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 1d1560e44..6fe131051 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -773,7 +773,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.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 - +c.add_compare("--machine q35 --cdrom %(EXISTIMG2)s --disk %(EXISTIMG1)s", "q35-defaults") # proper q35 disk defaults ###################### diff --git a/virtinst/guest.py b/virtinst/guest.py index a736bb4c4..bcc9b813f 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -926,6 +926,8 @@ class Guest(XMLBuilder): d.bus = "xen" return if not self.os.is_hvm(): + # This likely isn't correct, but it's kind of a catch all + # for virt types we don't know how to handle. d.bus = "ide" return @@ -941,6 +943,8 @@ class Guest(XMLBuilder): d.bus = "scsi" elif self.os.is_arm(): d.bus = "sd" + elif self.os.is_q35(): + d.bus = "sata" else: d.bus = "ide"