VMware Virtual networking -vDistributed Swith(vDS)
Today I am going to discuss VMware Virtual networking .I will be showing you step by step process of configuring a vDistributed switch
Virtual networks in VMware is not that different from physical networks. vSphere is designed to mimic the functions of a physical network, so a lot of the network hardware you will find in the real world is virtualized in VMware.
I know we all know the basis of networking but I am going to refresh my brain
To connect to a network, a computer must be network-capable, meaning that it must have a working network interface card (NIC) installed. This NIC enables the computer to interface with a network. In most business, computers are usually connected to a device called a switch, which creates a local area network (LAN) .A LAN is a collection of interconnected network capable devices. Switches are responsible for routing this network traffic to the appropriate destination.
A virtual netowk is made up of virtual hardwares meaning a Virtual machines that can send data to and receive data from one another. Each virtual machine represents a single computer within the network and resides on an ESXi server.
In VMware two kind of switches are used to establish a connection between the virtual network and the physical network.These are Standard switches and Distributed switches.
Standard switches:A Virtual standard switch (vSwitch)works similar to a physical switch with some limitations. A vSwitch uses the physical NIC (pNICS) associated with the host server to connect the virtual network to the physical network. In VMware these pNICs are also called uplink adapters.Uplink adapters uses virtual objects called vmnics or virtual network adapters to interface with the vSwitch.
Once the vSwitch has bridged the connection between the virtual network and the physical network, the virtual machines residing on the host server can begin transferring data to and receiving data from all of the network capable devices connected to the physical network.
VMware can create a virtual network from a vSwitch mapped to one or more uplink adapters or mapped to no uplink adapters. A vSwitch that lacks an assigned pNic is called an internal vSwitch and cannot communicate with other virtual or phyisical machines outside of that ESXi host.Internal vSwitches used for isolation from the external network.
A vSwitch attaches to the VMkernal inside a host server . The vSwitch is responsible for routing traffic to the VMkernal , the VM network and the service console. The VMkernal is used to manage features like vMotion,fault tolerance,network file system(NFS) and internet small computer system interface(iscsi)
The VM network enables virtual machines running on an ESXi host to connect to the virtual or physical network
The service console is used for remote management.Only ESX uses service console. In ESXi, the vmkernal serves the management.
Each virtual machine interfaces with the vSwitch via a port. vSwitches can consist of one or more port groups,which describes how the virtual switch should route traffic between the virtual network and the virtual machines connected to the specific port
A dvSwitch simplify the network management of multiple ESXi hosts. dvSwitch provide the same features and functions as vSwitches with one major difference :A standard switch can not be assigned to more than one host server at a time, but a dvSwitch can.
A dvSwitch must be created and controlled through vCenter server. A dvSwitch is made up of a control plane and an input-output plane. The control plane resides on vCenter server and is used to configure dvSwitches.The I/O plane or data plane is a hidden virtual switch built into the host server.
dvSwitch also support port groups called distributed port groups or dvport groups. dvport group provide same basic functionality as standard port groups but offers additional features such as inbound traffic shaping for example.
I am going to use distributed switch because it is a requirement for my NSX implementation. So let me go through the process of configuring a distributed switch(screenshot from HOL).
Note: VMware have a hands on LAB dedicated to distributed switch HOL-SDC-1402
LAB environment and current status
a.One vCenter vc-I-01a
b.Four ESXi hosts(esx-01a,02a,03a and 04a)
c.One vDistributed switch already configured called vds-site-b.Two ESXi hosts (esx-03a and 04a) are part of vds-site-b
d.Each ESXi hosts have 4 network adapters
esx-01a and esx-02a have one virtual machines each connected to a port group called “VM Network” .
My plan is to create a new vDistributed switch called vds-site-a and migrate all VMs on it
2.a .To create a vdistributed switch .Login to vCenter using vclient ,go to Home-Networking-select datacenter and New vSphere Distributed switch
b.Choose appropriate version
c.Give vDS a name “vds-site-a” and choose number of uplink ports “4”
d.We will add the hosts later
e.Untick creating “default port group ”
f.Distributed switch created
g.First I enabled “network I/O control feature”
h.Next I created “VM Network” port group by right clicking vds-site-a and choosing “New Port Group”
i.I got now my new vDS with one port group called “VM Network-vds-site-a” .I will be migrating the VMs to this port group
j.Now I can add esxi hosts to this vDS.To do so, right click vds-site-a and choose add host
k.Ignore the warning
l.We are not migrating vmkernal port group to vds so click next
n.Ready to complete (We are adding hosts without any uplink)
o.Two hosts are added to vds-site-a vDistributed switch
P.Lets add two of the physical NIC to vDistributed switch
pa)Choose First esxi host esx-01a ,Configuration-Networking-vSphere Distributed switch-Select Manage physical adapters
pb)Add “vmnic3” to dvuplink4 and “vmnic2” to dvuplink 3
Two phyiscal NICs now connected to vDS .Do the same steps (pa and pb) on esx-02a.
I can now migrate my vms from standard switch to vDistributed switch without any outage .To do so, right click vds-site-a (vds) and select Migrate virtual machine networking
b.Choose source and destination network
source: VM Network (Standard switch port group)
Destination:VM Network-vds-site-a (vdistributed switch port group)
c.Choose both VMs (make sure to check the status of Destination network,if it says accessible means ok to migrate)
d.Review and Finish the migration
e.Make sure the task completed successfully.
I can see that the VM network is changed from standard port group to vDistributed port group
Conclusion:Little hard to understand vDS but once you understand the basis the migration is very easy.
Thanks for reading
(whyiblog.com is all about sharing IT knowledge.Remember to share this document with others)