esx: Allow 'vmpvscsi' as SCSI controller model

This commit is contained in:
Matthias Bolte 2010-06-24 16:58:54 +02:00
parent 8c145200e7
commit afb85c5889
9 changed files with 55 additions and 9 deletions

View File

@ -302,7 +302,13 @@ ethernet0.checkMACAddress = "false"
</dd> </dd>
<dt><code>lsisas1068</code></dt> <dt><code>lsisas1068</code></dt>
<dd> <dd>
LSI Logic SAS 1068 controller. LSI Logic SAS 1068 controller. <span class="since">Since 0.8.0</span>
</dd>
<dt><code>vmpvscsi</code></dt>
<dd>
Special VMware Paravirtual SCSI controller, requires VMware tools inside
the guest. See <a href="http://kb.vmware.com/kb/1010398">VMware KB1010398</a>
for details. <span class="since">Since 0.8.3</span>
</dd> </dd>
</dl> </dl>
<p> <p>
@ -642,5 +648,10 @@ Enter administrator password for example-vcenter.com:
VMware VMX config parameters VMware VMX config parameters
</a> </a>
</li> </li>
<li>
<a href="http://www.vmware.com/pdf/vsp_4_pvscsi_perf.pdf">
VMware ESX 4.0 PVSCSI Storage Performance
</a>
</li>
</ul> </ul>
</body></html> </body></html>

View File

@ -679,6 +679,7 @@
<value>buslogic</value> <value>buslogic</value>
<value>lsilogic</value> <value>lsilogic</value>
<value>lsisas1068</value> <value>lsisas1068</value>
<value>vmpvscsi</value>
</choice> </choice>
</attribute> </attribute>
</optional> </optional>

View File

@ -143,7 +143,8 @@ VIR_ENUM_IMPL(virDomainController, VIR_DOMAIN_CONTROLLER_TYPE_LAST,
VIR_ENUM_IMPL(virDomainControllerModel, VIR_DOMAIN_CONTROLLER_MODEL_LAST, VIR_ENUM_IMPL(virDomainControllerModel, VIR_DOMAIN_CONTROLLER_MODEL_LAST,
"buslogic", "buslogic",
"lsilogic", "lsilogic",
"lsisas1068") "lsisas1068",
"vmpvscsi")
VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST, VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,
"mount", "mount",

View File

@ -199,6 +199,7 @@ enum virDomainControllerModel {
VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC, VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC,
VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC, VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC,
VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068, VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068,
VIR_DOMAIN_CONTROLLER_MODEL_VMPVSCSI,
VIR_DOMAIN_CONTROLLER_MODEL_LAST VIR_DOMAIN_CONTROLLER_MODEL_LAST
}; };

View File

@ -428,6 +428,15 @@ def->parallels[0]...
#define ESX_BUILD_VMX_NAME(_suffix) \ #define ESX_BUILD_VMX_NAME(_suffix) \
snprintf(_suffix##_name, sizeof(_suffix##_name), "%s."#_suffix, prefix); snprintf(_suffix##_name, sizeof(_suffix##_name), "%s."#_suffix, prefix);
/* directly map the virDomainControllerModel to esxVMX_SCSIControllerModel,
* this is good enough for now because all virDomainControllerModel values
* are actually SCSI controller models in the ESX case */
VIR_ENUM_DECL(esxVMX_SCSIControllerModel)
VIR_ENUM_IMPL(esxVMX_SCSIControllerModel, VIR_DOMAIN_CONTROLLER_MODEL_LAST,
"buslogic",
"lsilogic",
"lsisas1068",
"pvscsi");
int int
@ -740,11 +749,12 @@ esxVMX_GatherSCSIControllers(virDomainDefPtr def, int virtualDev[4],
if (controller->model != -1 && if (controller->model != -1 &&
controller->model != VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC && controller->model != VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC &&
controller->model != VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC && controller->model != VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC &&
controller->model != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068) { controller->model != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068 &&
controller->model != VIR_DOMAIN_CONTROLLER_MODEL_VMPVSCSI) {
ESX_ERROR(VIR_ERR_INTERNAL_ERROR, ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
_("Expecting domain XML attribute 'model' of entry " _("Expecting domain XML attribute 'model' of entry "
"'controller' to be 'buslogic' or 'lsilogic' or " "'controller' to be 'buslogic' or 'lsilogic' or "
"'lsisas1068' but found '%s'"), "'lsisas1068' or 'vmpvscsi' but found '%s'"),
virDomainControllerModelTypeToString(controller->model)); virDomainControllerModelTypeToString(controller->model));
return -1; return -1;
} }
@ -1478,16 +1488,17 @@ esxVMX_ParseSCSIController(virConfPtr conf, int controller, bool *present,
*tmp = c_tolower(*tmp); *tmp = c_tolower(*tmp);
} }
*virtualDev = virDomainControllerModelTypeFromString(virtualDev_string); *virtualDev = esxVMX_SCSIControllerModelTypeFromString(virtualDev_string);
if (*virtualDev == -1 || if (*virtualDev == -1 ||
(*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC && (*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC &&
*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC && *virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC &&
*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068)) { *virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068 &&
*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_VMPVSCSI)) {
ESX_ERROR(VIR_ERR_INTERNAL_ERROR, ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
_("Expecting VMX entry '%s' to be 'buslogic' or 'lsilogic' " _("Expecting VMX entry '%s' to be 'buslogic' or 'lsilogic' "
"or 'lsisas1068' but found '%s'"), virtualDev_name, "or 'lsisas1068' or 'pvscsi' but found '%s'"),
virtualDev_string); virtualDev_name, virtualDev_string);
goto failure; goto failure;
} }
} }
@ -2619,7 +2630,7 @@ esxVMX_FormatConfig(esxVI_Context *ctx, virCapsPtr caps, virDomainDefPtr def,
if (scsi_virtualDev[i] != -1) { if (scsi_virtualDev[i] != -1) {
virBufferVSprintf(&buffer, "scsi%d.virtualDev = \"%s\"\n", i, virBufferVSprintf(&buffer, "scsi%d.virtualDev = \"%s\"\n", i,
virDomainControllerModelTypeToString esxVMX_SCSIControllerModelTypeToString
(scsi_virtualDev[i])); (scsi_virtualDev[i]));
} }
} }

