You can modify the IP and routing configuration settings of a guest network interface.

Connect to a vSphere server.

1

Get the network interface of a guest operating system.


$vm1 = Get-VM -Name VM1
$guest = Get-VMGuest $vm1
$interface = Get-VMGuestNetworkInterface -VMGuest $guest -HostUser root -HostPassword pass1 -GuestUser user -GuestPassword pass2 -ToolsWaitSecs 100
2

Configure the network interface.


Set-VMGuestNetworkInterface -VMGuestNetworkInterface $interface -HostUser root -HostPassword pass1 -GuestUser user -GuestPassword pass2 -IPPolicy static -IP 10.23.112.69 -Gateway 10.23.115.253 -DnsPolicy static -Dns (10.23.108.1, 10.23.108.2) -WinsPolicy dhcp