Gadgets
How to Create and Configure Virtual Distributed Switch in vCenter
[ad_1]
Read this detailed guide to learn how to create a virtual distributed switch, configure the switch, and migrate standard switch configurations.
Overview of Distributed Switches
Seating on top of the vCenter networking architecture is the vSphere Distributed switch. Next on that layer are Distributed port groups.
Finally, a Distributed port group contains one or more Uplink port groups.
Most production scenarios will likely need one distributed switch. As I said earlier, a Distributed switch should contain 1 or more Distributed port groups.
Most Distributed port group designs follow the VLAN infrastructure of the environment’s physical switch.
The idea behind the distributed switch in vCenter is to provide ESXi hosts with consistent network configuration.
So, when you create a distributed switch in vCenter and configure distributed port groups and Uplink port groups, these settings are applied to all hosts that are linked to the switch.
To read more about the VMWare distributed switch architecture, visit VMWare’s documentation, vSphere Distributed Switch Architecture.
In this guide, I’ll create a single Distributed switch and configure it based on the tables below:
Distributed Switch | Version | Distributed Port Group | # Uplink Port Groups |
---|---|---|---|
Iab-vDS-1 | 7.0.0 | 192.168.0.0 | 4 |
A distributed switch should have a port group for management, vMotion, virtual machine networking, and vSAN networking traffic. The table below specifies the specs of each distributed port group.
In production, you’ll set the VLAN ID for each distributed port group.
Distributed Port Group | Distributed Switch | VLAN ID | Port Binding |
---|---|---|---|
mgt-DPG | Iab-vDS-1 | none | Static binding (elastic) |
vMotion-DPG | Iab-vDS-1 | none | Static binding (elastic) |
VMNic-DPG | Iab-vDS-1 | none | Static binding (elastic) |
Uplink Port Group | VLAN ID | Port Binding | Ports |
---|---|---|---|
autogenerated | VLAN trunk: 0-4094 | Static binding | autogenerated |
The following sections explain the detailed steps.
Step 1: Create a Virtual Distributed Switch (vDS) in vCenter
- Enter the Fully Qualified Domain Name (FQDN) of the vCenter server on a browser and press the enter key. In my case, the FQDN of my vCenter server is ipmvcsa.corp.itechguides.com
- Next, step enter sign in with the username and password that you assigned to the vCenter when you created (user name should be [email protected])

- Then, on the vCenter page, expand the name of the server and click the Datacenter. Then, select Networks > Distributed Switches.


- After that, click the ACTIONS menu, and point to Distributed Switch > New Distributed Switch.




- On the first page of the wizard, enter the name of the switch – I’m using Iab-vDS-1 from the table earlier in this section – then, click Next.


- Select the version of the distributed switch – I’m using 7.0.0 for this lab. To learn more about distributed switch version compatibility with ESXi hosts, read the Procedure section of VMWare’s Upgrade a vSphere Distributed Switch to a Later Version guide.


I’m using 7.0.0 as my distributed switch version because my ESXi hosts are version 7.0.0. You can get this information from the Summary tab of the ESXi host in vCenter.


- On the next page of the new distributed switch creation wizard, select the number of uplinks, and leave the other two settings as default. Then, enter a name for the port group to create.
The wizard specifies a number based on the number of pNICs on the hosts. You can accept this number or change it according to your design.


- Finally, review your selections and create the switch.


After creating the switch, if you expand it, the distributed port group and an auto-created Uplink port group will be displayed.


Step 2: Create More Port Groups
When we created the distributed switch, a management port group was created. However, as I mentioned earlier, you need to create additional port groups for vMotion, VMNetwork, and vSAN.
Here are the steps to create a distributed port group.
- With the virtual distributed switch selected, click its ACTIONS menu, point to Distributed Port Group, and select New Distributed Port Group.


- Give the distributed port group a name and click Next.


- Finally, configure the settings of the port group, review, and create it.




Repeat steps 1 to 3 to create each distributed port group.
Step 3: Add ESXi Hosts to the vDS
- Select the virtual distributed port group. Then, click its ACTIONS menu and select Add and Manage Hosts.


- Select the Add hosts option.


- On the Select Hosts page, vCenter will perform a compatibility test on the hosts. Select the hosts you want to add to the vDS.


- On the Manage physical adapters page, assign an uplink to each physical network adapter. In my example, each ESXi hots has just one pNIC, so I’m assigning Uplink 1 to the vmnic0 pNIC.




- When the Manage VMkernel adapters page loads, click ASSIGN PORT GROUP. Then, on the Assign port group tab, click ASSIGN next to the mgt-DPG Port group to assign the VMkernel, vmk0 to the port group.


As I mentioned in step 4 earlier, in a production environment, each ESXi host will have a physical network adapter for Management, vMotion, VM Network, etc. So, in the previous step, you would have assigned a Uplink (which represents physical net adapters) to each port group. If you did that, you will assign each port group to the different uplinks here.




- On the Migrate VM networking page, click Next. We would migrate the VM network to its port group later. Finally, review your configurations and complete the step.


During the migration of the hosts’ networks, your vCenter may lose connectivity for a while. When it returns, with the vDS selected, click the Hosts tab to confirm that all the hosts are now on the vDS.


Step 4: Migrate the Standard Switch Configurations
To confirm the migration, select a host, and click the Configuration tab. Then, under Networking, click Virtual switches. If the vDS should report network connectivity because we have not migrated the uplinks to the distributed port group.
You need to migrate the configuration from the standard switch to the distributed switch.
- To begin, click the menu (3 dots, number 4 in the screenshot) and select “Migrate Networking”


- Then, assign the vmnics an uplink


- Assign the VMKernel nic to the switches.


- Assign the VM Network port group to the VM network. I’m using the management network here because my VM net port group does not have an uplink.


After w while, refresh the vCenter page. The vDS will now have VMKernel port and VM connections. If you assigned different port groups to the management and VM Network, they should be displayed here.
You will also notice that the vDS now has an uplink via the Uplink port group.


Repeat the steps in this section for all hosts.
After the migration, if you open the configuration of a VM in a host you migrated to the virtual distributed switch (vDS), the VM’s network will now be in the designated port group.


Finally, to see the power of distributed switches, when you log in to the web client of each ESXi hots, the distributed switch configuration will be applied.


Now that you’ve created a vDS in vCenter when a new ESXi host is added to vCenter, you can apply these settings to the new host seamlessly!
Step 5: Migrate vMotion Network
To designate a VMkernel adapter for vMotion use:
- Select the host, then, Configuration > Networking (VMkernel adapters). Then, click the row action (3 dots) and select Edit.


- On the Edit menu, check vMotion and click OK.
As I have mentioned multiple times in this guide, in production, you should designate a different net adapter for each of the services checked in my screenshot below.


Repeat the above steps for each host.
Conclusion
Creating a distributed switch in vCenter may look complex but a successful deployment starts with a good design.
In this long guide, I have explained the steps to create a virtual distributed switch (vDS) in vCenter. Additionally, I explained how to create and configure distributed port groups, Uplink port groups, and add hosts to the vDS.
Finally, I demonstrated how to migrate the settings in a Standard VMWare switch to a vDS.
I am confident that you found this guide insightful! Why not let me know by responding to the “Was this page helpful?” feedback request below?
[ad_2]
Victor Ashiedu
Source link
