How to convert existing VM into template from vmware driver
Description of Issue/Question
How to convert existing VM into template from vmware driver?? Similar thing we can do from vCenter GUI.
Currently we can clone a VM and create template out of it using following config:
$ cat /etc/salt/cloud.profiles
vm_profile:
provider: vcenter
clonefrom: test-vm
template: true
folder: 'VMs'
deploy: False
$ salt-cloud -p vm_profile 'vm_template' -l debug
But how can i convert already existing VM to Template??
Ping @nmadhok. @anandnevase, you may also want to ask on the salt-users mailing list.
@anandnevase @jfindlay That functionality currently doesn't exist but should be pretty easy to add (since the code for it already exists). You can currently clone a VM to a template and then destroy the original VM.
@nmadhok Creating template using VM cloning is not good option. As per pyvmomi documentation, we can use MarkAsTemplate() method to convert existing VM into template.
@anandnevase Will look into adding the functionality sometime soon.
Fixed in #43980, could be close now.