Share via


Downloading and Installing Windows Azure Pack Gallery Resource

Overview

Windows Azure Pack Gallery Resources allows us to provide offerings to tenants using standard and reusable artifacts. This guide provides procedures for obtaining new Gallery Resources and for installing them in our hosting environment. We will require the ReadMe file that ships with each Gallery Item to complete this procedure. This file includes the values specific to that particular item.

Prerequisites

Cloud Capabilities

Virtual Machine Roles do not have the ability to specify a capability profile that they are capable with.  As a result, we cannot deploy a Gallery Item on a cloud that has any cloud capability profiles defined.

Hyper-V Clusters

If we are deploying the Virtual Machine Role to a cloud that includes a Hyper-V cluster, then the cloud must have a custom property called CreateHighlyAvailableVmRoles with its value set to true in order for the virtual machines to be configured as highly available.

We can use the following procedure to add this custom property.

  1. In VMM, right-click the cloud and select Properties.
  2. Select the Custom Properties tab.
  3. Click Manage Custom Properties.
  4. Select Cloud for Object Type.
  5. Click Create to create a new property**.**
  6. Name the property CreateHighlyAvailableVmRoles.
  7. Select the new property and click Add.
  8. Click OK.
  9. Type true for the property value.
  10. Click OK.

Instead of the manual steps, we can use the following Windows PowerShell commands to create the custom property.

$customProperty  = New-SCCustomProperty -Name "CreateHighlyAvailableVmRoles"  -Description "Create Highly Available Virtual Machine Roles" -AddMember @("Cloud") 
$cloud = Get-SCCloud –Name "CloudName"
 Set-SCCustomPropertyValue -CustomProperty $customProperty -InputObject $cloud -Value "true"

Back to top

Install the Web Platform Installer

Windows Azure Pack Gallery Resources can be downloaded with the Microsoft Web Platform Installer. We must download and install this free tool to obtain new Gallery Resources.

Add the Service Model feed

  1. Start the Web Platform Installer.

  2. Click the Options link at the bottom of the window.

  3. Enter following link into the Custom Feeds text box.

    http://www.microsoft.com/web/webpi/partners/servicemodels.xml

  4. Click the Add Feed button.

  5. Click OK.

  6. A Service Models option should appear at the top of the window.

  1. Start the Web Platform Installer.
  2. Select the Service Models tab.
  3. Select Gallery Resources in the left pane.
  4. Select one or more resources that you want and click Add.
  5. Click Install.
  6. Accept the license terms.
  7. Click Continue.
  8. A window will be opened for the folder on the local computer where the Gallery Resource has been downloaded.

Download and Install Payload

Back to top

The Resource Extension for some Gallery Resources will require additional software to be added to the package prior to installation. The Readme file that accompanies the Gallery Resource will specify whether additional software is required, the procedure for obtaining it, and where it should be located when the Gallery Resource is installed.

Import Resource Extension Package

We use Windows PowerShell to import the Resource Extension Package into Virtual Machine Manager. There is currently no user interface to support this process.

Not all Gallery Resources use a Resource Extension, so make sure to review the Packages section in the Readme file before we proceed with this section.

The following Windows PowerShell sample shows how to install a Resource Extension Package named MyVMRole.resextpkg. This assumes a library share named MSSCVMMLibrary.

The following cmdlets are part of the Virtual Machine Manager PowerShell Module.

$libraryShare = Get-SCLibraryShare | Where-Object {$_.Name -eq 'MSSCVMMLibrary'} 
$resextpkg = $Env:SystemDrive + "\GalleryResources\My-VMRole-Pkg\MyVMRole.resextpkg"
Import-CloudResourceExtension –ResourceExtensionPath $resextpkg -SharePath $libraryShare -AllowUnencryptedTransfer

Verify that the import completed successfully with the following Windows PowerShell cmdlet.

Get-CloudResourceExtension

Prepare the virtual hard disks

Back to top

Each Virtual Machine Role Gallery Item requires an operating system virtual hard disk installed with the operating system and other software specified in the Gallery Item’s Readme file. The installation must be prepared with Sysprep and added to a VMM library share. The Readme file may also specify other requirements for the contents of this disk and will also specify whether a data virtual hard disk is required.

Virtual Hard Disk Properties

The properties in the following sections must be set on the Virtual Hard Disk in order to properly identify it to the Gallery Item.  The Readme file for the Gallery Item will include requirements for each of these properties for both the operating system disk and any required data disks.

