Static IP address is not configured when deploying a new Cloud Director Availability appliance
search cancel

Static IP address is not configured when deploying a new Cloud Director Availability appliance

book

Article ID: 315018

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • A new Cloud Director Availability appliance is deployed with a static IP address configured in the OVF properties.
  • In the console, you see the following message while booting the system:
     
    [FAILED] Failed to start vCAv network initializer
    See 'systemctl status h4network.service' for details.

     
  • After initial startup of the appliance, the IP address specified for connecting to the device is the default loopback adapter address: 127.0.0.1
  • In the console screen on the running appliance, you see the error:
     
    Unable to apply network adapter settings.
    Run 'jounalctl -u h4network' for more info.
    Use '/opt/vmware/h4/bin/net.py' to manually apply the network settings.

     
  • When reviewing the system logs for the h4network service (i.e., using the command journalctl -u h4network), you see an output similar to:
     
    Mar 11 22:53:21 photon-machine systemd[1]: Starting vCAv network initializer...
    Mar 11 22:53:23 photon-machine python3[331]: Applying firstboot network configuration.
    Mar 11 22:53:23 photon-machine python3[331]: ('/usr/bin/vmware-rpctool', 'info-get guestinfo.ovfEnv')
    Mar 11 22:53:23 photon-machine python3[331]: Applying static nic configuration
    Mar 11 22:53:23 photon-machine python3[331]: Executing: ('/opt/vmware/h4/bin/net.py', 'configure-nic', 'ens160', '--no-restart', '--static', '--address', '192.168.0.31', '--gateway', '192.168.0.1')
    Mar 11 22:53:23 photon-machine python3[331]: Command failed with: '192.168.0.31' is not a valid CIDR address - an IP address must be followed by '/' and a prefix.
    Mar 11 22:53:23 photon-machine python3[331]: Traceback (most recent call last):
    Mar 11 22:53:23 photon-machine python3[331]:   File "/opt/vmware/h4/bin/h4network.py", line 91, in main
    Mar 11 22:53:23 photon-machine python3[331]:     configure_nic(properties)
    Mar 11 22:53:23 photon-machine python3[331]:   File "/opt/vmware/h4/bin/h4network.py", line 60, in configure_nic
    Mar 11 22:53:23 photon-machine python3[331]:     sysboot.extract_ovf_property(properties, 'net.mtu').strip())
    Mar 11 22:53:23 photon-machine python3[331]:   File "/opt/vmware/h4/bin/h4network.py", line 47, in configure_static_nic
    Mar 11 22:53:23 photon-machine python3[331]:     exec(*cmd)
    Mar 11 22:53:23 photon-machine python3[331]:   File "/opt/vmware/h4/bin/h4network.py", line 35, in exec
    Mar 11 22:53:23 photon-machine python3[331]:     raise Exception(f'Bad exit code: {proc.returncode}')
    Mar 11 22:53:23 photon-machine python3[331]: Exception: Bad exit code: 1
    Mar 11 22:53:23 photon-machine python3[331]: Applying DNS configuration
    Mar 11 22:53:23 photon-machine python3[331]: Executing: ('/opt/vmware/h4/bin/net.py', 'configure-dns', '--no-restart', '--servers', '192.168.0.1', '--search-domains', 'gsslabs.corp')
    Mar 11 22:53:23 photon-machine python3[331]: Traceback (most recent call last):
    Mar 11 22:53:23 photon-machine python3[331]:   File "/opt/vmware/h4/bin/h4network.py", line 112, in <module>
    Mar 11 22:53:23 photon-machine python3[331]:     main()
    Mar 11 22:53:23 photon-machine python3[331]:   File "/opt/vmware/h4/bin/h4network.py", line 105, in main
    Mar 11 22:53:23 photon-machine python3[331]:     raise Exception('One or more errors occurred while applying network configuration')
    Mar 11 22:53:23 photon-machine python3[331]: Exception: One or more errors occurred while applying network configuration
    Mar 11 22:53:23 photon-machine systemd[1]: h4network.service: Main process exited, code=exited, status=1/FAILURE
    Mar 11 22:53:23 photon-machine systemd[1]: h4network.service: Failed with result 'exit-code'.
    Mar 11 22:53:23 photon-machine systemd[1]: Failed to start vCAv network initializer.


Environment

VMware Cloud Director Availability 4.x

Cause

This issue occurs when configuring the static IP address during the deployment of the Cloud Director Availability appliance OVA, a valid CIDR subnet prefix was not provided with the specified host IP address.

Resolution

To resolve this issue, either redeploy the appliance or reconfigure the network adapter with the correct CIDR format.

Option 1

Redeploy the appliance and specify the IP address for the device using the correct CIDR format. For example, when configuring the appliance with an IP address of 192.168.0.10 and a subnet of 255.255.255.0, the following would be specified: 192.168.0.10/24.

Option 2

Run the /opt/vmware/h4/bin/net.py command with the appropriate parameters. For more information on using this command, see the Command-Line Network Configuration section of the Cloud Director Availability documentation.