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.
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
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.
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.
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.
Step 5. Find the zip file you exported earlier and check the box to Preserve original distributed switch and port group identifiers.
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
Step 7. Choose to Add host and manage host networking (advanced)
Step 8. Use the Attached Hosts button to select the host(s) you wish to re-establish the networking on.
Step 9. Select Manage physical adapters, Manager VMkernel adapters, and Migrate virtual machine networking
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.
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”
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.
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.