VMware: do create VMDK for new VMs (#51753)

While creating new VM, don't assume the VMDKs are present,
create them as we attache the disk to VM.

Possible regression fix for introduced via #45953

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2019-02-08 10:14:04 +05:30 committed by GitHub
parent 6193875a58
commit 851d248096
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1810,7 +1810,8 @@ class PyVmomiHelper(PyVmomi):
if 'filename' in expected_disk_spec and expected_disk_spec['filename'] is not None:
self.add_existing_vmdk(vm_obj, expected_disk_spec, diskspec, scsi_ctl)
continue
else:
elif vm_obj is None:
# We are creating new VM
diskspec.fileOperation = vim.vm.device.VirtualDeviceSpec.FileOperation.create
# which datastore?