Migrating from a standard switch to VMware vDS with no downtime

Replacing standard switches with VMware vDS will broaden your virtual network's capabilities. Learn how to migrate switches without powering down VMs.

Implementing a VMware distributed virtual switch network will increase abstraction between ESXi hosts and the physical...

network. Admins can migrate from standard switches to a VMware distributed switch configuration without powering down virtual machines or other components on the network.

Virtual distributed switches (vDS) enable more flexibility in virtual networks than standard virtual switches. Whereas a standard vSwitch works within one physical host only, a vDS works with different hosts within the same cluster. VMware has improved vDS with better networking and monitoring features since the technology debuted.

VMware vSwitch overview.
Figure 1. This is an overview of the current network based on standard switches.

In the network migration I use as my example, the vSphere environment uses two identically configured ESXi servers (Figure 1). Each host has a virtual switch with four physical network interface cards (NICs). Multiple NICs are necessary if you want to migrate to VMware vDS without downtime. During a hot migration, we remove NICs from the standard switch and implement them in the vDS. Once the networking transfers completely to the distributed switch setup, we can remove the standard switch and add its remaining physical NICs to the vDS.

Use the vSphere Web client or Windows client to create VMware vDS networks. This example was performed with the vSphere 5.1 Web client. Open your Web client and browse to your data center object. Right-click the data center object, then select "New Distributed Switch."

Name the new vDS, then select its version. If your vSphere environment is entirely at one version, such as 5.1, the choice is logical. If your infrastructure contains older vSphere 4 or 5 servers, create a switch at the older version and wait to upgrade the switch until all the hosts are at the updated version.

Create new vDS uplinks
Figure 2. Select how many uplinks you'll need in the vSphere distributed switch configuration.

Select the number of uplinks for this VMware vDS (Figure 2). The default is four, which happens to be correct for the server in this example. You can change this number in accordance with your setup. For the sake of simplicity, I also chose to create a default port group, which will be named DPortGroup. Later, you'll move the virtual machines (VMs) here.

After creating the switch, right-click on it and select "Add and Manage Hosts" to add your vSphere hosts. Again, the number depends on your infrastructure setup.

Select physical NICs.
Figure 3. Add NICs to your new distributed virtual switch.

Next, select the physical NICs that you want to use from your hosts. This allows you to migrate your networking to VMware vDS without downtime. For both hosts, I select NICs 1 and 3 to be used for the new switch (Figure 3). This will leave networking on the standard switch intact, with all the traffic sent over two NICs instead of four. Make these changes at a time of the day with low network bandwidth usage.

New network switch created
Figure 4. The vDS appears along with the vSwitch in your networking overview.

The next screen allows you to migrate the virtual adapters to the new switch -- but don't do it. First, create a new port group for the VMkernel ports to use, and migrate the networking in a later step. You also can select VMs to migrate now, or skip it and do this later.

Migrate VM networks
Figure 5. The networking migration wizard eliminates repetitive VM migrations.

The new distributed virtual switch is now available on its vSphere hosts (Figure 4).

Select VMs
Figure 6. Select the VMs that will migrate to your new network.

Migrate virtual machines to the vDS first, then migrate VMkernel ports. You don't have to move each VM individually if you use the networking migration wizard (Figure 5). Go to the virtual distributed switch in the inventory, right-click on it, and select "Migrate VM to Another Network."

Select the source network and your destination network, then choose the virtual machines you want to migrate (Figure 6). Now all the VMs are connected to the vSphere vDS switch.

VMkernel port groups
Figure 7. Create port groups, such as the management networking port group and a vMotion networking group.

Use a dedicated port group to migrate the VMkernel ports to the distributed switch. Although in theory you could use the same port group where the VMs are located, in practice dedicated port groups are often necessary. For example, you'll need one if you want to use a virtual LAN for one of the VMkernel ports.

Migrate virtual adapters
Figure 8. You'll migrate virtual adapters via the ESXi host management interface.

Right-click on the VMware distributed switch, then select "New Distributed Port Group" and name the group. In this example, I created two port groups, one for the management networking and one for vMotion networking (Figure 7).

Assign a port group

Figure 9. You'll assign a port group to the migrating VMkernel port.

On the ESXi host management page (Figure 8), under the Networking tab, select "Migrate networking."

Port groups selected

Figure 10. Select the VMkernel's port groups.

The migration wizard allows you to select the VMkernel port to migrate (Figure 9). Next, click "Assign port group" and select a port group for the VMkernel port (Figure 10). You've now finished the network migration.

Manage physical NICs.

Figure 11. Assign the remaining physical NICs from the standard switch to the vDS.

The original standard switch is now empty, with no virtual machines or VMkernel ports attached. Time to remove that switch and add the physical NICs to the distributed switch.

Delete the standard switch. Find "Manage physical NICs" in the distributed switch configuration on the host. Select the physical NICs and assign them to the distributed switch (Figure 11).

With this final step, all vSphere networking will now run through the distributed switch; the full four-NIC capacity is available for use.

Dig Deeper on VMware networking

Virtual Desktop
Data Center
Cloud Computing