Commit
32f7db0989e4 added support for superwide SCSI, but did not change
the disk ID calculation which resulted in a possible duplicate. Change
it to calculate based on the (already decided) maximum of SCSI units per
bus and add a (well, modify existing) test case.
Fixes: 32f7db0989e4
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
- idx = controllerOrBus * 15 + (unit < 7 ? unit : unit - 1);
+ idx = controllerOrBus * (vmdef->scsiBusMaxUnit - 1) + (unit < 7 ? unit : unit - 1);
sched.scsi0:16.throughputCap = "off"
scsi0:16.present = "TRUE"
scsi0:16.redo = ""
sched.scsi0:16.throughputCap = "off"
scsi0:16.present = "TRUE"
scsi0:16.redo = ""
+scsi1.virtualDev = "pvscsi"
+scsi1.present = "TRUE"
+scsi1:0.deviceType = "scsi-hardDisk"
+scsi1:0.fileName = "esx6.7-rhel7.7-x86_64_4.vmdk"
+sched.scsi1:0.shares = "normal"
+scsi1:0.present = "TRUE"
<target dev='sdp' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='16'/>
</disk>
<target dev='sdp' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='16'/>
</disk>
+ <disk type='file' device='disk'>
+ <source file='[datastore] directory/esx6.7-rhel7.7-x86_64_4.vmdk'/>
+ <target dev='sdbl' bus='scsi'/>
+ <address type='drive' controller='1' bus='0' target='0' unit='0'/>
+ </disk>
<controller type='scsi' index='0' model='vmpvscsi'/>
<controller type='scsi' index='0' model='vmpvscsi'/>
+ <controller type='scsi' index='1' model='vmpvscsi'/>
<interface type='bridge'>
<mac address='00:50:56:ac:3e:a1' type='generated'/>
<source bridge='VM Network'/>
<interface type='bridge'>
<mac address='00:50:56:ac:3e:a1' type='generated'/>
<source bridge='VM Network'/>