I'm working in lab environment with vSphere 7 on Windows 10. vCSA, ESXi hosts, and domain controller are running a VMs inside VMware Workstation. When I try to migrate networking to move the vmk0 (management port) and vmnic0 from the standard switch to the distributed switch, it errors out. See screenshots and the error message below:
While the migration wizard tries to move the VMK0, your vCenter server lost its connection to the ESXi host. So you must provide a situation that vCenter server have access to the ESXi in every states of migration operation. Your issue is a regular problem, especially in lab environment. But to avoid this regular problem, I suggest to do the migration operation like the following list:
1. Provide VSS that holds VMK0 with two uplink (vmnic) and also VM port group that your VCSA is connected to it. Then run the migration wizard once, and just move one of the uplink to the appropriate VDS but keep another one connected to the current VSS.
2. Run the migration wizard again and move the VCSA network connection to the VDS. In this state VCSA must have access to your ESXi host, while itself is connected to the VDS.
3. Run the wizard for third step and in this step, move the VMK0 to the VDS and test the connectivity ....