If you’re going to deploy servers using Microsoft Deployment Toolkit 2010(MDT 2010) you might want to add some special settings for virtual machines (VMs). For XenServer, check this post.  You can add a lot of useful settings in each Task Sequence but if you’re planning to have a lot of Task Sequences, like one for each server role, it’s going to take a lot of time to modify all task sequences. And then there’s always the risk that you miss one somewhere.

Instead, you can use the IsVM variable in the customsettings.ini file to enable this in all task sequences. Here’s how to do it:

First, you need to change the priority in the Settings section. It could look something like this:

[Settings]
Priority=ByVMType,Default
Properties=MyCustomProperty

Second, you need to add the custom section you just created.

Put the exact same variable as above within []. Within this section, you’re going to call the IsVM variable. You can do this by creating a subsection.

[ByVMType]
Subsection=VM-%IsVM%

In the section above, you will create the conditions for the next section. If IsVM is true, then MDT will start looking for the next step:

[VM-True]

Below this section, you can write practically any conditions that you want to apply to a virtual machine.

The sample configuration below will give you a complete summary on how to use this variable.

[Settings]
Priority=ByVMType,Default
Properties=MyCustomProperty

[ByVMType]
Subsection=VM-%IsVM%

[VM-True]
TaskSequenceID=WIN2008R2STDX64
UILanguage=en-US
SkipTimeZone=NO

[Default]
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipAdminPassword=YES
SkipProductKey=YES

Appendix

  • You could of course also create the section named [VM-False] and add commands and should apply to all non-virtual machines.
  • According to Michael Niehaus, lead developer of MDT at Microsoft, MDT can only recognize the following virtualization software’s:
    • Hyper-V Beta or RC0
    • Hyper-V
    • VS2005R2SP1 or VPC2007
    • VS2005R2
    • VS2005 or VPC2004
    • VMware
    • VirtualBox
    • You can actually use this command for your desktops, laptops and servers as well. The usage is the same. Sample config:

[Settings]
Priority=ByLaptopType,ByDesktopType,ByServerType,Default

[ByLaptopType]
Subsection=Laptop-%IsLaptop%

[ByDesktopType]
Subsection=Desktop-%IsDesktop%

[ByServerType]
Subsection=Server-%IsServer%

[Laptop-True]
TaskSequenceID=WIN7PROX86LTP

[Desktop-True]
TaskSequenceID=WIN7PROX64DSK

[Server-True]
TaskSequenceID=WIN2008R2STDX64