Question related to IP control from packer tools Level using vsphere iso

Hello,

I 'm a question for support related to the understanding fo the message waiting for IP in the following contexte:

I deploy a configuration of centos 7.x i(iso network installer) n Vsphere Vmware 6.7 configuration using vsphere iso provider for builder.

I build an image based Centos7 who is deploy in VLAN hypervisor witch is not reachable from the client I launch the packer builder command (isolation of network of client from my network, packer using only public vpshere connexion):

I build an image with a static IP configuration no relaying on DHCP (no DHCP serveur on this particular network client)

I finished successfly to configure the kickstart configuration and checked the console of VM (all configuration are accepted, and package begin to install, the static ip is initiased acceding the source networking centos reference etc…)

While the process of installing component continue, I oberve a stop vmware vm itself before the end of deployment: the root cause if that that packer tools command seem to not receive the static configuration I have defined in kickstart template for centos.

The message is “Build ‘vsphere-iso’ errored after 3 minutes 24 seconds: POST “/sdk”: 504 Gateway Time-out”, this message has no relation on the process of depoyment of the vm itself.

I have basics questions related to the understanding of the control waiting for IP and I try a workaround without successfull.:

Does the deployment VM image suppose the network client (packer tools command) can access the underlying network of the VM image (who obtain an IP address) ?

Does the packer tools command must be informed of the Ip vm by using API vmware by using SDK?

Is there is way to disable the waiting IP process, because there is an inconsistency between vm configuration (with initialied IP) and the packer client tools twho tells he has no IP.

I have tried to increase the ip timeout in the scenario where the packer command optain ip information from vmware tools (“ip_wait_timeout”: “20m” in builder section) but it change nothing : same timeout "Build ‘vsphere-iso’ errored after 3 minutes 24 seconds: POST “/sdk”: 504

Best regards.

thank for your help assistance.

Hi, thanks for reaching out!

Are you setting ssh_host with your static IP? This will tell the discovery process not to waste time querying for an IP address and may resolve the issue.

I have tried: ssh_host:“X.X.X.X” (my ip adress) in template.json builder block . But the waiting for ip process still occures (provider vsphere.iso)

==> vsphere-iso: Creating VM…
==> vsphere-iso: Customizing hardware…
==> vsphere-iso: Mounting ISO images…
==> vsphere-iso: Adding configuration parameters…
==> vsphere-iso: Set boot order…
==> vsphere-iso: Power on VM…
==> vsphere-iso: Waiting 10s for boot…
==> vsphere-iso: Typing boot command…
==> vsphere-iso: Waiting for IP…

That seems like a bug. Can you open an issue on https://github.com/hashicorp/packer-plugin-vsphere ?

I’m seeing a very similar issue as the OP. The difference is packer builds from my personal machine are able to connect to vsphere and build a VM w/o issue. However when I placed the same build in gitlab, I see the following:

vsphere-iso.basic-example: output will be in this color.
vsphere-iso.basic-example: Closing sessions ....
Build 'vsphere-iso.basic-example' errored after 2 minutes 7 seconds: Post "https://XXXXX/sdk": dial tcp XX.XX.XX.XX:443: connect: connection timed out
==> Wait completed after 2 minutes 7 seconds
==> Some builds didn't complete successfully and had errors:
--> vsphere-iso.basic-example: Post "https://XXXXXX/sdk": dial tcp XX.XX.XX.XX:443: connect: connection timed out ==> Builds finished but no artifacts were created.

IPs and addresses redacted, but the issue of connection timeout using a Post to an /sdk address is the same. I am trying to work out how to troubleshoot this and if this is perhaps a gitlab issue more than a packer/vsphere-iso issue.