mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixing VMWare Guest Disk Creation when Using Template (#52676)
This commit is contained in:
parent
2f44ac4edc
commit
e729ad56a0
1 changed files with 2 additions and 2 deletions
|
@ -1818,8 +1818,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
|
||||||
elif vm_obj is None:
|
elif vm_obj is None or self.params['template']:
|
||||||
# We are creating new VM
|
# We are creating new VM or from Template
|
||||||
diskspec.fileOperation = vim.vm.device.VirtualDeviceSpec.FileOperation.create
|
diskspec.fileOperation = vim.vm.device.VirtualDeviceSpec.FileOperation.create
|
||||||
|
|
||||||
# which datastore?
|
# which datastore?
|
||||||
|
|
Loading…
Reference in a new issue