[libvirt] [PATCH] esx: Accept 'disk' as harddisk device type in .vmx files
Matthias Bolte
matthias.bolte at googlemail.com
Wed Jun 16 22:24:38 UTC 2010
2010/6/15 Jiri Denemark <jdenemar at redhat.com>:
>> src/esx/esx_vmx.c | 12 ++++++++----
>> 1 files changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
>> index 5cadb5a..675318f 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;
>> }
>> }
>
> ACK
>
> Jirka
>
Thanks, pushed.
Matthias
More information about the libvir-list
mailing list