How to create a VDS in VMware
The VMware vSphere Distributed Switch, also known as VDS, is probably one of the least understood parts of vSphere. Network teams typically hand off ownership of all things vSphere to the virtualization team (including virtual networking), and the virtualization team often knows just enough about the virtual switching environment to make things work. In this post, I hope to demystify some of the details around a VDS, and will explain how to create a VDS in vSphere 7.0.
If you get stuck or need to see VDS configuration- check out the TechBytes vSphere Networking Crash Course where you'll learn everything in this blog and a lot more about not only the VDS, but also the Standard Switch as well.
What is a VDS?
One of the biggest problems people make when learning about the VDS, is overcomplicating it. Let me put it really simply - a VDS is a virtual switch that spans multiple physical ESXi hosts. It's technically one switch, that is managed entirely in vCenter (and thus, vCenter is a requirement). It has uplinks (on each host) to the physical network. It also has things connected to it - in this case, Virtual Machines.
Take a look at the drawing below to see what a VDS looks like - but don't worry, we're going to discuss the components.
There's a few components that make up a VDS, let's take a look at some of them:
Distributed Switch (VDS)
This is the actual VDS itself. It is created in vCenter. Once created, we then have to "add hosts" to the VDS itself. If we don't, the hosts will not see any port groups created by the VDS.
Distributed Port Groups
A port group is just an object that we can connect VMs to. The port group can be assigned a single VLAN, or a range of VLANs (a trunk port group). Let's say we have a VLAN on our physical network for web servers, VLAN 52. If we had VMs that we wanted to connect to that VLAN, we would create a Distributed Port Group on our VDS, and assign VLAN 52 to it. Once we did that, any VMs connected to this port group, will now be on the VLAN 52 network. One of the cool things about Distributed Port Groups with the VDS, is that you only have to create the port group once, and it will be available to all hosts that are connected to the VDS.
This part might seem a bit confusing, but it's really simple. Physical switches have uplinks - connections to other switches, or routers. A VDS is the same way. It needs uplinks, but in our case, the VDS will have multiple uplinks. Each host that is connected to the VDS, for example, will usually have at least 2 uplinks for that VDS. Take a look at the drawing above - we have three hosts, and each host has 2 uplinks dedicated to the VDS. This makes sense if we think about it - if that wasn't the case, our VMs wouldn't be able to talk to the physical network!
Configuring a VDS from Scratch: The process
The first thing you need to do before creating a VDS, is make sure you're licensed for the VDS, and that you have vCenter deployed with a couple of hosts (at least) in your inventory. By default, your hosts will have a standard switch (vSwitch0). For the purposes of lab testing, I recommend leaving vSwitch0 in place, and using additional uplinks per host for the VDS.
All you need to do to create the VDS is head to the Networking tab (looks like a globe), then right click on your datacenter - in our case, this is called Miami DC. From there, go to Distributed Switch > New Distributed Switch. You can take a look at what this should look like below:
Next, you need to give your new VDS a name. In our case, I left it to the default of DSwitch.
After that, you can "Next" through the Select Version page (leaving it to the default). After that, you'll have the ability to configure a couple of things. Take a look at the screenshot below, then I'll explain these settings:
As far as these settings, let's talk about them.
Number of uplinks
This setting is the most confusing! What you're essentially doing here, is deciding how many uplinks each host will have dedicated to your VDS. Most people get hung up on this option - but the reality is that you can leave it to the default and simply not use all of your uplinks. I recommend leaving it to the default unless you have more than 4 physical interfaces on each host that you plan on assigning to the VDS.
Network I/O Control
This allows you to prioritize traffic leaving your host. An example of this would be prioritizing VM traffic over vMotion traffic.
Default Port Group
As I mentioned above, a Port Group is just a object that allows you to configure VLAN assignments and ultimately connect VMs to the port group. This option is just asking if you want to create one as part of this wizard. I usually uncheck this, and just create Port Groups after the VDS is created.
Once you've decided all of these settings, you can skip ahead until you see Finish on the VDS wizard. After this, your VDS is created.
Add Hosts to your VDS
This is a pretty important step that some people forget. As of now, we have a VDS, but no hosts actually added to the VDS. What we need to do now is add a couple of our hosts to the VDS. To do that, just right click on your VDS name, and select Add and Manage Hosts. From here, you'll want to select Add Hosts.
At this step, you're just selecting which hosts you'll be adding to the VDS. In our case, we selected two - host 172.16.254.20 and .30.
Next, we need to assign physical uplinks to the VDS uplinks. You can see that in the screenshot below:
The above screenshot can be confusing, so let me explain this. What you're doing here is deciding which physical vmnic interfaces on your host, will become a VDS uplink. In our case, you can see that for host 172.16.254.20, we only have vmnic1 and vmnic2 available to be assigned - the other vmnics are currently assigned. We could use those, but I recommend using a free interface (if you have one available).
Once you've assigned your physical interfaces, the hard work is done. You can now optionally migrate your VMkernel adapters, and VMs over to your VDS. This is already a lengthy post, so I won't go into detail on those now, but I have covered all of this and more in the TechBytes vSphere Networking Crash Course - you should definitely check it out if you need to know how the VDS works and feel comfortable using it!