1
0
mirror of https://src.fedoraproject.org/rpms/virt-manager.git synced 2025-07-16 01:03:36 +00:00
Files
virt-manager/0013-guest-Use-sata-by-default-for-q35-cdrom-non-virtio-b.patch
Cole Robinson abec60a042 sshtunnels: Don't use socket API for fd passed to spice (bz #1135808)
Fix available install options for qemu ppc64le (bz #1209720)
Catch errors fetching domcapabilities, fix ppc64le details (bz #1209723)
Improve disk defaults for qemu -M q35 (bz #1207834)
2015-04-13 18:37:47 -04:00

174 lines
5.4 KiB
Diff

From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 6 Apr 2015 13:43:18 -0400
Subject: [PATCH virt-manager] guest: Use sata by default for q35 cdrom,
non-virtio (bz #1207834)
(cherry picked from commit e29f216503106738328d267b33773f54230c2f86)
---
.../compare/virt-install-q35-defaults.xml | 133 +++++++++++++++++++++
virtinst/guest.py | 4 +
2 files changed, 137 insertions(+)
create mode 100644 tests/cli-test-xml/compare/virt-install-q35-defaults.xml
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 0000000..b87afe1
--- /dev/null
+++ b/tests/cli-test-xml/compare/virt-install-q35-defaults.xml
@@ -0,0 +1,133 @@
+<domain type="kvm">
+ <name>foobar</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <memory>65536</memory>
+ <currentMemory>65536</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch="x86_64" machine="q35">hvm</type>
+ <boot dev="cdrom"/>
+ <boot dev="hd"/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode="custom" match="exact">
+ <model>core2duo</model>
+ </cpu>
+ <clock offset="utc">
+ <timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>destroy</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-kvm</emulator>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/dev/default-pool/testvol1.img"/>
+ <target dev="sda" bus="sata"/>
+ </disk>
+ <disk type="file" device="cdrom">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/dev/default-pool/testvol2.img"/>
+ <target dev="sdb" bus="sata"/>
+ <readonly/>
+ </disk>
+ <controller type="usb" index="0" model="ich9-ehci1"/>
+ <controller type="usb" index="0" model="ich9-uhci1">
+ <master startport="0"/>
+ </controller>
+ <controller type="usb" index="0" model="ich9-uhci2">
+ <master startport="2"/>
+ </controller>
+ <controller type="usb" index="0" model="ich9-uhci3">
+ <master startport="4"/>
+ </controller>
+ <interface type="bridge">
+ <source bridge="eth0"/>
+ <mac address="00:11:22:33:44:55"/>
+ </interface>
+ <input type="mouse" bus="ps2"/>
+ <graphics type="spice" port="-1" tlsPort="-1" autoport="yes"/>
+ <console type="pty"/>
+ <channel type="spicevmc">
+ <target type="virtio" name="com.redhat.spice.0"/>
+ </channel>
+ <sound model="ich6"/>
+ <video>
+ <model type="qxl"/>
+ </video>
+ <redirdev bus="usb" type="spicevmc"/>
+ <redirdev bus="usb" type="spicevmc"/>
+ </devices>
+</domain>
+<domain type="kvm">
+ <name>foobar</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <memory>65536</memory>
+ <currentMemory>65536</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch="x86_64" machine="q35">hvm</type>
+ <boot dev="hd"/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode="custom" match="exact">
+ <model>core2duo</model>
+ </cpu>
+ <clock offset="utc">
+ <timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-kvm</emulator>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/dev/default-pool/testvol1.img"/>
+ <target dev="sda" bus="sata"/>
+ </disk>
+ <disk type="block" device="cdrom">
+ <target dev="sdb" bus="sata"/>
+ <readonly/>
+ </disk>
+ <controller type="usb" index="0" model="ich9-ehci1"/>
+ <controller type="usb" index="0" model="ich9-uhci1">
+ <master startport="0"/>
+ </controller>
+ <controller type="usb" index="0" model="ich9-uhci2">
+ <master startport="2"/>
+ </controller>
+ <controller type="usb" index="0" model="ich9-uhci3">
+ <master startport="4"/>
+ </controller>
+ <interface type="bridge">
+ <source bridge="eth0"/>
+ <mac address="00:11:22:33:44:55"/>
+ </interface>
+ <input type="mouse" bus="ps2"/>
+ <graphics type="spice" port="-1" tlsPort="-1" autoport="yes"/>
+ <console type="pty"/>
+ <channel type="spicevmc">
+ <target type="virtio" name="com.redhat.spice.0"/>
+ </channel>
+ <sound model="ich6"/>
+ <video>
+ <model type="qxl"/>
+ </video>
+ <redirdev bus="usb" type="spicevmc"/>
+ <redirdev bus="usb" type="spicevmc"/>
+ </devices>
+</domain>
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 2d0ec87..c0ce305 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -875,6 +875,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
@@ -886,6 +888,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"