]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: hostdev-scsi-virtio-scsi: Add hostdev with useralias
authorPeter Krempa <pkrempa@redhat.com>
Thu, 10 Sep 2020 13:48:38 +0000 (15:48 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 15 Sep 2020 13:20:23 +0000 (15:20 +0200)
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>
tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args
tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args
tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args
tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml
tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml

index c5a3c0ce61db377c2d2a17c5f2c712d888ffd115..07b7a5b11309468966616609e77e85a02eb26ae2 100644 (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,\
index f2591d69569c25d1db64e195401efd75cc7423b8..421edf90d0c151da68135cfdffdcccc9bfa9273c 100644 (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 \
index f86cbd73144bd94bdf31bb0305e44fd9be30b24a..a2302d108954b9beb5dc1e89bb860cf20a5e8886 100644 (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}' \
index f1caf80644e35c756d288dd1c1013926fd9bb543..8da3fb1bfcae399adb3b2298f44112e8e0184a26 100644 (file)
       <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'/>
index 6c7e22d0c37ab8dc7a86de33d84b7c362bd2d753..733d1d72a05faa0342922b2df2c736af2c160112 100644 (file)
       <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'/>