IP address changes in the Harbor OVA VM after reboot
search cancel

IP address changes in the Harbor OVA VM after reboot

book

Article ID: 380682

calendar_today

Updated On:

Products

Tanzu Kubernetes Grid VMware Tanzu Kubernetes Grid VMware Tanzu Kubernetes Grid Plus VMware Tanzu Kubernetes Grid Plus 1.x VMware Tanzu Kubernetes Grid Management

Issue/Introduction

Harbor OVA VM downloaded as part of Tanzu Kubernetes Grid Management bundle for Airgapped environment gets a new IP address after the reboot of the VM

Cause

This can cause if the DHCP is set to yes in the network configuration file

Resolution

By default, when Photon OS first starts, it creates a DHCP network configuration file or rule, which appears in /etc/systemd/network, the highest priority directory for network configuration files with the lowest priority filename:

cat /etc/systemd/network/99-dhcp-en.network
[Match]
Name=e*

[Network]
DHCP=yes

To turn off DHCP for all Ethernet interfaces, change the value of DHCP from yes to no, save the changes, and then restart the systemd-networkd service:

systemctl restart systemd-networkd

If you create a configuration file with a higher priority filename (e.g. 10-static-en.network), it is not necessary but still recommended to turn off DHCP.

Additional Information

https://vmware.github.io/photon/assets/files/html/3.0/photon_admin/turning-off-dhcp.html