Hi, I’m trying to clone a Windows Virtual Machine in order to copy in some file and produce a new one, but I’m unable to connect to it after cloning it and starting it. Here’s the configuration file:
{
"builders": [
{
"type":"vmware-vmx",
"source_path":"base-image.vmx",
"winrm_username": "Administrator",
"winrm_password": "password",
"shutdown_command": "shutdown /f /s",
"vm_name": "my-app-packer",
"communicator": "winrm"
}
],
"provisioners": [
{
"type": "file",
"source": "my-application.jar",
"destination": "C:\\release\\my-application.jar"
}
]
}
After the virtual machine is started, it waits until WinRM to become available and then time outs.
Here’s the log from the console:
vmware-vmx: output will be in this color.
==> vmware-vmx: Cloning source VM…
==> vmware-vmx: Starting virtual machine…
==> vmware-vmx: Waiting 10s for boot…
==> vmware-vmx: Connecting to VM via VNC (127.0.0.1:5986)
==> vmware-vmx: Typing the boot command over VNC…
==> vmware-vmx: Using winrm communicator to connect: 192.168.49.129
==> vmware-vmx: Waiting for WinRM to become available…
==> vmware-vmx: Timeout waiting for WinRM.
==> vmware-vmx: Stopping virtual machine…
==> vmware-vmx: Deleting output directory…
Build ‘vmware-vmx’ errored: Timeout waiting for WinRM.
==> Some builds didn’t complete successfully and had errors:
–> vmware-vmx: Timeout waiting for WinRM.
==> Builds finished but no artifacts were created.