vSphere Distributed Switch which is referred as vDS functions as a single virtual switch across all associated ESXi hosts.
Like a vSwitch, virtual Distributed Switch provides connectivity to VMs as well as VM-Kernel interfaces.
vDS is connected to physical network via the NICs available on Host and thus these NIC’s acts as an “UpLinks” for our vDS.
To have a functioning vDS we need 2 ESXi Host and 2 NIC’s per Host.
In this Lab we have 2 Hosts and 2 NICs on each Host, 1 is an OnBoard NIC whereas an additional PCI-E NIC added. (NIC Info)
Lets check the NICs on each host.
Select the Host and under “Configuration / Network Adapters” check for the available free NIC, Free in the sense that it is not associated to any vSwitch. You can see under the “Switch” column it says “None” whereas for the vmnic0 which is an onBoard NIC is connected to vSwitch0
Now we will go ahead to create a new vSphere Distributed Switch by going to “Networking” and selecting “New vSphere Distributed Switch” option.
Lets go through the wizard, where ever necessary I will explain the selected option.
For “Number of Uplink Ports” we will select ‘2’ . what we mean by selecting 2 is that we have 2 NIC (UpLinks) on each Host.
We will add the Hosts and connect the physical adapters to this vDS later.
We will create the “Port Group” later.
Once the wizard is complete we will have our 1st distributed switch named as “dvSwitch”.
We will rename the dvSwitch-DVUplinks-110 to “dvSwitch-DVUplinks” by selecting “Edit Settings”
Now, let us rename the Uplinks, which will be helpful later.
Select the “dvSwitch” under “Configuration” select the “Settings” icon
Click “Edit Uplink Names” and lets name each uplink which will describe which NIC it is on our physical Host, Like I have named “OnBoard” and “PCI-E”
Now we will create the “Distributed Port Groups” Select “”New Port Group” and name the port group as “dv-VM-Network” and “Number of ports” as ‘128’
Which means there will be 128 ports associated with this port group.
We are not using any VLAN and hence will be “None” as default.
In case if you need to change Number of Ports or Name, you can go under “Edit Settings” options and do the changes.
In the “Summary” you will also find Total Ports and Available Ports which is helpful information which you start using this port group.
If you check the “Ports” tab you will see list of all Ports from 0-127.
Now we will add “Hosts”
Select “dvSwitch / Add Host” and select appropriate NIC from each Host.
In case if you are confused which NIC to select (if you have more NICs) you can see “View Details…” link and check the NIC that you are using.
Next, the wizard will ask you to Migrate “Management Network” from vSwitch0 to a Port group on dvSwitch. we will not migrate for now.
so, keep the defaults as is and click Next.
In this section we will migrate VMs (Powered On and Powered Off) from vSwitch0 to dvSwitch. Under the “Destination Port Group” Column you can select the new Port Group (it’s a dropdown list)
You can see I am moving DC, Exchange Mailbox Server, Client Access Server, Hub Transport Server from “VM Network” Port Group which is on vSwitch0 to “dv-VM-Network” Port Group which is on dvSwitch. These VMs are currently Powered On on 192.168.1.101 Host.
Also, I am moving a Powered Off VM i.e, INT-CA a RootCA VM.
Also, check the VC VM which is a “vCenter Server” I am not moving it at present, coz we are creating/configuring Distributed Switch on vCenter server, to avoid loss of connectivity I will move vCenter later.
There is also a “Vyatta Router” VM which have 3 vNICs (virtual NIC) from these I am moving 1 vNIC to “dv-VM-Network” Port Group.
From 192.168.1.102 Host, I will be moving 1 vNIC of another “Vyatta Router” VM and a XP Client VM to new Port Group.
Here you will see all the VMs that we are migrating from vSwitch0 to dvSwitch.
Under vDS-DVUplinks you will see something strange. ie., The vmnic1 from both Hosts is shown under “OnBoard” uplink.
The Names that we have given to Uplink Group is Logical grouping, vSphere does not know which NIC is connected where (according to our naming).
How vsphere works is vmnic0 from each Host will goes under DVUplink1 and vmnic1 goes under DVUplink2 and so on…
In our case, vmnic0 which is an On-Board NIC is connected to vSwitch0 and which adding Host to dvSwitch we did not select vmnic0, we only selected vmnic1, when the time came to put vmnic under proper group, the only available vmnic was vmnic1 and that’s the reason why vmnic1 is shown under “OnBoard”.
We will correct this later. lets Finish this wizard and the dvSwitch is ready.
Check the Recent Tasks section at the bottom to see the updates going on.
The VMs network adapters are getting reconfigured and completed.
Check the “Summary” tab of any VM
Now lets correct the vmnic1 placement.
Go to the Host, under “Configuration” tab select “Networking” and click on “vSphere Distributed Switch” .
Click “”Manage Physical Adapters…” you will see vmnic1 under OnBoard, click “Remove”
Now Click on “Add NIC” and select vmnic1.
Repeat the same steps on other Host too..
Lets go and check the dvSwitch / Configuration. OK, so its as required.
Now its time to move “vCenter Server” to dvSwitch by going to the properties of vCenter VM and select the Network Adapter, select “dv-VM-Network” Port Group from dropdown list, and the VM is on dvSwitch.
**Moving Management Network (VMKernel Port) to dvSwitch**
Lets check the management network on both Hosts.
I have created a new Port Group on dvSwitch for VMKernel Port named “Mgmt-Network”
On dvSwitch / Configuration tab, select “Manage Hosts…” option and select both the Hosts.
Select “Mgmt-Network” as Destination Port Group from the dropdown.
Once completed, you can see the VMKernel Ports are available under “Mgmt-Network” and vmnic0 is listed under “OnBoard”.
As I explained before, vmnic0 falls under DVUplink1 (which we renamed to OnBoard) and it did.
Finally, All bits are now together and the final vSphere Distributed Switch is as shown below.