diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 662d15e28e..52ea148a0f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2234,7 +2234,8 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, if (disk->iothread > 0) iothread = g_strdup_printf("iothread%u", disk->iothread); - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_SCSI)) { + if (virStorageSourceGetActualType(disk->src) != VIR_STORAGE_TYPE_VHOST_USER && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_SCSI)) { /* if sg_io is true but the scsi option isn't supported, * that means it's just always on in this version of qemu. */ diff --git a/tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args b/tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args index 6c5d6de46b..4480266e75 100644 --- a/tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args @@ -30,9 +30,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -chardev socket,id=chr-vu-virtio-disk0,path=/tmp/vhost1.sock \ --device vhost-user-blk-pci,scsi=off,bus=pci.0,addr=0x2,chardev=chr-vu-virtio-disk0,id=virtio-disk0,bootindex=1 \ +-device vhost-user-blk-pci,bus=pci.0,addr=0x2,chardev=chr-vu-virtio-disk0,id=virtio-disk0,bootindex=1 \ -chardev socket,id=chr-vu-virtio-disk1,path=/tmp/vhost1.sock,reconnect=10 \ --device vhost-user-blk-pci,iommu_platform=on,ats=on,packed=on,scsi=off,bus=pci.0,addr=0x3,chardev=chr-vu-virtio-disk1,id=virtio-disk1 \ +-device vhost-user-blk-pci,iommu_platform=on,ats=on,packed=on,bus=pci.0,addr=0x3,chardev=chr-vu-virtio-disk1,id=virtio-disk1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \