if (!(netsource = qemuBuildNetworkDriveStr(iscsisrc->src, srcPriv ?
srcPriv->secinfo : NULL)))
goto cleanup;
- virBufferAsprintf(&buf, "file=%s,if=none,format=raw", netsource);
+ virBufferAddLit(&buf, "file=");
+ virQEMUBuildBufferEscapeComma(&buf, netsource);
+ virBufferAddLit(&buf, ",if=none,format=raw");
}
if (virBufferCheckError(&buf) < 0)
-no-shutdown \
-no-acpi \
-boot c \
+-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \
-device usb-ccid,id=ccid0,bus=usb.0,port=1 \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
-spice unix,addr=/tmp/lib/domain--1-foo=1,,bar=2/spice.sock,gl=on,\
rendernode=/dev/dri/foo,,bar \
-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
+-drive file=iscsi://example.foo.org:3260/iqn.1992-01.com.example%3Amy,,\
+storage/1,if=none,format=raw,id=drive-hostdev0 \
+-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=0,lun=4,\
+drive=drive-hostdev0,id=hostdev0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
</iotune>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
+ <controller type='scsi' index='0' model='virtio-scsi'/>
+ <hostdev mode='subsystem' type='scsi' managed='yes'>
+ <source protocol='iscsi' name='iqn.1992-01.com.example:my,storage/1'>
+ <host name='example.foo.org' port='3260'/>
+ </source>
+ <address type='drive' controller='0' bus='0' target='0' unit='4'/>
+ </hostdev>
<graphics type='vnc'>
<listen type='socket'/>
</graphics>
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
QEMU_CAPS_DEVICE_ISA_SERIAL,
QEMU_CAPS_CHARDEV_FILE_APPEND,
- QEMU_CAPS_CCID_EMULATED);
+ QEMU_CAPS_CCID_EMULATED,
+ QEMU_CAPS_VIRTIO_SCSI,
+ QEMU_CAPS_DEVICE_SCSI_GENERIC);
DO_TEST("debug-threads", QEMU_CAPS_NAME_DEBUG_THREADS);
DO_TEST("master-key", QEMU_CAPS_OBJECT_SECRET);