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>
pull/51934/head
Abhijeet Kasurde 6 years ago committed by GitHub
parent 6193875a58
commit 851d248096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save