I’m cloning a VM template with a particular vmx configuration that I cannot create using Packer. I need to boot the cloned VM and use the winrm communicator afterwards. Basically just like the vsphere-iso builder, only that it clones beforehand. Any way to do this?
Personally I would invoke
govmomi for this job:
This file has been truncated.
# govc usage
This document is generated from `govc -h` and `govc $cmd -h` commands.
The following common options are filtered out in this document,
but appear via `govc $cmd -h`:
-cert= Certificate [GOVC_CERTIFICATE]
-debug=false Store debug logs [GOVC_DEBUG]
-dump=false Enable output dump
-json=false Enable JSON output
-xml=false Enable XML output
-k=false Skip verification of server certificate [GOVC_INSECURE]
-key= Private key [GOVC_PRIVATE_KEY]
-persist-session=true Persist session to disk [GOVC_PERSIST_SESSION]
-tls-ca-certs= TLS CA certificates file [GOVC_TLS_CA_CERTS]
-tls-known-hosts= TLS known hosts file [GOVC_TLS_KNOWN_HOSTS]
-u= ESX or vCenter URL [GOVC_URL]
-vim-namespace=urn:vim25 Vim namespace [GOVC_VIM_NAMESPACE]
Have you looked at the
Did you find/get an answer for that? I’m having the same requirement
That works very well, when creating VMs from templates.
but I haven’t yet found a way to also boot the VM afterwards.
i’ve included some ansible provisioners that should power on the VM and perform other stuff, afterwards, but they don’t seem to get executed by the build.