mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
54ac483e68
Introduce a new structure to handle an iSCSI host device based on the existing virDomainHostdevSubsysSCSI by adding a "protocol='iscsi'" to the <source/> element. The existing scsi_host subsystem RNG was modified to read an optional "protocol='adapter'", although it won't be written out nor is it documented as an option (by choice). The new hostdev structure mimics the existing <disk/> element for an iSCSI device (network) device. New XML is: <hostdev mode='subsystem' type='scsi' managed='yes'> <source protocol='iscsi' name='iqn.1992-01.com.example'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> </auth> </source> <address type='drive' controller='0' bus='0' target='2' unit='5'/> </hostdev> The controller element will mimic the existing scsi_host code insomuch as when 'lsi' and 'virtio-scsi' are used.
17 lines
949 B
Plaintext
17 lines
949 B
Plaintext
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
|
/usr/bin/qemu -S -M \
|
|
pc -m 214 -smp 1 -nographic -nodefaults -monitor \
|
|
unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
|
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -usb \
|
|
-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-0 \
|
|
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
|
|
-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org\
|
|
:3260/iqn.1992-01.com.example,if=none,format=raw,id=drive-hostdev0 \
|
|
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,\
|
|
drive=drive-hostdev0,id=hostdev0 \
|
|
-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org\
|
|
:3260/iqn.1992-01.com.example/1,if=none,format=raw,id=drive-hostdev1 \
|
|
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\
|
|
drive=drive-hostdev1,id=hostdev1 \
|
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|