Hi Gurus,
How to set the gateway for a specified vmk device via PowerCLI?
Like the following location in the picture.
I tried with the following command line
get-cluster -name $clustername | Get-VMHost | Get-VMHostNetwork | Set-VMHostNetwork -VMkernelGateway '10.181.129.1' -VMkernelGatewayDevice 'vmk2'
But failed with error
Set-VMHostNetwork : 2020/4/9 17:57:51 | Set-VMHostNetwork | An error occurred during host configuration. Operation failed, diagnostics report: Unable to set VMkernel gateway address to 10.181.129.1 as there are no VMkernel interfaces on the same network with that IP address. |
+ Get-Cluster -Name $clustername | Get-VMHost | Get-VMHostNetwork | Set-V ...
+ | ~~~~~ | |
+ CategoryInfo | : NotSpecified: (:) [Set-VMHostNetwork], PlatformConfigFault | |
+ FullyQualifiedErrorId : Client20_VirtualNetworkServiceImpl_UpdateIpRouteConfig_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostNetwork |
Appriciate if any help.
This is a known issue, see KB1002662
On which subnets do you have VMKernels defined?
Get-Cluster -name $clustername |
Get-VMHost |
Get-VMHostNetworkAdapter -VMKernel
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This is a known issue, see KB1002662
On which subnets do you have VMKernels defined?
Get-Cluster -name $clustername |
Get-VMHost |
Get-VMHostNetworkAdapter -VMKernel
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks,LucD