Migrating a DVS and Host from one vCenter to another.

There are mixed feelings about exporting a DVS from one vCenter Server to another. Some will tell you that it absolutely cannot be done, while others will tell you that it works great, and even go so far as to mention it saving their environment. Personally, I’m on the fence about this. There are not many statements on the supportability of this one way or another by VMware, so I interpret it as sitting in the realm of “Document what you DO support, not what you don’t.”
 
With that said, this guide should be used with great caution and only if circumstances do not allow other options.
 

The Setup

 
In this scenario, I decided to go all out and not only attempt an export/import across differing versions, but also different underlying OS platforms.

  • Source vCenter – vCenter Server Appliance 5.5 Update 2
  • Destination vCenter – vCenter Server Windows 6.0

 
Step 1. First off, I made a DVS in the 5.5 vCenter with 3 portgroups.

  • PG-everything_enabled: This one basically had everything I could enable in it turned on
  • PG-VLAN10-Dynamic_binding: A mostly default portgroup with a VLAN tag of 10 and dynamic port binding enabled (which is deprecated)
  • PG-vmk-pingable: A portgroup with the Management interface (vmk0) and a VM for continuous ping testing

 
Image
 
 

Moving the Host

 
Step 2. Next, I disconnected the host from the 5.5 vCenter and switched to the client of my 6.0 vCenter
 
Adding the host in to the new vCenter worked fine. I kept an eye on my pings to the puppy-ping VM as well, which continued flawlessly
 
Once added, I noticed that the networking tab for the host has an error on it about the DVS. I ignored this for now as we will import the DVS to the new vCenter next.
 
Image
 
 

Migrating the DVS

 
Step 3. In the Web client, export the DVS from the 5.5 vCenter by right clicking it and mousing over All vCenter Actions, then selecting Export Configuration . Choose to export Distributed switch and all port groups, and save the zip file to your machine.
 
Image
 
 
Step 4. Back to the 6.0 Web Client. From the Networking tab, right click the datacenter, mouse over Distributed Switch and select Import Distributed Switch.
 
Image
 
 
Step 5. Find the zip file you exported earlier and check the box to Preserve original distributed switch and port group identifiers.
 
Image
 
 

Sync the Host to the DVS

 
So far we have both the ESXi host and the DVS in the vCenter 6 Inventory. But we still need to re-establish the correlation between them. The next step requires previous knowledge of which dvPortgroups the Virtual Machines were on.
 
Step 6. Right Click the imported DVS and go to Add and Manage Host
 
Image
 
 
Step 7. Choose to Add host and manage host networking (advanced)
 
Image
 
 
Step 8. Use the Attached Hosts button to select the host(s) you wish to re-establish the networking on.
 
Image
 
 
Step 9. Select Manage physical adapters, Manager VMkernel adapters, and Migrate virtual machine networking
 
Image
 
 
Step 10. Uplinks should already be populated as we added the host prior to the DVS. Confirm that they have the Uplink portgroup set and click next.
 
Image
 
 
Step 11. Under Manage VMkernel network adapters, Assign portgroups to the vmk interfaces. The Source Port Group and Destination Port Group should match. Do not worry about the vmk interfaces under “On other switches”
 
Image
 
 
Step 12. Review and make note of the impact this might have on your network dependent services.
 
Step 13. In Migrate VM networking, we need to assign the Virtual machines their dvPortgroups again. Use the drop down to correlate the Source Port Group to each vnic.
 
Image
 
 
Step 14. Review the changes and hit finish.
 
 
At this point everything was done. I never lost connectivity with the management network of the host and also never lost pings to the puppy-ping VM I had set up for testing. I double checked the 3 portgroups that I had created and it looks like all of the settings persisted across the migration. Once again I want to stress that this is not supported by VMware. But if you are in a situation that doesn’t offer many options, this will work in a pinch.
 
 

Posted by:

Chris Morrow

