How to smoothly migrate a VM from one vDS to another

If you are using virtual Distributed Switches (vDS) in your environment you may have stumbled in a situation where you wanted to migrate a VM from one cluster to another using different vDS and couldn't do it: VMotion is not possible in this scenario. Even if the source and target host are CPU-compatible and both have access to the VM's storage, vCenter will deny a live migration whenever the target host is not part of the vDS that the VM is connected to. This is somewhat understandable, because the VM would lose its network port while running, and this is probably not what you intended.

So, let's power off the VM and try a cold migration ... but - surprise(?) - even this will be rejected by vCenter, with the same error message:

vCenter rejecting an inter-vDS migration
One way to cope with that is to remove the vNIC from the VM, do the migration and then add a new vNIC to the VM. However, this has consequences that might be undesirable: The new NIC will have a new MAC address and will be detected as a new device by the guest OS which might led to even more problems, another reboot being necessary etc.

There is another, smoother way to do it: In our environment we have created an extra vDS that serves the only purpose of enabling inter-vDS migrations. We called it TransferSwitch, another good name would be MigrationSwitch, and we have added all hosts of all clusters that are managed by vCenter to this vDS, but without any physical uplinks. A migration of a VM from one vDS to another then becomes a three steps process:
  1. Connect the VM's NIC to the TransferSwitch
  2. Migrate the VM to the target host
  3. Connect the VM's NIC to the destination vDS
This way you can do an inter-vDS migration without the necessity of removing and re-adding the VM's NIC. It would be enough to only temporarily create the TransferSwitch for each migration and add only the source and target host to it. However, we decided to keep it permanently and add all hosts to it. Just to "be always prepared" ... ;-)


  1. Love this idea. Doing the same for my company. Thanks!

  2. Very elegant solution...thanks for the tip. Much appreciated!

  3. Good idea! Thanks!

  4. No chance of a live migration though? Always have to power of the VM to migrate to another Cluster?

  5. If the hosts of the two clusters are "vmotion-compatible" then you can also vmotion from one cluster to the other. That means compatible CPUs, a shared vDS or standard port groups using the same labels and VLANs, and shared storage in versions <5.1. Since 5.1 you don't necessarily need shared storage.

  6. Thank you for taking the time to post this. Much appreciated!


***** All comments will be moderated! *****
- Please post only comments or questions that are related to this post's contents!
- Advertising and link spamming will not be tolerated!