How to build RHEL images on Vmware/Vsphere with static IP?

Hi,

I’ve been trying to build RHEL images using Packer using a static IP address, however the build get’s stuck whilst waiting for an IP, see image attached.

Please see the packer config attached and the kickstart file i.e. ks.cfg includes the following lines:

network --bootproto=static --ip=1.2.3.4 --netmask=1.2.3.4–gateway=1.2.3.4–nameserver=1.2.3.4–device=ens192
network --bootproto=static --device=ens192 --onboot=on --activate
network --hostname=some.name

packer_config.txt (1.3 KB)

make sure your “network” is the right “vsphere_portgroup_name”?

1 Like

Thanks, issue resolved. We are now configuring the network config using the following:

“network”: “{{user network}}”,

    "customize": {

      "linux_options": {

        "host_name": "{{user `host_name`}}",

        "domain": "{{user `domain`}}"

This works