VMware Cloud Community
jguzmanr
Enthusiast
Enthusiast
Jump to solution

set-vmhostroute for default gateway

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos