-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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.