Don’t miss the YouTube video with the results at the bottom!

Over the last several years, I’ve been deploying a LOT of Hyper-V. As a long-time VMware fan, I have to admit, System Center and Hyper-V are sorely lacking in my opinion when it comes to Host Profiles. After all, VMware makes it so easy to deploy with a common set of standard configurations. You drop the installer in, answer a couple easy questions, and within 15 minutes, you typically have a host that has the basic configuration. Then, you can simply attach it to your existing VMware vCenter server, put in Maintenance Mode, attach and apply a host profile. Combine that with Image Builder and Auto Deploy, and you have an even quicker time to value.

Hyper-V? Amazing platform in my opinion, especially when you integrate it with Failover Clustering, Cluster Shared Volumes, System Center Virtual Machine Manager, and App Controller. However, with all the progress Microsoft has made over the years, they still haven’t listened to my desperate plea to integrate a Host Profiles oriented approach to provisioning Hyper-V hosts. Sure, the free Hyper-V Server 2012 R2 is pretty simple, with its Server Core platform and basic wizard driven menu, but most customers need the full support of Datacenter or Standard, whether Core or with a GUI. PowerShell is amazing, and it certainly goes a long way to building and configuring standardized Hyper-V hosts. And, with a bit of work, you can certainly use System Center Configuration Manager to deploy your Hyper-V hosts. However, if you’re a consultant like me you need a deployment mechanism that doesn’t take 1-2 days to integrate into the customers’ environment before you’re able to deploy hosts. And you have to assume most customers don’t already have System Center.

This brings me to my obvious conclusion: Use Microsoft Deployment Toolkit (MDT), some fancy scripting and PowerShell to create an easy to deploy, rinse and repeat approach to building Hyper-V hosts. Take it one step further, use the Advanced Configuration -> Media process to build a standard ISO that I can take around to customer environments to fully automate the build process using a standard, repeatable process. Over the next several blog posts, I’m going to show you all the ins and outs of this process, including how I created a custom input menu for MDT to capture various variables. Once these variables are captured, I can reuse them in scripts and processes along the build process to truly create a lite-touch deployment process for Hyper-V hosts. As the title implies, this post series will show you how to Rapid Provision Windows Server 2012 R2 Datacenter Hyper-V hosts using Microsoft Deployment Toolkit (MDT). Best part is, this tools are all free to use, whether you’re going to integrate with System Center or just want a couple stand-alone hosts.

Let’s get started. For my environment, I’m using HP Blades in a C7000 chassis with Virtual Connect FlexFabric. If you’re not familiar, FlexFabric combines ethernet and fiberchannel using Converged Network Adapters (CNAs) and FCOE from the blade perspective. Virtual Connect allows you to carve up the LOMs into four FlexNICs per module, or eight per host. For details, take a look at the Virtual Connect cookbook. My standard Hyper-V blade looks like this:

To speed up even the Virtual Connect component of the configuration, I prefer to script the profile creation through SSH. Below you will find a sample server profile that you can manipulate and modify to configure for Hyper-V hosts. The order of the NICs is very important as I’m using PowerShell to sort the NICs by Mac address and rename and team appropriately.

I’m using “Boot from SAN”, Direct-attached to 3PAR, so if you’re intending to install to local drives modify the boot parameters for FCoE. This MDT script still applies to rackmount servers, but just keep in mind that it will sort by the MAC address and put the first two into the management team, second two into cluster, and third pair into the VM team.

Let’s move on to the workflow for MDT. First, I needed to develop a custom wizard to accept all the different variables for the Hyper-V build. Below you will find a screenshot of the finished result:

In my design, I’m using a dedicated layer 2 (non-routed) network for the cluster communications. This can either be an internal or an external network, depending on if you need to cluster more than one C7000 chassis. As such, I don’t want to present a field for “Cluster Default Gateway” as there should only be a single default gateway on Windows systems.

After the user enters the critical variables, the MDT process is based on the Standard Server Task Sequence and will do the following:

Hi, Dane,
Glad to find your video and post online. I’ve been working on an issue during the deployment of Windows 2012 R2 Hyper-V host through MDT 2013 for a while. The physical server I test is HP Proliant DL380 G4. The issue is at the task sequence step to enable Hyper-V. Due to the reason that Hyper-V requires 2 times of reboot in which the 2nd reboot is not supported by MDT TS (http://blogs.technet.com/b/chrad/archive/2011/05/01/enabling-hyper-v-role-successfully-via-operating-system-deployment-task-sequence.aspx) my step of installing Hyper-V role always failed, no matter what tool I used to enable Hyper-V – I tried Powershell, Dism, or the built-in “Install Role and Feature” in MDT.

Hi Dane, great work with this! I’m just looking into building a load (around 10) of hyper-V hosts for a customer and MDT was my first thought. I’m looking to do the bare metal install of server 2012, configure the network teams and then hyper-v. Second part will be to actually create and install the VMs on the host. I can’t find any futher posts on this. Do you have any example task sequences / scripts you could post?