mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
esx: Allow 'lsisas1068' as SCSI controller type
Extend tests to cover all SCSI controller types and document the new type. The lsisas1068 SCSI controller type was added in ESX 4.0. The VMX parser reports an error when this controller type is present. This makes virsh dumpxml fail for every domain that uses this controller type. This patch fixes this and adds lsisas1068 to the list of accepted SCSI controller types. Reported by Jonathan Kelley.
This commit is contained in:
parent
fba503c368
commit
4acab37f56
@ -282,6 +282,10 @@ ethernet0.checkMACAddress = "false"
|
||||
<dd>
|
||||
LSI Logic SCSI controller for recent guests.
|
||||
</dd>
|
||||
<dt><code>lsisas1068</code></dt>
|
||||
<dd>
|
||||
LSI Logic SAS 1068 controller.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
Here a domain XML snippet:
|
||||
|
@ -552,10 +552,11 @@ esxVMX_GatherSCSIControllers(virDomainDefPtr def, char *virtualDev[4],
|
||||
|
||||
if (disk->driverName != NULL &&
|
||||
STRCASENEQ(disk->driverName, "buslogic") &&
|
||||
STRCASENEQ(disk->driverName, "lsilogic")) {
|
||||
STRCASENEQ(disk->driverName, "lsilogic") &&
|
||||
STRCASENEQ(disk->driverName, "lsisas1068")) {
|
||||
ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Expecting domain XML entry 'devices/disk/target' to "
|
||||
"be 'buslogic' or 'lsilogic' but found '%s'"),
|
||||
"be 'buslogic' or 'lsilogic' or 'lsisas1068' but found '%s'"),
|
||||
disk->driverName);
|
||||
return -1;
|
||||
}
|
||||
@ -1266,10 +1267,11 @@ esxVMX_ParseSCSIController(virConfPtr conf, int controller, int *present,
|
||||
|
||||
if (*virtualDev != NULL &&
|
||||
STRCASENEQ(*virtualDev, "buslogic") &&
|
||||
STRCASENEQ(*virtualDev, "lsilogic")) {
|
||||
STRCASENEQ(*virtualDev, "lsilogic") &&
|
||||
STRCASENEQ(*virtualDev, "lsisas1068")) {
|
||||
ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Expecting VMX entry '%s' to be 'buslogic' or 'lsilogic' "
|
||||
"but found '%s'"), virtualDev_name, *virtualDev);
|
||||
_("Expecting VMX entry '%s' to be 'buslogic' or 'lsilogic' or "
|
||||
"'lsisas1068' but found '%s'"), virtualDev_name, *virtualDev);
|
||||
goto failure;
|
||||
}
|
||||
|
||||
@ -1309,7 +1311,7 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
|
||||
* bus = VIR_DOMAIN_DISK_BUS_SCSI
|
||||
* controller = [0..3]
|
||||
* id = [0..6,8..15]
|
||||
* virtualDev = {'buslogic', 'lsilogic'}
|
||||
* virtualDev = {'buslogic', 'lsilogic', 'lsisas1068'}
|
||||
*
|
||||
* device = {VIR_DOMAIN_DISK_DEVICE_DISK, VIR_DOMAIN_DISK_DEVICE_CDROM}
|
||||
* bus = VIR_DOMAIN_DISK_BUS_IDE
|
||||
|
@ -1,7 +0,0 @@
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
scsi0.present = "true"
|
||||
scsi0.virtualDev = "buslogic"
|
||||
scsi0:0.present = "true"
|
||||
scsi0:0.deviceType = "scsi-hardDisk"
|
||||
scsi0:0.fileName = "harddisk.vmdk"
|
17
tests/vmx2xmldata/vmx2xml-scsi-driver.vmx
Normal file
17
tests/vmx2xmldata/vmx2xml-scsi-driver.vmx
Normal file
@ -0,0 +1,17 @@
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
scsi0.present = "true"
|
||||
scsi0.virtualDev = "buslogic"
|
||||
scsi1.present = "true"
|
||||
scsi1.virtualDev = "lsilogic"
|
||||
scsi2.present = "true"
|
||||
scsi2.virtualDev = "lsisas1068"
|
||||
scsi0:0.present = "true"
|
||||
scsi0:0.deviceType = "scsi-hardDisk"
|
||||
scsi0:0.fileName = "harddisk1.vmdk"
|
||||
scsi1:0.present = "true"
|
||||
scsi1:0.deviceType = "scsi-hardDisk"
|
||||
scsi1:0.fileName = "harddisk2.vmdk"
|
||||
scsi2:0.present = "true"
|
||||
scsi2:0.deviceType = "scsi-hardDisk"
|
||||
scsi2:0.fileName = "harddisk3.vmdk"
|
@ -13,8 +13,18 @@
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='buslogic'/>
|
||||
<source file='[datastore] directory/harddisk.vmdk'/>
|
||||
<source file='[datastore] directory/harddisk1.vmdk'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='lsilogic'/>
|
||||
<source file='[datastore] directory/harddisk2.vmdk'/>
|
||||
<target dev='sdp' bus='scsi'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='lsisas1068'/>
|
||||
<source file='[datastore] directory/harddisk3.vmdk'/>
|
||||
<target dev='sdae' bus='scsi'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
@ -130,7 +130,7 @@ mymain(int argc, char **argv)
|
||||
|
||||
DO_TEST("graphics-vnc", "graphics-vnc", esxVI_APIVersion_25);
|
||||
|
||||
DO_TEST("scsi-buslogic", "scsi-buslogic", esxVI_APIVersion_25);
|
||||
DO_TEST("scsi-driver", "scsi-driver", esxVI_APIVersion_25);
|
||||
DO_TEST("scsi-writethrough", "scsi-writethrough", esxVI_APIVersion_25);
|
||||
|
||||
DO_TEST("harddisk-scsi-file", "harddisk-scsi-file", esxVI_APIVersion_25);
|
||||
|
@ -1,12 +0,0 @@
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
guestOS = "other"
|
||||
uuid.bios = "56 4d 9b ef ac d9 b4 e0-c8 f0 ae a8 b9 10 35 15"
|
||||
displayName = "scsi-buslogic"
|
||||
memsize = "4"
|
||||
numvcpus = "1"
|
||||
scsi0.present = "true"
|
||||
scsi0.virtualDev = "buslogic"
|
||||
scsi0:0.present = "true"
|
||||
scsi0:0.deviceType = "scsi-hardDisk"
|
||||
scsi0:0.fileName = "/vmfs/volumes/datastore/directory/harddisk.vmdk"
|
@ -1,15 +0,0 @@
|
||||
<domain type='vmware'>
|
||||
<name>scsi-buslogic</name>
|
||||
<uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
|
||||
<memory>4096</memory>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='buslogic'/>
|
||||
<source file='[datastore] directory/harddisk.vmdk'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
22
tests/xml2vmxdata/xml2vmx-scsi-driver.vmx
Normal file
22
tests/xml2vmxdata/xml2vmx-scsi-driver.vmx
Normal file
@ -0,0 +1,22 @@
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
guestOS = "other"
|
||||
uuid.bios = "56 4d 9b ef ac d9 b4 e0-c8 f0 ae a8 b9 10 35 15"
|
||||
displayName = "scsi-buslogic"
|
||||
memsize = "4"
|
||||
numvcpus = "1"
|
||||
scsi0.present = "true"
|
||||
scsi0.virtualDev = "buslogic"
|
||||
scsi1.present = "true"
|
||||
scsi1.virtualDev = "lsilogic"
|
||||
scsi2.present = "true"
|
||||
scsi2.virtualDev = "lsisas1068"
|
||||
scsi0:0.present = "true"
|
||||
scsi0:0.deviceType = "scsi-hardDisk"
|
||||
scsi0:0.fileName = "/vmfs/volumes/datastore/directory/harddisk1.vmdk"
|
||||
scsi1:0.present = "true"
|
||||
scsi1:0.deviceType = "scsi-hardDisk"
|
||||
scsi1:0.fileName = "/vmfs/volumes/datastore/directory/harddisk2.vmdk"
|
||||
scsi2:0.present = "true"
|
||||
scsi2:0.deviceType = "scsi-hardDisk"
|
||||
scsi2:0.fileName = "/vmfs/volumes/datastore/directory/harddisk3.vmdk"
|
25
tests/xml2vmxdata/xml2vmx-scsi-driver.xml
Normal file
25
tests/xml2vmxdata/xml2vmx-scsi-driver.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<domain type='vmware'>
|
||||
<name>scsi-buslogic</name>
|
||||
<uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
|
||||
<memory>4096</memory>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='buslogic'/>
|
||||
<source file='[datastore] directory/harddisk1.vmdk'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='lsilogic'/>
|
||||
<source file='[datastore] directory/harddisk2.vmdk'/>
|
||||
<target dev='sdp' bus='scsi'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='lsisas1068'/>
|
||||
<source file='[datastore] directory/harddisk3.vmdk'/>
|
||||
<target dev='sdae' bus='scsi'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
@ -175,7 +175,7 @@ mymain(int argc, char **argv)
|
||||
|
||||
DO_TEST("graphics-vnc", "graphics-vnc", esxVI_APIVersion_25);
|
||||
|
||||
DO_TEST("scsi-buslogic", "scsi-buslogic", esxVI_APIVersion_25);
|
||||
DO_TEST("scsi-driver", "scsi-driver", esxVI_APIVersion_25);
|
||||
DO_TEST("scsi-writethrough", "scsi-writethrough", esxVI_APIVersion_25);
|
||||
|
||||
DO_TEST("harddisk-scsi-file", "harddisk-scsi-file", esxVI_APIVersion_25);
|
||||
|
Loading…
Reference in New Issue
Block a user