guest: Use virtio-scsi where supported

Right now we're limiting use of virtio-scsi to ppc64/pseries
and aarch64/virt guests, but there's really no reason not to
use it wherever it's available.

This results in virtio-scsi being now used on s390x, where no
other sensible SCSI controller implementation is available
anyway, and x86, where you alreayd didn't want end up using
lsilogic.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2019-03-04 17:11:15 +01:00 committed by Cole Robinson
parent c2bcb9e5a6
commit 47753eab26
4 changed files with 4 additions and 2 deletions

View File

@ -184,6 +184,7 @@
<master startport="4"/>
<address type="pci" domain="0" bus="0" slot="4" function="2"/>
</controller>
<controller type="scsi" index="0" model="virtio-scsi"/>
<filesystem type="mount" accessmode="mapped">
<source dir="/source"/>
<target dir="/target"/>

View File

@ -28,6 +28,7 @@
<target dev="sda" bus="scsi"/>
<readonly/>
</disk>
<controller type="scsi" index="0" model="virtio-scsi"/>
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>

View File

@ -28,6 +28,7 @@
<target dev="sda" bus="scsi"/>
<readonly/>
</disk>
<controller type="scsi" index="0" model="virtio-scsi"/>
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>

View File

@ -835,8 +835,7 @@ class Guest(XMLBuilder):
has_any_scsi = True
# Add virtio-scsi controller if needed
if ((self.os.is_arm_machvirt() or self.os.is_pseries()) and
not has_any_scsi):
if not has_any_scsi and self.supports_virtioscsi():
for dev in self.devices.disk:
if dev.bus == "scsi":
ctrl = DeviceController(self.conn)