Pooja
Pooja

Reputation: 11

Create VM from VMDK in VMware using Ansible

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?

Upvotes: -1

Views: 1090

Answers (1)

Konstantin Suvorov
Konstantin Suvorov

Reputation: 68329

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.

Upvotes: 1

Related Questions