I am having some issues when trying to use powerCLI to migrate the vmk0 from VSS to VDS within my nested ESX environment. My current code looks something like his as I am trying to migrate the vmkt0 from the default portgroup on VSS over to a portgroup on VDS
foreach ($vmhost in $vmhosts) {
$vmhostname = $vmhost.name
# Migrating VMkernel port (vmk0) on vSwitch to VDS
My-Logger “Migrate $vmhostname VMkernel interfaces to VDS $VDSName…”
$vmk = Get-VMHostNetworkAdapter -Name vmk0 -VMHost $vmhost
$vdPortgroup = Get-VDPortGroup -VDSwitch (Get-VDSwitch -Name $VDSName) -Name $VLANMGTPortgroup
Set-VMHostNetworkAdapter -PortGroup $vdPortgroup -VirtualNic $vmk -confirm:$false | Out-File -Append -LiteralPath $verboseLogFile
}
No matter what I do, it will fail with the following error
Set-VMHostNetworkAdapter : 10/31/2020 2:23:59 AM Set-VMHostNetworkAdapter An error occurred while communicating with the
remote host. Network configuration change disconnected the host ‘esx101.tataoui.com’ from vCenter server and has been rolled
back.
At D:VMwarevsphere-6.7-vghetto-standard-lab-deployment4.ps1:990 char:13
+ Set-VMHostNetworkAdapter -PortGroup $vdPortgroup -Virtual …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VMHostNetworkAdapter], HostCommunication
+ FullyQualifiedErrorId : Client20_VirtualNetworkServiceImpl_AddVMHostNetworkAdapter_VIError,VMware.VimAutomation.ViCore.
Cmdlets.Commands.Host.SetVMHostNetworkAdapter
The log on VCSA say it is a throwable.proxy cause.
What is so puzzling about this is that the same code work when I run this on the physical ESX host, but yet, it will not work within my Nested ESX host? Any suggestion or feedback would be helpful