Operating System

The Operating System property on the operating system disk specifies which operating system is installed on the virtual hard disk.  For data disks, the Operating System value must always be set to None.

We can set this property using either the Virtual Machine Manager Administrator console or using Windows PowerShell. The following Windows PowerShell sample shows how to set the Operating System property to “64-bit edition of Windows Server 2012 Datacenter” for a virtual hard disk named MyVirtualHardDisk. We should replace this value with one of the values specified in the Readme file.

$myVHD = Get-SCVirtualHardDisk | where {$_.Name –eq 'MyVirtualHardDisk.vhd'} 
$WS2012Datacenter = Get-SCOperatingSystem | where { $_.name –eq '64-bit edition of Windows Server 2012 Datacenter' } 
Set-scvirtualharddisk –virtualharddisk $myVHD –OperatingSystem $WS2012Datacenter

Family Name and Release

Back to top

The Familyname and Release properties of the virtual hard disk must be set in order for the Windows Azure Pack portal to display the virtual hard disk as an available disk for this Gallery Resource. These values are shown in the portal drop-down list.

Familyname property values should indicate the contents of the virtual hard disk, including the Windows Server release and edition. The Readme file of the Gallery Resource should include appropriate Familyname values.

Release property values must conform to the Windows Azure versioning scheme of n.n.n.n. Examples include 1.0.0.0 and 1.0.0.1.

You can set this property using either the Virtual Machine Manager Administrator console or using Windows PowerShell. The following Windows PowerShell sample shows how to set the Family Name property to “Windows Server 2012 Datacenter” and the Release property to “1.0.0.0” for a virtual hard disk named MyVirtualHardDisk. We should replace this value with one of the values specified in the Readme file.

$myVHD = Get-SCVirtualHardDisk | where {$_.Name –eq 'MyVirtualHardDisk.vhd'} 
$familyName = "Windows Server 2012 DataCenter"
$release = "1.0.0.0"
Set-scvirtualharddisk –virtualharddisk $myVHD –FamilyName $familyName –Release $release

Tags

Virtual Machine Role Gallery Items specify tags that must be included on an operating system disk for it to be available as an option when a user provisions the virtual machine. The Readme file of the gallery resource should include the tags that it requires.  Gallery items may optionally specify tags that are required on data disks, but the data disk may not require any tags.

Windows PowerShell is required to set this property. The following Windows PowerShell sample shows how to set the tag “WindowsServer2012R1” on a virtual hard disk named MyVirtualHardDisk. We should replace this value with one of the values specified in the Readme file.

$myVHD = Get-SCVirtualHardDisk | where {$_.Name –eq 'MyVirtualHardDisk.vhd'} 
$tags = $myVHD.Tag 
if ( $tags -cnotcontains "WindowsServer2012R1" ) { $tags += @("WindowsServer2012R1") } 
Set-scvirtualharddisk –virtualharddisk $myVHD –Tag $tags

Import Resource Definition Package

Back to top

Once we have imported the Resource Extension and configured the Virtual Hard Disk in VMM, we can import the Resource Definition package and publish the gallery item using the Service Administrator Portal in Windows Azure Pack. At the completion of these steps, the gallery item will be available to the tenant.

Import Resource Definition Package

The Gallery Resource will include one or more Resource Definition Package files. If it includes more than one, then the ReadMe file will specify the different configuration that each one will provide.

  1. Open the Service Admin Portal.
  2. Navigate to the VM Clouds workspace.
  3. Click the Gallery tab.
  4. Click Import.
  5. Select and import the Resource Definition Package file for the gallery item. This will be the file with the extension resdefpkg.
  6. The gallery item should now be listed on the Gallery tab.
  1. On the Gallery tab, select the version of the gallery item that we just imported.
  2. Click the arrow next to the gallery item name.
  3. Verify the details of the gallery item.
  4. Navigate back and click Make Public.
  5. Select the Plans workspace in the Service Admin Portal.
  6. Select the plan to which we want to add this gallery item.
  7. Select the Virtual Machine Clouds service.
  8. Scroll to the Gallery section.
  9. Click Add Gallery Items.
  10. Select the gallery items that we imported, and then click Save.
  11. The Virtual Machine Role is now available to the tenant as part of the selected plan.

See Also

Back to top