mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
guest: Prefer virtio-scsi for arm mach-virt
Since it gives us disk hotplug, and CDROM devices, etc. This requires fairly recent patches to UEFI/OVMF/AAVMF
This commit is contained in:
parent
cbe5ca4c7d
commit
aa772f01e1
@ -28,12 +28,12 @@
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
</disk>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/dev/default-pool/testvol2.img"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
<target dev="sdb" bus="scsi"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<controller type="scsi" index="0" model="virtio-scsi"/>
|
||||
@ -74,10 +74,10 @@
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
<target dev="sda" bus="scsi"/>
|
||||
<target dev="sdb" bus="scsi"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<controller type="scsi" index="0" model="virtio-scsi"/>
|
||||
|
@ -27,8 +27,9 @@
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
</disk>
|
||||
<controller type="scsi" index="0" model="virtio-scsi"/>
|
||||
<interface type="bridge">
|
||||
<source bridge="eth0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
|
@ -27,8 +27,9 @@
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
</disk>
|
||||
<controller type="scsi" index="0" model="virtio-scsi"/>
|
||||
<interface type="bridge">
|
||||
<source bridge="eth0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
|
@ -24,8 +24,9 @@
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
</disk>
|
||||
<controller type="scsi" index="0" model="virtio-scsi"/>
|
||||
<interface type="bridge">
|
||||
<source bridge="eth0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
|
@ -24,8 +24,9 @@
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/dev/default-pool/testvol1.img"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
</disk>
|
||||
<controller type="scsi" index="0" model="virtio-scsi"/>
|
||||
<interface type="bridge">
|
||||
<source bridge="eth0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
|
@ -901,12 +901,13 @@ class Guest(XMLBuilder):
|
||||
d.bus = "ide"
|
||||
return
|
||||
|
||||
if self._can_virtio("virtiodisk") and d.is_disk():
|
||||
if self.os.is_arm_machvirt():
|
||||
# We prefer virtio-scsi for machvirt, gets us hotplug
|
||||
d.bus = "scsi"
|
||||
elif self._can_virtio("virtiodisk") and d.is_disk():
|
||||
d.bus = "virtio"
|
||||
elif self.os.is_pseries():
|
||||
d.bus = "scsi"
|
||||
elif self.os.is_arm_machvirt() and d.is_cdrom():
|
||||
d.bus = "scsi"
|
||||
elif self.os.is_arm():
|
||||
d.bus = "sd"
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user