Problem was resolved. I forgot to change the ssh_port parameter in the template file.
On Tuesday, February 5, 2019 at 8:27:13 AM UTC-8, Denis Medeiros wrote: > > Hello everyone, > > I am having some problems to create a VM (CentOS 7) in a remote ESXi > server (6.5.0). The installation goes fine, the VM gets an IP address (I > can access it via SSH after the installation is done) and the host can > detect the VM IP address as well (it shows the IP address in the VMWare > panel, because during the installation I already install the VMware tools). > However, Packer cannot advance to the provisioning stage and it keeps > showing the following messages: > > 2019/02/05 08:11:20 packer: 2019/02/05 08:11:20 [DEBUG] Opening new ssh > session > 2019/02/05 08:11:20 packer: 2019/02/05 08:11:20 [DEBUG] starting remote > command: esxcli --formatter csv network vm list > 2019/02/05 08:11:21 packer: 2019/02/05 08:11:21 [DEBUG] Opening new ssh > session > 2019/02/05 08:11:21 packer: 2019/02/05 08:11:21 [DEBUG] starting remote > command: esxcli --formatter csv network vm port list -w 3238875 > 2019/02/05 08:11:22 packer: 2019/02/05 08:11:22 [DEBUG] Error getting SSH > address: No interface on the VM has an IP address ready > > I already activated the /Net/GuestIPHack setting in the ESXi server ( > *esxcli system settings advanced set -o /Net/GuestIPHack -i 1), as well as > enabled the SSH service and opened the VNC ports (working fine too). * > > *If I enter in the host machine and run "esxcli --formatter csv network vm > list", it shows the list of VMs:* > > > > > > *Name,Networks,NumPorts,WorldID,centos-base,"VM > Network,",1,3238875,dr-spring,"VM Network,",1,400331,* > *Next, when I run the "esxcli --formatter csv network vm port list -w > 3238875", everything appears to be good:* > > > > > *ActiveFilters,DVPortID,IPAddress,MACAddress,PortID,Portgroup,TeamUplink,UplinkPortID,vSwitch,,,192.168.2.111,00:0c:29:ec:f2:f3,33554449,VM > > Network,vmnic0,33554434,vSwitch0,* > > *For my understanding, at this point, for some reason Packer cannot detect > this IP address above.* > > > *Does anyone have any idea why this is happening? * > > *Below are my template.json file and the kickstart file I am using:* > > *template.json:** > https://gist.github.com/DenisMedeiros/e4ab6f961bb6691cda733e5fa9a2b36e > <https://gist.github.com/DenisMedeiros/e4ab6f961bb6691cda733e5fa9a2b36e>* > > > *ks.cfg: > https://gist.github.com/DenisMedeiros/e08fbda5871211dbfc9dec6fae4bb3ef > <https://gist.github.com/DenisMedeiros/e08fbda5871211dbfc9dec6fae4bb3ef>* > > > *Thanks in advance for any help.* > > > > > > > > > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/2d382ea0-013a-4253-8889-158eb6d26bfd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
