You set up vmkernel port for vMotion on a standard vSwitch or you connect a virtual adapter for vMotion vdportgroup on a distributed vSwitch. If you lack physical uplinks you may want to segregate the network traffic using VLANs. So what you do – you configure VLAN id on a vmkernel port (vSS) or on a dvportgroup (vDS), depending on which type of vSwitch you use.
An example of adding a VLAN tag on a virtual distributed portgroup
Then you try VMotion but it fials at 9% with the following error:
A general system error occurred: The VMotion failed because the ESX hosts were not able to connect over the VMotion network. Please check your VMotion network settings and physical network configuration.
Well, something’s wrong with the network configuration so you strip VLAN id and it is working again.
The solution is very simple – make sure the vmknics (virtual adapters you configured for vMotion) on your hosts are in a different subnet than the service console (or management vmknic). If they are not – VMotion vmknic will try to communicate with the default gateway and since the default gateway is not tagged with the VLAN id you choose for VMotion, the whole operation fails.
Setting IP on VMotion vmknic - make sure VMotion vmknic and Service Console (or Management vmknic) are in different subnets
Once vmknics for VMotion are put in a different subnet, everything starts working fine.
Tip: if you do it on nested ESXi servers (virtual ones) remember to edit properties of the Virtual Machine Port Group where your nested ESX(i)s are connected on your physical ESX(i) and set tagging to 4095 (enabling trunking – all VLAN ids will be allowed). Otherwise your tagged traffic will be stopped there.