How to re-IP Photon OS from command line

The most reliable way to change IP address for the Photon OS appliance is the command line. Although VAMI gives one option to change IP, it has not always worked for me. Here is a simple command-line procedure to re-IP your appliance.

  • Let’s get the interface names with this command
/opt/vmware/share/vami/vami_interfaces
  • Set the IP for the desired interface:
/opt/vmware/share/vami/vami_set_network <interface name> STATICV4 <IP address> <NETMASK> <GATEWAY>
  • Set DNS:
/opt/vmware/share/vami/vami_set_dns -d <domain suffix> <DNS IP1> <DNS IP2>

Please like and share to spread the knowledge in the community.

If you want to chat with me please use Twitter: @AngrySysOps

Visit my FB page: https://www.facebook.com/AngrySysOps

Read my blog: https://angrysysops.com

Subscribe to my channel : https://www.youtube.com/channel/UCRTcKGl0neismSRpDMK_M4A

Please leave the comment