Note: Currently the desktop vSphere Client supports a drag-and-drop move of multiple VMs from one portgroup to another – however, the Web Client does not. Personally, I think its easier and faster – however, there’s no validation about what the consequences are for those drag & drops…
Generally, it is recommend to starting using Distributed Switch from day one for virtual machines – so as avoid a migration process altogether. However, this may not possible due to licensing restrictions or the fact that using Distributed Switches was not included in the original design at deployment phase. Moving VMs from a Standard Switch portgroup to Distribute Portgroup can be achieved in a bulk way using the Web Client. However, its perhaps wise to test the configuration before embarking on a migration, and to claim a maintenance period for the effected VMs. Therefore should an outage occur then no end-users or customers would be affected. It is also possible to migrate the VMkernel networking away from a Standard Switch if necessary.
Migrating VMs from Standard Switch to a Distributed Switch
UPDATE:
This blogpost was recently updated with a “Show Me How” video which demonstrates the process of migrating from a Standard Switch to the Distributed Switch….
Note: This process can also be used to return VMs back to the Standard Switch portgroup if necessary.
Migrating VMs from a Standard Switch portgroup to a Distributed Switch Portgroup can be achieved using a specific option within the “Add and Manage Hosts” wizards.
However, there is a dedicated wizard designed to “Migrate VM(s) to another network” which may be easier for those wishing to move large numbers of VMs from one portgroup to another.
1. Right-click the target Distributed Switch in the Web Client, and select Migrate VM to another network
2. In the wizard, under Source Network browse for the Standard Switch portgroup name
Note: The Distributed Portgroup names were named from VLAN101 to dVLAN101 to distinguish them from the Standard Switch portgroup names called VLAN101 and VLAN102
3. Under Destination Network browse for the Distributed Switch portgroup name
4. Select the VMs to be migrated to the Distributed vSwitch. The migration will only occur on the interfaces within the scope of the Standard Switch portgroup. Therefore a firewall or router with multiple interfaces will find its NICs being connected to both Standard and Distributed Portgroups until all the interfaces have been migrated. During this migration process so long as the VLAN and IP configuration remains unmodified no disconnects or dropped packets occurs.
5. Confirm the VMs have been relocated to the appropriate portgroup. By confirming the association on the properties of the Distributed Portgroup, the Related Objects tab and Virtual Machines column.
Migrating VMKernal Ports from the Standard Switch to a Distributed Switch
Along side virtual machine traffic it is possible to migrate VMKernel traffic – or traffic which concerned purely with the VMware ESXi host from a Standard Switch to the Distributed Switch. Many administrators prefer to keep this traffic on different virtual switch layers. However, you may be compelled to move all the traffic to the Distributed Switch if you have insufficient physical NICs. For example a physical server with just two 20Gps NICs cannot offer tolerance and load-balancing to both switch types as a physical adapter cannot be associated with more than one virtual switch. However, in these types of environment commonly associated with so called “converged blade” environment IO Virtualization can be used to present as array of “virtual adapter” up from the physical layer regardless of the number of actual physical NICs onboard. A good example of this would be HP “Virtual Connect” technology, Cisco refers to there implementation of IO Virtualization as Cisco Adapter Fabric Extender (or Adapter FEX) occasionally Cisco refers to it as “SingleConnect”
Begin the migration process by creating a series of target Distributed Portgroups, and ensure that the correct VLAN Tagging is in place. You may wish to temporarily place a VM on these portgroups to confirm that communications is valid. For example place a VM on a Distributed Portgroup called “dIPStorage0” allocate an IP address valid for the storage network (e.g. 172.168.3.101) and confirm you can ping the IP Storage system (e.g. 172.168.3.254).
IMPORTANT: This process removes the Standard Switch VMkernel port (vmkN) and its associated portgroup. Reversing the process cannot be carried out using the same wizard. Instead the “Migrate a VMkernel Network adapter to selected switch” must be run on each VMware ESXi host.
1. Right-click the Distributed Switch and select Add and Manage Host networking
2. Select the radio button Manage Host Networking
3. Select the Attached Hosts
4. Deselect Manage Physical Adapters, so only Manage VMkernel Adapter is selected
5. Select the Source VMkernel/Portgroup you wish to migrate. In the screen grab below vmk1 on the Standard Switch portgroup vMotion is selected… Next, click Assign Port group – and from the subsequent windows select the Destination Portgroup – in this case the Distributed Portgroup called dMotion. Repeat this process for each VMware ESXi host…
6. Confirm your changes will have no impact on iSCSI communication (or NFS for that matter)
7. Once the process has completed you can confirm the VMkernel Port has been migrated by viewing the settings on the VMware ESXi host under the Manage Tab, Networking column and VMkernel Adapters.
Migrating VMKernal Ports from the Distributed Switch to a Standard Switch
To move a VMkernel Port on a Distributed Switch to a Standard Switch carry out these steps
1. Select the VMware ESXi host, click the Manage Tab and the Networking column
2. Select the Standard Switch you wish to use as the target, and click the Migrate a VMkernel Network adapter to selected switch icon
3. Select the VMkernel port you wish to move
4. Type in a name for the new Standard Switch portgroup
5. Confirm the change will not impact negatively on IP based storage