Packer vmware-vmx: SSH timeout

Hello all,

I have been having issues trying to get vmware-vmx working. I have tried a few options but then tried to use the basic script that is posted on the packer site. It states this this basic code works.

https://www.packer.io/docs/builders/vmware/vmx (Basic Example)

The following is my code that i am trying to run

{

“builders”: [

{

“type”: “vmware-vmx”,

“source_path”: “D:/Virtual Machines/CENT7/CENT7.vmx”,

“ssh_username”: “root”,

“ssh_password”: “Password”,

“shutdown_command”: “shutdown -P now”

}

]

}

The clone VM comes up fine on VMware Workstation 15.6. It picks up VMnet8 as expected. IP address is assigned via DHCP. Packer waits for SSH connection. I can login to the clone VM manually.

The following is the messages i get when i run the code:

==> 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:5958)

==> vmware-vmx: Typing the boot command over VNC…

==> vmware-vmx: Using ssh communicator to connect: 192,168.10.131

==> vmware-vmx: Waiting for SSH to become available…

==> vmware-vmx: Timeout waiting for SSH.

==> vmware-vmx: Stopping virtual machine…

==> vmware-vmx: Deleting output directory…

Build ‘vmware-vmx’ errored: Timeout waiting for SSH.

==> Some builds didn’t complete successfully and had errors:

–> vmware-vmx: Timeout waiting for SSH.

It could be that I am missing something. I tried adding ssh_host but that does not work as expected.

Try setting the environment variable PACKER_LOG=1 to get more detailed logs. The only thing that jumps out at me looking at this is that there’s a comma in the IP address: 192,168.10.131 and I wonder if this is somehow throwing things off.

Hi,
I also met the problem too,
Whats the clone vm logic with the virtual network interface ip address?