Wednesday, May 8, 2013

VMM 2012 SP1 VM Template - Region Settings revert back to en-US

I thought I would share a common problem that is experienced when configuring Regional Settings on a VM template.

Here is the scenario:
You build your VM with your required OS and make the required customisations for your environment. In most cases (unless you are in the US) this would require changing the Regional Settings. Once you are happy you run the sysprep oobe - generalize and shutdown the VM ready to be moved to the library.

You generate the VMM template from the VM in your library. You run your first test a realise that all the Regional setting have been changed back to English US.

During the above process the regional settings is reverted back to 'en-US'. This functionality is acknowledged in this MS KB article:

To configure the proper regional settings for your template you can run a number of PowerShell cmdlets that will update the unattend settings (specifically oobeSystem/Microsoft-Windows-International-Core/UserLocale).

For Australia I generally need to configure the User Locale to 'en-AU' (English-Australia) and the keyboard to 'en-AU' also.

To do this I run the following PowerShell cmdlets (no need to change SystemLocale or UILanguage for Australia region settings):

$template = Get-SCVMtemplate | where {$_.Name -eq "Template - Windows Server 2008 R2 SP1 Enterprise"}
$settings = $template.UnattendSettings;
Set-SCVMTemplate -VMTemplate $template -UnattendSettings $settings

The above PowerShell commands can be modified for your region.

No comments:

Post a Comment