From the course: vSphere 6.7 Foundations: Networking

Demo: Create a vSphere 6.7 Distributed Switch - vSphere Tutorial

From the course: vSphere 6.7 Foundations: Networking

Demo: Create a vSphere 6.7 Distributed Switch

- [Rick] In this video, I'll demonstrate how to create a vSphere distributed switch in vSphere 6.7 using the HTML 5 vSphere client. And I'll be performing this demo using the free hands-on labs that are available at hol.vmware.com. So as you can see here, I'm at the home screen of my vSphere client. And I'm just going to click on networking. And under networking, if I expand my inventory you can see in this hands-on lab there's already a vSphere distributed switch created. I'm going to go ahead and right-click on my virtual data center. And under distributed switch, I'm going to create a new distributed switch. I'm just going to name my distributed switch RickCrisciDemo and hit next. And then I'll choose the version of ESXi that's running in my environment. So which versions of ESXi should this distributed switch be compatible with? If I have some older ESXi hosts on prior versions of vSphere, I can go ahead and make my distributed switch compatible with those. But the newest version has the most features. So I'm always going to want to go with whatever the newest version is that all of my hosts can support. And in this environment all of my hosts are ESXi 6.7 or later. So I'm going to go ahead and choose the latest vSphere distributed switch version. And now I'll choose the number of uplinks. And what you're choosing here is how many VM NICs can I configure per host? So the vSphere distributed switch is going to span many ESXi hosts. Each of those ESXi hosts has their own set of physical adapters. So how many adapters per host do I want to potentially add for this vSphere distributed switch? And at the moment I'm just going to leave it with the default of four. I'm going to leave network IO control enabled. I can use this to prioritize different types of traffic as they flow over those physical adapters. And I do want to create a default port group to connect my virtual machines to. So I'm just going to call it RickCrisciDemoPG. And go ahead and hit next here. And that's about it. Now I've created a vSphere distributed switch. And I can see it here in my inventory. I can see here I've got the port group that I've created. But I've also got a little section here for my uplinks that I'm going to configure on my ESXi hosts. So simply creating a vSphere distributed switch really doesn't mean a whole lot. Right now I can't really use this distributed switch for anything. I have to make it available to my ESXi hosts 'cause remember, a vSphere distributed switch is configured in vCenter. That's what I've done right now. I've created a distributed switch that is present inside vCenter. I now need to distribute that configuration to a group of ESXi hosts. So real quick, before we actually do this and start pushing this distributed switch down to these hosts, let's take a quick look at one or two of these hosts here. And what I want to figure out, I'm going to look at esxi-03 and esxi-04. What I want to understand is what physical adapters currently exist on this host and what are they being used for? So I can see that esxi-03 has two physical adapters and they're already both in use by the existing vSphere distributed switch. And if I look at esxi-04, similar scenario. All right, so the physical adapters for these hosts are actually already being used by a vSphere distributed switch. And I'm just going to dig a little bit deeper here in the host esxi-03 because what I do not want to do is disrupt my management VM kernel port. And so let's click on vmk0. And you can see here, this has management enabled on it. All right, so I have an existing management VM kernel port that is currently configured on this host. I don't want to disrupt that because if I do I'm going to lose the ability for vCenter to communicate with this ESXi host. So I want to make sure to not create any issues there. Here I can see my vSphere distributed switch that currently exists. So what I'm going to do is I'm going to go back to networking. And on my vSphere distributed switch, I'm just going to click on hosts. And here you can see there are currently no hosts associated with this vSphere distributed switch. So I'll click on actions. And I'm going to click on add and manage hosts. And so under add hosts, I'll just choose add hosts and hit next. And I'm going to select the hosts that I want to add to this vSphere distributed switch. So like I said, I'll pick hosts esxi-03 and esxi-04. I'll go ahead and hit okay here. And I'm going to go ahead and connect to these hosts to my vSphere distributed switch. Now, on this screen you can see it's asking you which physical adapters do we want to dedicate to this vSphere distributed switch? So what I'm actually going to do is steal one adapter on each host away from the existing vSphere distributed switch and assign them to this vSphere distributed switch. And there's those uplinks. We said four uplinks per host. I'm going to go ahead and make this uplink number one. And I'm going to grab this one on host esx-04. I'm going to assign it and I'm going to make that uplink one for that host. So on each host now I've taken one physical adapter per host and I've dedicated those physical adapters to this vSphere distributed switch. And now it's asking me do I want to migrate any existing VM kernel ports? So there's VM kernel ports that have already been created on another virtual switch for things like management and vMotion. The big thing here that you want to bear in mind especially with the management VM kernel port is I've just created this vSphere distributed switch. I might want to make sure it works prior to doing things like migrating my management VM kernel port over because if I mess that up, I'm not going to be able to communicate with these hosts. So what I'm going to do is I'm going to just leave all of my VM kernel ports where they are at the moment. And typically this is what I'll do. If I'm creating a new vSphere distributed switch I'll leave my VM kernel ports where they are until I've got the vSphere distributed switch up and running and I've verified that it can communicate across the appropriate VLANs. Then and only then will I start migrating those VM kernel ports. Here's some virtual machines that currently exist on these two ESXi hosts. And I can see right now that these virtual machines are connected to these port groups. So this virtual machine, weathervane-01a, is connected to a certain source port group. If I want to, I can click here on assign port group and I can take that virtual machine and I can migrate its network connection to my new port group on this distributed switch. So this is an easy way for me to kind of grab VMs that already exist that are already connected to other virtual switches and move them over to this new virtual switch. And then I'll just hit next and finish. And so now I've got my new vSphere distributed switch. And if I wait for the refresh here, you can see that I have two ESXi hosts connected to it. I have a port group. And I have two virtual machines that are currently connected to that port group. So at the moment I can see there's some alerts raised on these hosts. These are no big deal. These are just network uplink redundancy lost. So basically what that's telling me is these hosts used to have two adapters on a virtual switch. Now their adapters have been spread across two different distributed switches so I don't have redundancy. But anyways, I'm going to go back to networking here. And if I want to add another host, I can easily do that. I can right-click here. I can go to add and manage hosts. I can choose add hosts and I could pick another one of the ESXi hosts. Let's pick host five this time. I'm going to add host five. And it's the exact same process that we saw before. I'll just hit next. I'm going to pick VM NIC one, move it over to this vSphere distributed switch on uplink one. I'm not going to mess with any of my VM kernel ports. And I'm not going to migrate this VM because I'll actually show you how to do that in a moment. So I can always add hosts to the vSphere distributed switch as I see fit, all right? And what I'm basically just doing is pushing down this vSphere distributed switch configuration to those hosts. All right and so I can also do things like remove a host from a vSphere distributed switch. So let's pick esxi-04. And remember, esxi-04 has a virtual machine running on it that is connected to this vSphere distributed switch. If we go to VMs, we can see we've got these two VMs that are connected to this distributed switch. One of those VMs is on esxi-04. So let's go up to actions one more time. And I am going to add or manage hosts. But this time I'm going to remove a host. And I'm going to try and remove esx-04. So I'll just select esx-04, hit okay here, hit next. And it's going to say okay, you're removing one host from this vSphere distributed switch. So as you can see here down in my recent tasks it didn't work. And the reason it didn't work is 'cause I still have virtual machines connected to that vSphere distributed switch. So let's go over to the inventory of esx-04. Let's grab this virtual machine. I'm just going to do this the old-fashioned way. I'm going to right-click the VM, go to edit settings, and put this VM at a different port group. I'm going to move it away from that distributed switch. And I'm going to connect its network adapter to some other port group. And I don't really care which port group here. So I'm just going to pick this one, hit okay. And let's try this one more time. Now let's try and remove host four from the vSphere distributed switch now that none of the VMs on it are connected to the vSphere distributed switch. So I'll go to remove hosts. I'll click on attached hosts. I'll grab esx-04a. I'll hit okay, next, and finish. And it's going to now remove that host from this vSphere distributed switch. And it worked that time. So that's how you actually remove a host from the vSphere distributed switch. You have to first ensure that no virtual machines on that host are connected to the vSphere distributed switch and then you can remove it. So that's how we create a vSphere distributed switch. Now, in the next lesson we'll get into how to manage policies and do a more in-depth configuration of the vSphere distributed switch.

Contents