mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
guest: Use sata by default for q35 cdrom, non-virtio (bz #1207834)
This commit is contained in:
parent
feb010621b
commit
e29f216503
133
tests/cli-test-xml/compare/virt-install-q35-defaults.xml
Normal file
133
tests/cli-test-xml/compare/virt-install-q35-defaults.xml
Normal file
@ -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>
|
@ -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
|
||||
|
||||
|
||||
######################
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user