View File

@ -6,6 +6,8 @@ scsi1.present = "true"
scsi1.virtualDev = "lsilogic" scsi1.virtualDev = "lsilogic"
scsi2.present = "true" scsi2.present = "true"
scsi2.virtualDev = "lsisas1068" scsi2.virtualDev = "lsisas1068"
scsi3.present = "true"
scsi3.virtualDev = "pvscsi"
scsi0:0.present = "true" scsi0:0.present = "true"
scsi0:0.deviceType = "scsi-hardDisk" scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "harddisk1.vmdk" scsi0:0.fileName = "harddisk1.vmdk"
@ -15,3 +17,6 @@ scsi1:0.fileName = "harddisk2.vmdk"
scsi2:0.present = "true" scsi2:0.present = "true"
scsi2:0.deviceType = "scsi-hardDisk" scsi2:0.deviceType = "scsi-hardDisk"
scsi2:0.fileName = "harddisk3.vmdk" scsi2:0.fileName = "harddisk3.vmdk"
scsi3:0.present = "true"
scsi3:0.deviceType = "scsi-hardDisk"
scsi3:0.fileName = "harddisk4.vmdk"

View File

@ -26,8 +26,14 @@
<target dev='sdae' bus='scsi'/> <target dev='sdae' bus='scsi'/>
<address type='drive' controller='2' bus='0' unit='0'/> <address type='drive' controller='2' bus='0' unit='0'/>
</disk> </disk>
<disk type='file' device='disk'>
<source file='[datastore] directory/harddisk4.vmdk'/>
<target dev='sdat' bus='scsi'/>
<address type='drive' controller='3' bus='0' unit='0'/>
</disk>
<controller type='scsi' index='0' model='buslogic'/> <controller type='scsi' index='0' model='buslogic'/>
<controller type='scsi' index='1' model='lsilogic'/> <controller type='scsi' index='1' model='lsilogic'/>
<controller type='scsi' index='2' model='lsisas1068'/> <controller type='scsi' index='2' model='lsisas1068'/>
<controller type='scsi' index='3' model='vmpvscsi'/>
</devices> </devices>
</domain> </domain>

View File

@ -11,6 +11,8 @@ scsi1.present = "true"
scsi1.virtualDev = "lsilogic" scsi1.virtualDev = "lsilogic"
scsi2.present = "true" scsi2.present = "true"
scsi2.virtualDev = "lsisas1068" scsi2.virtualDev = "lsisas1068"
scsi3.present = "true"
scsi3.virtualDev = "pvscsi"
scsi0:0.present = "true" scsi0:0.present = "true"
scsi0:0.deviceType = "scsi-hardDisk" scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "/vmfs/volumes/datastore/directory/harddisk1.vmdk" scsi0:0.fileName = "/vmfs/volumes/datastore/directory/harddisk1.vmdk"
@ -20,3 +22,6 @@ scsi1:0.fileName = "/vmfs/volumes/datastore/directory/harddisk2.vmdk"
scsi2:0.present = "true" scsi2:0.present = "true"
scsi2:0.deviceType = "scsi-hardDisk" scsi2:0.deviceType = "scsi-hardDisk"
scsi2:0.fileName = "/vmfs/volumes/datastore/directory/harddisk3.vmdk" scsi2:0.fileName = "/vmfs/volumes/datastore/directory/harddisk3.vmdk"
scsi3:0.present = "true"
scsi3:0.deviceType = "scsi-hardDisk"
scsi3:0.fileName = "/vmfs/volumes/datastore/directory/harddisk4.vmdk"

View File

@ -21,5 +21,10 @@
<source file='[datastore] directory/harddisk3.vmdk'/> <source file='[datastore] directory/harddisk3.vmdk'/>
<target dev='sdae' bus='scsi'/> <target dev='sdae' bus='scsi'/>
</disk> </disk>
<disk type='file' device='disk'>
<driver name='vmpvscsi'/>
<source file='[datastore] directory/harddisk4.vmdk'/>
<target dev='sdat' bus='scsi'/>
</disk>
</devices> </devices>
</domain> </domain>