The Microsoft Deployment Toolkit is a powerful utility for automating operating system deployments in both physical and virtual environments. With the following pointers, you'll be rapidly deploying OSes in no time.
The Microsoft Deployment Toolkit (MDT), a part of the Solutions Accelerator package, is a free, standalone product that automates server and desktop OS deployments. You can also pair it with a licensed copy of Systems Center Configuration Manager (SCCM) to add more deployment and management features, such as update management and package distribution.
The latest version of MDT, released in 2012, has a couple of improvements for virtualized workloads, compared to the previous version, such as multi-hypervisor OS deployments and the ability to gather detailed information on virtual machines.
Intelligence baked into the Microsoft Deployment Toolkit
One of the cool things about using the MDT is that it "knows" when you are deploying an OS to a virtualized environment. By using the script ZTIGather.wsf to collect all the information it can about the physical or virtual hardware being deployed, MDT can identify virtualized processor types and sets a variable called IsHypervisorRunning to either True or False. If it's True, MDT will set a property variable called "IsVM" and set that to True. And finally, it will set the platform variables.
In the latest version, MDT can detect Microsoft Hyper-V, VMware vSphere, Citrix XenServer and Oracle VirtualBox. Use the following variables when setting commands in your task sequences:
Getting started with the Microsoft Deployment Toolkit
VMPlatform = Hyper-V for Microsoft Hyper-V
VMPlatform = VMware for VMware vSphere
VMPlatform = Xen for Citrix Xenserver
VMPlatform = VirtualBox for Oracle's VirtualBox
As an example, you can incorporate one of these command sequences to install the guest tools inside of the OS, including VMware Tools. If the IsVM variable is equal to True, you can create a virtualization sequence folder, like the one pictured below, that will launch. It will then evaluate the VMPlatform variable to see if it equals VMware. If it does, MDT will execute a silent install of the VMware Tools.
Figure 1 The virtualization folder in state restore sequence
Figure 2 The VMPlatform variable set for VMware
As you can see from the screenshot, you can add all four VMPlatform variables to the task sequence to deploy on any platform that may be added to your data centers. This capability makes the MDT more scalable and flexible for future hypervisor technologies.
Other Microsoft Deployment Toolkit variables added
Microsoft also added other variables to the MDT, which you can use to define your task sequences and commands. For example, here is a brief listing of just some of what ZTIGather collects. (You can always look at the ZTIGather log file, located in the %temp% directory, to see exactly what it collects.)
- SupportsHyperVRole is now = False (Indicates if it's a Hyper-V VM)
- VMName is now = MACHINENAME1 (The virtual machine name)
- SupportsVT is now = False (Indicates whether the hardware supports Intel's VT chipset instructions)
- Supports64Bit is now = True (Details if the host supports 64-bit guests)
- VMHost is now = HOSTNAME1.DOMAIN.COM (Provides the VM's Fully Qualified Domain name)
- SupportsNX is now = True (Indicates if the host hardware supports Never Execute bit sets)
Automating driver deployments with the MDT
Drivers are another issue to take into consideration when getting your deployment ready for creating virtual servers. All of the hypervisors have their own set of drivers that are needed in order to start the deployment of the OS with WinPE (part of the initial boot deployment process), and during the deployment for any hardware that is detected after the OS is installed.
You will need to get familiar with identifying the different toolsets the hypervisor vendors supply and how to extract those drivers from their distributions and add them to the Out-Of-Box Drivers Store in MDT. By importing them into this store and organizing them by platform, you will save yourself a lot of time and frustration in trying to figure out what drivers are needed for which hypervisor platform.
Figure 3 An example Out-Of-Box driver store
Monitoring deployments with the Microsoft Deployment Toolkit
I also would highly recommend that you enable the Monitoring feature in your MDT deployments, especially for virtual server installations. With Monitoring, you are able to deploy several servers (and by that, I mean as many as your network will handle), across multiple hypervisor platforms and data center sites, all at one time!
It can get a little difficult to manage all of these deployments, so the MDT includes a way to monitor their progress and report back on several aspects of the deployments in a single console. When I was deploying just three servers at once, this feature came in very handy. I did not need all of those console windows open to view the progress.
Enabling monitoring is as easy as specifying in the properties of the deployment share that you want the feature activated. Additionally, you need to open the Event and Data firewall ports on the MDT server. Michael Niehaus, the person behind the MDT, also wrote a good feature article on this process.
I find that working with the MDT and SCCM is quite fun. You automate many tasks in a physical or virtual infrastructure, and you can either do it your own way or borrow someone else's published method. Oh, and did I mention it's free!
Dig Deeper on Virtual machine provisioning and configuration
Mike Nelson asks:
Do you use the MDT tool?
0 ResponsesJoin the Discussion