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


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= --netmask=–gateway=–nameserver=–device=ens192
network --bootproto=static --device=ens192 --onboot=on --activate

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