VCP – vSphere Distributed switches

      No Comments on VCP – vSphere Distributed switches

So now that we have a good handle on the standard switches, lets look at distributed switches.  A distributed switch is one that’s managed at the vCenter level and propagates across all hosts.  This gives you a centralized management point for the vSwitch.  In the rest of this post, I’m going to refer to the distributed vSwitch as the DVS and the standard vSwitch as the SVS. 

So let’s say you’ve got an environment up and running on SVS and you’d like to migrate it over to DVS.  It’s actually pretty easy to do ,and as we’ll see, your VMs wont take a hit when you migrate over (if you do it correctly). 

Step 1 – Free up a uplink port from the SVS
So the first step is to free up a physical uplink from each SVS to use for our new DVS.  If you read the last post, you should know how to do this.  Just go into your SVS config, and remove vmnic1 from the list of network adapters associated with the SVS.   When I completed that, my SVS now looks like this…

image 
Make sure you free up a NIC on any host you want to become a member of the new DVS. 

Step 2 – Create the new DVS
To create a new distributed switch in vCenter, go to home, inventory, and then networking.  Right click on your data center and select ‘New vSphere Distributed Switch’.

image 
This loads the DVS wizard.  On the first page, leave the default option of version 5 selected and click next…

image 
On the next page, you can name your DVS as well as determine how many uplink ports each server can have.  Mine only have two each , but I’ll leave the default at 4.  Then click next…

image 
On the next screen, we get the option to add hosts and uplinks(vmnics) to the DVS.  You can do this now, or chose to do it later.  Since we already free’d up the uplinks we might as well do it now.  Select the hosts you want to add and select the uplink you free’d up from the SVS earlier.  Then click next…

image 
On the next screen, I unchecked the box that said ‘Automatically create a default port group’.  I like my port groups to be for a specific purpose so I don’t want a default one.  Then click finish…

image 
Step 3 – Create new distributed port-groups
Once the task completes, let’s add some port groups to the DVS that we can migrate hosts to.  In the network inventory view, right click the new DVS and select the ‘New Port group’ option…

image 
In the wizard that comes up, enter your port-group name, and change the VLAN to whatever VLAN you had in the port-group on the SVS.  We are basically recreating all of the SVS port-groups on the DVS in this step.

image 
Do the same for any other port-groups you need to add. 

image 
Step 4 – Move your VMkernel ports over
So at this point, you have a brand new DVS that should have all of the connectivity it needs to act just like the SVS.  The first thing I like to do is move over the VMkernel ports.  But first, let’s talk about how that works on the DVS.  I’m not sure if you noticed, but when I was adding DVS port-groups, I added one for management.  Now, on the SVS, I didn’t have that.  I just had a VMkernel port tagged on VLAN 10.  While I cant find this documented anywhere, it’s apparent that you need a distributed port-group to match and specific VMkernel interface that you have.  That is, a VMkernel interface resides within a port-group on a DVS.  So now that we have that out of the way, let’s give it a try.

Go to hosts and clusters, select your host, go to the configuration tab, select networking, and then make sure you are viewing the DVS by click it at the top of the window.  Then click ‘Manage Virtual Adapters’…

image 
At the top of the next screen, click ‘Add’.  On the wizard that pops up, chose the migration option…

image 
On the next screen, select the appropriate port-groups for each VMkernel interface, then click Next…

image 
Review the changes and click Finish…

image 
Once the task completes, all of your VMkernel interfaces should be moved over. 

Step 5 – Move your VM’s over
This is done by simply editing the the VM settings, and choosing the new DVS port-group…

image 
If all goes well, your VMs should move over to the new DVS without dropping a packet (or at least one that you notice).  Complete this change for all of your VMs.

Step 6 – Cleanup
So now that everything is up and running on the DVS, let’s do some final cleanup.  Remove the rest of the vmnics from the SVS, then remove the SVS entirely by click remove…

image 
Now we can add the left over uplink to the DVS on each host.  Go into the DVS on each host and click the ‘Manage Physical Adapters’ link…

image 
Click the ‘Click to add NIC’ link and then select the available NIC to add…

image 
When you are all done, it should look like this…

image 
Complete the same steps on your other hosts and you’re all done!

Leave a Reply

Your email address will not be published.