Deployment–VMCreator updates with PDT 2.6

Deployment–VMCreator updates with PDT 2.6

  • Comments 4
  • Likes

PowerShell Deployment Toolkit 2.6 (PDT), which is available on the TechNet Gallery here, added new capabilities for VM Creation:

  • Generation 2 VMs
  • VLAN Tagging
  • MAC Spoofing
  • Autostop Settings
  • Guest Services

As a reminder, VMCreator.ps1 was introduced in this post.  The PDT download includes a sample Variable.xml file that includes a <VMs> section that defines how VMs are created.  The new capabilities are all defined by additional tags in the <VMs> section either in the <Default> section to be used by all VMs or in each individual <VM> section.

The new tags are:

Generation 2 VMs

To create a generation 2 VM include this in the main section for <Default> or each individual <VM>, at the same level as <VMName>.

<VMGeneration>2</VMGeneration>

There are several conditions for this to work correctly – the Hyper-V host must be running Windows Server 2012 R2, and the parent OSDisk must be suitable for a generation 2 VM.  You can use the current version of Convert-WindowsImage.ps1 – available on the TechNet Gallery here – to create an appropriate parent OSDisk.

VLAN Tagging

To set a VLAN ID on the virtual network adapter for a VM include this in the <NetworkAdapter> section either in the <Default> section to be used by all VMs or in each individual <VM> section…

<VLANID>x</VLANID>

…replacing x with the appropriate VLAN ID.

MAC Spoofing

To set MAC Spoofing on the virtual network adapter for a VM include this in the <NetworkAdapter> section either in the <Default> section to be used by all VMs or in each individual <VM> section.

<MACSAddresspoofing>True</MACAddressSpoofing>

Note that MAC Spoofing is required on any VM that is going to part of a network load balancer (NLB) configuration.

Autostop Settings

To configure the automatic stop action on a VM include this in the main section for <Default> or each individual <VM>, at the same level as <VMName>.

<Autostop>setting</AutoStop>

Valid values for “setting” are TurnOff, Save, and ShutDown with the default value being Save.

Guest Services

To enable guest services – the Windows Server 2012 R2 feature also known as “enhanced session mode” – include this in the main section for <Default> or each individual <VM>, at the same level as <VMName>.

<GuestServices>True</GuestServices>

There are several conditions for this to work correctly – the Hyper-V host must be running Windows Server 2012 R2, and Enhanced Session Mode must be enabled in Hyper-V Settings for the host.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Hay Rob great update. I have updated my xls with the new variables if anyone wants to see the list that is available and used. http://daveyrance.com/2014/02/pdt-2-6-released/

  • Information on how to create a Generation 2 parent Vhdx... http://www.systemcentercentral.com/deploying-generation-2-vms-with-powershell-deployment-toolkit-pdt/

  • Great Features! I would like to request an additional feature regarding the ability to set the CPU Migration Mode. Started running into this at a client.

    Here would be the sample code to add the Deployment-VMCreator.ps1 script, obviously also adding in the required code for the XML options:
    Set-VMProcessor -VMName $VMName -ComputerName $VMHost -CompatibilityForMigrationEnabled $true

  • This is tool is brilliant and has the same potential for System Center that MDT has done for OS deployments. As a simple lab setup it works however it is a challenge for complex configuration implementation.

    Has anyone used PDT to deploy in Production complex System Center configuration with Clustered Multi SQL Instance setup of System Center R2 based on the Microsoft Fast Track solution or similar?