qemuxml2argvtest: hostdev-scsi-virtio-scsi: Add hostdev with useralias

Add a SCSI host device with a user-specified alias to illustrate the
upcoming changes.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-09-10 15:48:38 +02:00
parent 931c1d128d
commit baea669e80
5 changed files with 26 additions and 0 deletions

View File

@ -37,6 +37,9 @@ drive=drive-hostdev0,id=hostdev0 \
-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\
drive=drive-hostdev1,id=hostdev1 \
-drive file=/dev/sg0,if=none,format=raw,id=drive-ua-test \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=6,drive=drive-ua-test,\
id=ua-test \
-drive file=iscsi://example.org:3260/iqn.1992-01.com.example/0,if=none,\
format=raw,id=drive-hostdev2 \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,\

View File

@ -36,6 +36,9 @@ drive=drive-hostdev0,id=hostdev0 \
-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\
drive=drive-hostdev1,id=hostdev1 \
-drive file=/dev/sg0,if=none,format=raw,id=drive-ua-test \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=6,drive=drive-ua-test,\
id=ua-test \
-drive file.driver=iscsi,file.portal=example.org:3260,\
file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,if=none,\
format=raw,id=drive-hostdev2 \

View File

@ -42,6 +42,10 @@ drive=libvirt-hostdev0-backend,id=hostdev0 \
"node-name":"libvirt-hostdev1-backend","read-only":true}' \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\
drive=libvirt-hostdev1-backend,id=hostdev1 \
-blockdev '{"driver":"host_device","filename":"/dev/sg0",\
"node-name":"libvirt-ua-test-backend","read-only":false}' \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=6,\
drive=libvirt-ua-test-backend,id=ua-test \
-blockdev '{"driver":"iscsi","portal":"example.org:3260",\
"target":"iqn.1992-01.com.example","lun":0,"transport":"tcp",\
"node-name":"libvirt-hostdev2-backend","read-only":false}' \

View File

@ -40,6 +40,14 @@
<readonly/>
<address type='drive' controller='0' bus='0' target='4' unit='7'/>
</hostdev>
<hostdev mode='subsystem' type='scsi' managed='no'>
<source>
<adapter name='scsi_host0'/>
<address bus='0' target='0' unit='2'/>
</source>
<alias name='ua-test'/>
<address type='drive' controller='0' bus='0' target='4' unit='6'/>
</hostdev>
<hostdev mode='subsystem' type='scsi' managed='yes'>
<source protocol='iscsi' name='iqn.1992-01.com.example'>
<host name='example.org' port='3260'/>

View File

@ -47,6 +47,14 @@
<readonly/>
<address type='drive' controller='0' bus='0' target='4' unit='7'/>
</hostdev>
<hostdev mode='subsystem' type='scsi' managed='no'>
<source>
<adapter name='scsi_host0'/>
<address bus='0' target='0' unit='2'/>
</source>
<alias name='ua-test'/>
<address type='drive' controller='0' bus='0' target='4' unit='6'/>
</hostdev>
<hostdev mode='subsystem' type='scsi' managed='yes'>
<source protocol='iscsi' name='iqn.1992-01.com.example/0'>
<host name='example.org' port='3260'/>