Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 258290

Re: Configure default gateway on vmotion TCP/IP stack

$
0
0

Can you try with this?

 

$stackName='vmotion'

$ipGateway='192.168.0.1'

$ipDevice='vmk2'

 

$esx=Get-VMHost-Name $VMHost

$netSys=Get-View-Id $esx.ExtensionData.ConfigManager.NetworkSystem

$stack=$esx.ExtensionData.Config.Network.NetStackInstance|where{$_.Key-eq'vmotion'}


$config=New-Object VMware.Vim.HostNetworkConfig

$spec=New-Object VMware.Vim.HostNetworkConfigNetStackSpec

$spec.Operation=[VMware.Vim.ConfigSpecOperation]::edit

$spec.NetStackInstance=$stack

$spec.NetStackInstance.ipRouteConfig.defaultGateway=$ipGateway

$spec.NetStackInstance.ipRouteConfig.gatewayDevice=$ipDevice

$config.NetStackSpec+=$spec

$netsys.UpdateNetworkConfig($config,[VMware.Vim.HostConfigChangeMode]::modify)

 

And if it still shows errors, have a look at the vpxd log.
There might be more clues in there.


Viewing all articles
Browse latest Browse all 258290

Trending Articles