mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user