Migrate to new vCenter Server while using dvSwitches

During vSphere 4.x to 5.x updates I occasionally run into the situation where dvSwitches are used on the current vCenter4  and the customer wants to install a fresh copy of vCenter5 (with a new dvSwitch).

Within this article I will describe a minimum downtime (1 ping-loss or less) procedure to cover this, guided by pictures to get a clear understanding.

Step 1 – Starting point
First of all we got the ESXi Host and VM’s connected to the dvSwitch.

Step 2
Create a new vSwitch and add virtual machine portgroups to it with the same VLAN’s that are available on the dvSwitch. Add “local” to the naming convention to ensure easy identification.

 

Step 3
Detach one of the vmnic’s from the dvSwitch and add it to the newly created vSwitch. This ensures the same network connectivity on the vSwitch as on the dvSwitch (assuming network is configured as it supposed to be.)

Note:

  1. Ensure that load balancing is active on the dvSwitch (no standby vmnics) before detaching one of the vmnics.
  2. Detaching one vmnic from the dvSwitch basically means interrupting possible the network traffic. It’s recommended to first do this on an ESXi Host with some test VM’s (or less critical VM’s) to measure possible ping-loss. The environments I migrated all lost either no or a maximum of 1 ping, which was acceptable for the customer.

 

Step 4
Change the VM’s portgroup to the corresponding new “local” portgroup you created on the vSwitch (within step 2).
This can be done either manually or via the “Migrate Virtual Machine Networking” wizard within the dvSwitch.

Note:

  1. Changing the portgroup of a VM  basically means interrupting  the network traffic. It’s recommended to first try this on some test VM’s (or less critical VM’s)  to measure possible ping-loss. The environments I migrated all lost either no or a maximum of 1 ping, which was acceptable for the customer.

 

Step 5
Detach the remaining vmnic from the dvSwitch (the dvSwitch will not have any uplinks anymore at this time).

 

Step 6
Delete the ESXi Host from the dvSwitch configuration.

 

From this point on all VM’s are moved towards the vSwitch and the ESXi Host is disconnected from the dvSwitch, which means that it can easily be moved over to the new vCenter5 server.
This process can be reversed to get the VM’s back on the new dvSwitch within vCenter5.

Please be advised that this article just outlines a procedure and does not describe any automated processes for certain steps.  Check out Gabes blog over here for samples scripts to partially automate this procedure.

 

 

Leave a comment

8 Comments

  1. Terkel olsen

     /  October 19, 2012

    Unfortunately this doesn’t work if you’re using the Cisco nexus 1000v distributed switches, as you have to uninstall the nexus before removing a server from the cluster ;(
    VMware promises that this will be better en future releases

  2. Mark Jones

     /  October 19, 2012

    Terkel,
    We recently did this in our environment and we are uisng the 1000v. You can just remove from the 1000v and then unregister and reregister. Same process does work for 1000v

    We had a slightly different version of this process though. We created a straddle host that had a VMNIC on each switch and then one transport host that was on just standard switch. We moved guests to straddle host, changed VM networking then moved guests to transport host and registered to new Vcenter and then migrated to another straddle host

  3. Terkel Olsen

     /  October 22, 2012

    Ok, i might be misunderstanding you then.
    Can you take an ESXi host out of the cluster with nexus1000v still installed ?

  4. Mark Jones

     /  October 29, 2012

    Terkel,
    No, I don’t believe you can, but we would put ours into maintenance mode and remove from 1000v first and proceed.

  5. kl

     /  October 29, 2012

    What about pvlan? You can’t move it from dvSwitch to vSwitch.

  6. With vSphere 5.1 it is possible to backup and restore the VDS configuration to another vCenter server. See

    http://www.ivobeerens.nl/2012/10/29/migrate-to-a-new-vcenter-server-with-the-vsphere-distributed-switch-vds-enabled-in-vsphere-5-1/

  7. kl

     /  November 1, 2012

    Ivo, thanks. I will try it.

  8. Too bad that’s broken (export/import of a dVS within vCenter 5.1). I just submitted a ticket to VMware to ask if there’s an ETA for this. Huge bummer!!! Pretty sad that they included the functionality of export/import and it doesn’t even work at all: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2045468

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>