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 beginning 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.


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


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.


Select the remaining hosts to add and click OK.


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.


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


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.


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.


Select all the 4 options and hit Next.


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.


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

Hit next to continue.


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.


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


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


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


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


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 🙂

0 thoughts on “Using Template Host for Consistent Network Configuration in dvSwitch

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