Home / Cloud / Windows Azure Pack / Deploy Gen2 VM through VM Role in WAP UR6

Deploy Gen2 VM through VM Role in WAP UR6

The Windows Azure Pack Update Rollup 6 has been released today. After upgrading my lab, it’s time to try some new VM Clouds features. So in this topic, I’m going to talk about Gen2 VM deployment though VM Role. Before playing with this new feature, I have updated Virtual Machine Manager, Service Provider Foundation and Windows Azure Pack to Update Rollup 6. You can find Update Rollup 6 for System Center here.

Create Gen 2 VM though VM Role

Since Update Rollup 6 of Windows Azure Pack, it is possible to deploy Gen2 virtual machines through VM Roles. So in the first place I set my VHDX syspreped from a Gen2 virtual machine. For that I run the below PowerShell script. This script set the Family Name, the tags, the release version, the product key and the Operating System on the VHDX located in the VMM library.

$LibraryServers = "library.home.net"
$VHDName = "Gen2-W2012R2"
$FamilyName = "Windows Server 2012 Datacenter"
$Release = "1.0.0.0"
$Tags = "WindowsServer2012"
$AVMAKey = "Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW"
$MyVHDX = Get-SCVirtualHardDisk | where {$_.Name –eq $VHDName}
$2K12DC = Get-SCOperatingSystem | where { $_.name –eq '64-bit edition of Windows Server 2012 Datacenter'}
Foreach ($Library in $LibraryServers){
    $MyVHDX = Get-SCVirtualHardDisk | where {($_.Name –eq $VHDName) -and ($_.LibraryServer -contains $Library)}
    $oTags = $myVHDX.Tag
    if ( $otags -cnotcontains $Tags ) { $otags += @($Tags) }
    Set-scvirtualharddisk –virtualharddisk $MyVHDX `
                          –OperatingSystem $2K12DC `
                          -FamilyName $FamilyName `
                          -Release $Release `
                          -Tag $oTags `
                          -ProductKey $AVMAKey
}

Then we have to configure a Custom “Cloud” Properties in order to enable the support of Gen2 VM though VM Role. So edit a Cloud from VMM console and select Custom Properties. Then click on Add. On the next window, select Cloud Object Type and click on create. Specify SupportedVMGenerationForVMRole as Name and specify a description. When you have clicked on ok, select your new property and click on Add.

To finish with the Cloud configuration, specify the value 2 on the SupportedVMGenerationForVmRole property.

Next, open the Windows Azure Pack tenant portal, and create a new VM Role. Now you should be able to select your Gen2 VHDX in Operating System Disk menu.

When the VM Role provisioning is finished, you should have a VM in Gen2 J.

About Romain Serre

Romain Serre works in Lyon as a Senior Consultant. He is focused on Microsoft Technology, especially on Hyper-V, System Center, Storage, networking and Cloud OS technology as Microsoft Azure or Azure Stack. He is a MVP and he is certified Microsoft Certified Solution Expert (MCSE Server Infrastructure & Private Cloud), on Hyper-V and on Microsoft Azure (Implementing a Microsoft Azure Solution).

One comment

  1. Hi,

    This info is really great!. I also wanted to know the following :-
    1. how to deploy gen2 linux vm’s from WAP ==> with above setting the vm gets deployed but Decure boot gets enabled !
    2. Is there a way to find the list of the Custom properties i can configure on SCVMM Cloud ?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

*

x

Check Also

Configure 5-Nine Cloud Security for Windows Azure Pack

5-Nine Cloud Security is a security solution for Microsoft Cloud OS and Hyper-V. This solution ...

Implement 5-Nine Cloud Security 5.1 in Windows Azure Pack

5-Nine Cloud Security is a security solution for Microsoft Cloud OS and Hyper-V. This solution ...

Windows Azure Pack – Authenticate tenants with AD FS

By default, Windows Azure Pack provides an Authentication site for tenants. This authentication site can ...