22 Comments

  1. ryan -  September 14, 2015 - 10:58 am 254

    What would be the best way to do the above situation? All out hosts are on VDS and we are migrating from 5.5 appliance to 6.0 appliance.

    Reply
    • Sean Whitney -  September 19, 2015 - 10:17 am 255

      Hi Ryan,

      Are you just upgrading? If so, you can backup the VDS before the upgrade as a precautionary measure, then just run through the upgrade. If you are building out a separate vCenter Server and moving hosts, then follow the above, just make sure to take snapshots of the vCenter VMs and backups of the VCDB in case anything happens.

      Thanks,
      Sean

      Reply
      • Jay B -  January 29, 2016 - 1:42 pm 382

        Not true, the upgrade to 6.0 from 5.5 using all vDS needs a standard switch.

        Reply
  2. Steffan Røstvig -  September 30, 2015 - 2:22 am 269

    Good write-up! Thanks :)

    Reply
    • Sean Whitney -  October 12, 2015 - 9:11 pm 275

      You’re welcome!

      Reply
  3. ganesh -  November 30, 2015 - 8:13 pm 343

    So on step 11 , how can we do if we have large number of VMs and it is very difficult to select source and destination for each VMs?

    Reply
    • Chris Morrow -  December 1, 2015 - 12:22 pm 345

      Hi Ganesh,

      If you mean step 13, there isn’t a better way to do this other than possibly scripting it with powercli that I know of.

      Reply
  4. Mostafa Zare -  February 8, 2016 - 1:47 am 392

    Hi Sean,
    This guide is perfect. Thank you for writing…

    Reply
    • Sean Whitney -  February 9, 2016 - 4:20 pm 400

      You’re welcome, Mostafa. Happy to help!

      Reply
  5. Leo -  February 23, 2016 - 3:39 am 422

    Good Write-Up Sean…Thanks

    Reply
    • Chris Morrow -  February 23, 2016 - 9:04 am 423

      You’re Welcome Leo, Hope it helps.

      Reply
  6. Anwesh -  March 28, 2016 - 6:04 pm 445

    Thank you Sean… for the sharing the article and it help me for successful migration from one vcenter server to another vcenter.

    Reply
  7. Mitra -  May 14, 2016 - 5:51 am 468

    Hello All,

    I am having one uestions,

    If there is situation where we are unable to take dvswitch backup because old vCenter server was down & we want to connect esxi host (which are in vDistributed switch with old vCener) to NEW vCenter server with there old configuration , is it possible??

    Reply
    • Chris Morrow -  May 17, 2016 - 5:01 pm 478

      Unfortunately I dont think so Mitra. You need the backup from the original VC to do it correctly.

      Reply
  8. Mitra -  May 14, 2016 - 5:52 am 469

    Hello All,

    I am having one questions,

    If there is situation where we are unable to take dvswitch backup because old vCenter server was down & we want to connect esxi host (which are in vDistributed switch with old vCener) to NEW vCenter server with there old configuration , is it possible??

    Reply
  9. Caz Sand -  May 17, 2016 - 10:14 am 474

    So,

    Is the method viable and supported? I was told the VMware doesn´t support this exporting/importing DVs configuration method yet, although I may and I hope to be wrong, since I have a DVs environment with over 2000 VMs

    Reply
    • Chris Morrow -  May 17, 2016 - 5:04 pm 479

      VMware does not support this method. I mention that in Step 14, so i wouldnt use this unless its a lab or you have to!

      Reply
  10. Andre -  June 2, 2016 - 1:10 pm 489

    Hi,

    I could migrate vdswitches directly 5.1 to 6 vmware version?

    Thank you!

    André Vieira

    Reply
  11. mojtaba -  October 4, 2016 - 8:56 am 529

    Thanks for your Instructions , very efficient.

    Reply
  12. RR -  January 5, 2017 - 9:08 pm 550

    Hi Sean

    Great Post works perfectly. I have tested the same process with the old vsphere client and it skips a large amount of steps and does not require any migration of port groups or kernels or vm’s, provided the switch was imported preserving all settings.

    Reply
  13. iahmed -  February 8, 2017 - 8:55 am 557

    Hi Sean and Team,
    1. We are running single instance of vCenter 6.0 with PostgreSQL DB and and there is a limitation of 20 hosts and 200 VM on PostgreSQL
    2. If suppose we go with vCenter 6.0 windows server( VM) with embedded PSC , what is the best design, like to have two vCenter instance OR SQL 2014 Cluster with single vCenter instance which will be part of HA/DRS cluster and migrate from PostgreSQL. Is there a different steps to achieve this?

    Regards
    iahmed

    Reply
  14. Patrick -  February 15, 2017 - 10:31 am 558

    Something weird happened to me after I migrated (side-by-side) to a new vCenter 6.x from vCenter 5.1.x. I disconnect the hosts from the old vCenter, reconnected them to the new vCenter, restored de dvSwitch and added the hosts to it. All seemed to be working until I noticed that under the dvSwitch, on each portgroups I had, the hosts were not there. I have to create new portgroups and migrate the VMs from the old portgroups to the new ones because when trying to do a vMotion on the web-client, the destination network didn’t appear.

    Reply

Leave A Comment

Your email address will not be published. Required fields are marked (required):

Back to Top