-1

I could create VM in VMware from existing VMDK from Vsphere client. But I am not able to create it using Ansible. Can anyone suggest how to create VM from existing VMDK with Ansible?

Konstantin Suvorov
  • 65,183
  • 9
  • 162
  • 193
Pooja
  • 11
  • 3

1 Answers1

1

From my experience, you can't do it out of the box with Ansible.

I edited vsphere_guest module to be able to accomplish this for my client.
Unfortunately I can't disclose this custom module's code.

You need to modify add_disk method: remove create file operation and set existing VMDK filename for disk backing.

Konstantin Suvorov
  • 65,183
  • 9
  • 162
  • 193