VMware Communities
bdre
Contributor
Contributor

packer build with vmware-iso plugin fails on Windows

VMWare Workstation 16.2.3

Windows 10.0.19.044

Packer 1.8.0

Guest OS Redhat 8.4

When I try to build this VM on Windows, the first part of the install seems to succeed. The VM is created, and the boot_command is sent to the new VM over VNC. You can see the install of the guest OS ISO begin.

But, then fails when it gets to the next phase where an SSH connection to VM from the builder is required. I think this is the part where the configuration script running on the guest OS gets the .ks file over http.

Here are the log entries:

2022/06/06 13:17:10 packer.exe plugin: Searching for file 'C:/ProgramData/VMware/netmap.conf'
2022/06/06 13:17:10 packer.exe plugin: Found file 'C:/ProgramData/VMware/netmap.conf'
2022/06/06 13:17:10 packer.exe plugin: Located networkmapper configuration file using Workstation: C:/ProgramData/VMware/netmap.conf
2022/06/06 13:17:10 packer.exe plugin: GuestIP discovered device matching nat: vmnet8
2022/06/06 13:17:10 packer.exe plugin: Lookup up IP information...
2022/06/06 13:17:10 packer.exe plugin: GuestAddress found MAC address in VMX: 00:0c:29:9d:51:6f
2022/06/06 13:17:10 packer.exe plugin: Trying DHCP leases path: C:/ProgramData/VMware/vmnetdhcp.leases
2022/06/06 13:17:25 packer.exe plugin: Skipping lease entry #1 due to being unable to connect to the host (192.168.190.128) with tcp port (22).
2022/06/06 13:17:40 packer.exe plugin: Skipping lease entry #2 due to being unable to connect to the host (192.168.190.128) with tcp port (22).
2022/06/06 13:17:40 packer.exe plugin: [DEBUG] Error getting SSH address: Host is not up

The builder retries this operation unsuccessfully every 5 seconds.

It seems clear that the default network created when Workstation was installed is not correct. But, what I see there matches what the docs say are required: needs a bridged or nat network. The network the builder found the VM on (vm8) is a nat network.

How can I debug this issue?

1 Reply
filoucrackeur
Contributor
Contributor

same problem with workstation 17 packer rhel 8.8 ...

did someone can explain how to ?

 

cordialy

0 Kudos