From: Matthias Bolte Date: Fri, 11 Jun 2010 21:18:17 +0000 (+0200) Subject: esx: Accept 'disk' as harddisk device type in .vmx files X-Git-Tag: v0.8.2~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0f414c67b35cce79435bde86e5dea15172376a1;p=thirdparty%2Flibvirt.git esx: Accept 'disk' as harddisk device type in .vmx files --- diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c index 5cadb5a26c..675318f3db 100644 --- a/src/esx/esx_vmx.c +++ b/src/esx/esx_vmx.c @@ -1542,16 +1542,20 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus, if (virFileHasSuffix(fileName, ".vmdk")) { if (deviceType != NULL) { if (bus == VIR_DOMAIN_DISK_BUS_SCSI && - STRCASENEQ(deviceType, "scsi-hardDisk")) { + STRCASENEQ(deviceType, "scsi-hardDisk") && + STRCASENEQ(deviceType, "disk")) { ESX_ERROR(VIR_ERR_INTERNAL_ERROR, _("Expecting VMX entry '%s' to be 'scsi-hardDisk' " - "but found '%s'"), deviceType_name, deviceType); + "or 'disk' but found '%s'"), deviceType_name, + deviceType); goto cleanup; } else if (bus == VIR_DOMAIN_DISK_BUS_IDE && - STRCASENEQ(deviceType, "ata-hardDisk")) { + STRCASENEQ(deviceType, "ata-hardDisk") && + STRCASENEQ(deviceType, "disk")) { ESX_ERROR(VIR_ERR_INTERNAL_ERROR, _("Expecting VMX entry '%s' to be 'ata-hardDisk' " - "but found '%s'"), deviceType_name, deviceType); + "or 'disk' but found '%s'"), deviceType_name, + deviceType); goto cleanup; } }