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
This can cause if the DHCP is set to yes in the network configuration file
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.
https://vmware.github.io/photon/assets/files/html/3.0/photon_admin/turning-off-dhcp.html