Using Template Host for Consistent Network Configuration in dvSwitch


Yesterday while configuring dvSwitch and Port groups I came across a new cool feature in vSphere 6 and I was amazed to see this. I will talk about this feature in this post and will demonstrate how to use it.

Let’s see what this feature is all about.

In my last post Configuring dvSwitch and Port Groups I demonstrated how to add Esxi hosts to dvSwitch and migrate virtual networking from Standard switch to dvSwitch. If you remember I have added only one host at begining as I am not very much comfortable with dvSwitch at the moment.

Once it was successfully added I was trying to add the remaining 2 hosts to dvSwitch and during doing so, discovered a new feature which I have not seen earlier. Let me give a little bit background of this feature.

In vSphere 6 there is a feature of using template host in dvSwitch. What this template host do is that once you have added a host to dvSwitch and configured the uplinks, vmkernel portgroups and other settings, you can use this host as template and when adding other hosts you don’t have to do all configuration (like assigning uplinks, creating new vmkernel adapters, mapping vmkernel adapters to port groups on dvSwitch) again for remaining hosts.

All the configuration settings will be copied from template host and applied to remaining hosts that you want to add to dvSwitch. This is very similar to concept of host profiles and if you have used host profiles in your environment, you can relate it easily with what I have said above.

OK, enough talks now. Let me demonstrate it for ease of understanding.

To add hosts to dvswitch navigate to Home > Networking and select your dvSwitch and click on Add and manage hosts.

vcn-1

Select “Add host and manage host networking (advanced)” option. and hit Next.

vcn-2

Click on “+” New hosts to add hosts to your dvSwitch.

Remember at this point I have already added one host (galvatron) to dvSwitch and I will add remaining hosts in this step.

vcn-3

Select the remaining hosts to add and click OK.

vcn-4

Now Select hosts page will list the newly added hosts in the list. Click on Attached host to add already added host in this list.

vcn-5

You can see presence of host galvatron in list. select this host and click OK.

vcn-6

You can now see all your esxi hosts listed. Checkmark the box at bottom which reads “Configure identical network settings on multiple hosts” and click Next.

vcn-7

On Select template host page select host galvatron as template host as we have already configured all network settings on this host and similar settings will be propagated to remaining hosts. Hit next to continue.

vcn-8

Select all the 4 options and hit Next.

vcn-9

Select the host Galvatron and click on down arrow button “Apply to all”. What this will do is it will read the uplink information of host galvatron i.e which vmnic is associated with which uplink, and then propagate the same settings to remaining hosts (optimus and megatron in my case)

As you can see in below screenshot, host galvatron has vmnic0 linked to inf-mgmt and vmnic1 is linked to inf-vMotion. When you click on Apply to all, then vmnic0 in both optimus and megatron will be linked to inf-mgmt and vmnic1 to inf-vMotion.

Hit next to continue.

vcn-10

Compare the above and below screenshot and you will find that uplink assignment has been changed for optimus and megatron.

Hit next to continue.

vcn-12

Next is to replicate vmkernel port info to hosts. Again select host and galvatron and click on Apply to all.

This setting will migrate the vmkernel portgroups to correct portgroups on dvSwitch. As you can see in below screenshot, vmk0 is mapped to Management Network on Standard switch for both Megatron and Optimus host, while host galvatron has its vmk0 on dvswitch and mapped to Lab-mgmt portgroup.

When you hit Apply to all then the vmk0 on both optimus and megatron will be migrated from standard switch to dvSwitch and will be mapped to Lab-mgmt portgroup. Similarly vmk1 will be mapped to vMotion_NW portgroup.

As you can see I don’t have to configure uplink, vmkernel adapter and portgroup on all hosts individually. If you have large number of hosts in your environment then this feature can save you a lot of time and help you achieve homogeneous network configuration across all hosts.

Isn’t this something cool?

Hit next to continue.

vcn-15

In the next window provide ip addresses for your vmkernel adapters in comma separated style as shown below.

vcn-14

On Analyze impact page if everything looks green and reads No impact then you are good to go. Hit next to continue.

vcn-16

Under Advanced host settings page hit next if you don’t wanna change any settings.

vcn-17

On Ready to complete page review your settings and hit Finish.

vcn-18

Conclusion: Overall this feature looks cool as it can save lot of time in big infrastructures and can ensure homogenous network configuration in your environment. Also if you find a way to script the above process then you can save some valuable time for yourself and your organization and can pat your back for this.

Also above can be achieved by using host profiles (most big organizations are relying on this and pair this with Auto-Deploy). But for lab environments this is really something cool.

I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing. Be sociable 🙂

 

About Alex Hunt

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in Vmware and tagged . Bookmark the permalink.

2 Responses to Using Template Host for Consistent Network Configuration in dvSwitch

  1. Ahmad Ali says:

    This feature is also available in vSphere 5.5

    Like

  2. Pingback: Newsletter: January 10, 2016 | Notes from MWhite

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s