The vami_config_net tool was an old tool that was used in SRM, vSphere Replication, as well as vCenter to edit the network configuration of the machine in question. Starting in SRM and vSphere Replication 8.5, the vami_config_net tool is deprecated. Any changes via command line to networking should be made using the netmgr command set.
NOTE: You must be logged in as root user to execute the commands below.
Hostname
Get the system hostname.
netmgr hostname --get
Set the system hostname.
netmgr hostname --set --name <hostname>
DNS Servers
Get the list of DNS servers.
netmgr dns_servers --get
Set the DNS mode (DHCP or static) for one or more DNS servers (comma-separated list).
netmgr dns_servers --set --mode <dhcp|static> --servers <server1,server2,...>
Add a DNS server to the list of DNS servers.
netmgr dns_servers --add --servers <server>
Remove a specified DNS server from the list of DNS servers.
netmgr dns_servers --del --servers <server>
NOTE: When changing the list of DNS servers (for example when changing networks or decommissioning old DNS servers), it is suggested to remove the current DNS servers first, then add the new ones. This is because there is a limited number of DNS servers that can be registered to the SRM server or vSphere Replication appliance.
Setting ip4 Address
Get the IPv4 address for the specified interface.
netmgr ip4_address --get --interface <ifname>
Set the IPv4 address (dot-decimal/prefix notation), mode (dhcp, static, or none), and (optionally) the default gateway for the specified interface.
netmgr ip4_address --set --interface <ifname> --mode <dhcp|static|none> --addr <ipv4_address/prefix> --gateway <gateway_address>
Below commands to be used to restart service.
systemctl restart systemd-networkd (For network)
systemctl restart systemd-resolved (For DNS)