I have two mgmt ports on different vswitches and diffferent subnets. I am tyring to change the default gateway from one to the other but I keep getting an error. I don't know what else to try....thanks
I've tried many things but i think the closest one is:
Get-VMHostRoute | where {$_.Destination -eq "0.0.0.0"} | Set-VMHostRoute -Gateway 103.234.35.1
Set-VMHostRoute : 1/11/2012 11:14:13 AM Set-VMHostRoute An error occurred during host configuration.
At line:1 char:73
+ Get-VMHostRoute | where {$_.Destination -eq "0.0.0.0"} | Set-VMHostRoute <<<< -Gateway 103.234.35.1
+ CategoryInfo : NotSpecified: (:) [Set-VMHostRoute], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostRoute
To change the default gateway of a management port I think you should use the Set-VMHostNetwork cmdlet with the ConsoleGateway parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
To change the default gateway of a management port I think you should use the Set-VMHostNetwork cmdlet with the ConsoleGateway parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference