Download marketplace items from Azure to Azure Stack
Applies to: Azure Stack integrated systems and Azure Stack Development Kit
As a cloud operator, download items from the Azure Marketplace and make them available in Azure Stack. The items you can choose are from a curated list of Azure Marketplace items that are pre-tested and supported to work with Azure Stack. Additional items are frequently added to this list, so continue to check back for new content.
There are two scenarios for connecting to the Azure Marketplace:
- A connected scenario - that requires your Azure Stack environment to be connected to the internet. You use the Azure Stack portal to locate and download items.
- A disconnected or partially connected scenario - that requires you to access the Internet using the marketplace syndication tool to download marketplace items. Then, you transfer your downloads to your disconnected Azure Stack installation. This scenario uses PowerShell.
See Azure Marketplace items for Azure Stack for a list of the marketplace items you can download.
If Azure Stack connects to the internet, you can use the admin portal to download marketplace items.
Your Azure Stack deployment must have internet connectivity, and be registered with Azure.
Use the portal to download marketplace items
Sign in to the Azure Stack administrator portal.
Review the available storage space before downloading marketplace items. Later, when you select items for download, you can compare the download size to your available storage capacity. If capacity is limited, consider options for managing available space.
To review available space, in Region management select the region you want to explore, and then go to Resource Providers > Storage.
Open the Azure Stack Marketplace and connect to Azure. To do so, select Marketplace management, and then select Add from Azure.
The portal displays the list of items available for download from the Azure Marketplace. You can click on each item to view its description and additional information about it, including its download size.
Select the item you want, and then select Download. Download times vary.
After the download completes, you can deploy the new marketplace item as either an Azure Stack operator or user.
To deploy the downloaded item, select +New, and then search among the categories for the new marketplace item. Next select the item to begin the deployment process. The process varies for different marketplace items.
Disconnected or a partially connected scenario
If Azure Stack is in a disconnected mode and without internet connectivity, you use PowerShell and the marketplace syndication tool to download the marketplace items to a machine with internet connectivity. You then transfer the items to your Azure Stack environment. In a disconnected environment, you can’t download marketplace items by using the Azure Stack portal.
The marketplace syndication tool can also be used in a connected scenario.
There are two parts to this scenario:
- Part 1: Download from Azure Marketplace. On the computer with internet access you configure PowerShell, download the syndication tool, and then download items form the Azure Marketplace.
- Part 2: Upload and publish to the Azure Stack Marketplace. You move the files you downloaded to your Azure Stack environment, import them to Azure Stack, and then publish them to the Azure Stack Marketplace.
Your Azure Stack deployment must be registered with Azure.
The computer that has internet connectivity must have Azure Stack PowerShell Module version 1.2.11 or higher. If not already present, install Azure Stack specific PowerShell modules.
To enable import of a downloaded marketplace item, the PowerShell environment for the Azure Stack operator must be configured.
You must have a storage account in Azure Stack that has a publicly accessible container (which is a storage blob). You use the container as temporary storage for the marketplace items gallery files. If you are not familiar with storage accounts and containers, see Work with blobs - Azure portal in the Azure documentation.
The marketplace syndication tool is downloaded during the first procedure.
Use the marketplace syndication tool to download marketplace items
On a computer with an Internet connection, open a PowerShell console as an administrator.
Add the Azure account that you have used to register Azure Stack. To add the account, in PowerShell run
Add-AzureRmAccountwithout any parameters. You are prompted to enter your Azure account credentials and you might have to use 2-factor authentication based on your account’s configuration.
If you have multiple subscriptions, run the following command to select the one you have used for registration:
Get-AzureRmSubscription -SubscriptionID '<Your Azure Subscription GUID>' | Select-AzureRmSubscription $AzureContext = Get-AzureRmContext
Download the latest version of the marketplace syndication tool by using the following script:
# Download the tools archive. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 invoke-webrequest https://github.com/Azure/AzureStack-Tools/archive/master.zip ` -OutFile master.zip # Expand the downloaded files. expand-archive master.zip ` -DestinationPath . ` -Force # Change to the tools directory. cd .\AzureStack-Tools-master
Import the syndication module and then launch the tool by running the following script. Replace the destination folder path with a location to store the files you download from the Azure Marketplace.
Import-Module .\Syndication\AzureStack.MarketplaceSyndication.psm1 Sync-AzSOfflineMarketplaceItem ` -destination "Destination folder path" ` -AzureTenantID $AzureContext.Tenant.TenantId ` -AzureSubscriptionId $AzureContext.Subscription.Id
When the tool runs, you are prompted to enter your Azure account credentials. Sign in to the Azure account that you have used to register Azure Stack. After the login succeeds, you should see a screen like the following image, with the list of available marketplace items.
Select the item that you want to download and make a note of the version. (You can hold the Ctrl key to select multiple images.) You'll reference the version when you import the item in the next procedure.
You can also filter the list of images by using the Add criteria option.
Select OK, and then review and accept the legal terms.
The time that the download takes depends on the size of the item. After the download completes, the item is available in the folder that you specified in the script. The download includes a VHD file (for virtual machines) or a .ZIP file (for virtual machine extensions). It also includes a gallery package in the .azpkg format. (A .azpkg package is a .zip file.)
Import the download and publish to Azure Stack Marketplace
The files for virtual machine images or solution templates that you have previously downloaded must be made locally available to your Azure Stack environment.
Use the admin portal to upload the marketplace item package (the .azpkg file) to Azure Stack Blob storage. Upload of the package makes it available to Azure Stack so you can later publish the item the Azure Stack Marketplace.
Upload requires you to have a storage account with a publicly accessible container (see the prerequisites for this scenario)
In the Azure Stack admin portal, go to More services > Storage accounts.
Select a storage account from your subscription, and then under BLOB SERVICE, select Containers.
Select the container you want to use and then select Upload to open the Upload blob pane.
On the Upload blob pane, browse to the files that you want to load into storage and then select Upload.
Files that you upload appear in the container pane. Select a file and then copy the URL from the Blob properties pane. You'll use this URL in the next step when you import the marketplace item to Azure Stack. In the following image, the container is blob-test-storage and the file is Microsoft.WindowsServer2016DatacenterServerCore-ARM.1.0.801.azpkg. The file URL is https://testblobstorage1.blob.local.azurestack.external/blob-test-storage/Microsoft.WindowsServer2016DatacenterServerCore-ARM.1.0.801.azpkg.
Import the VHD image to Azure Stack by using the Add-AzsPlatformimage cmdlet. When you use this cmdlet, replace the publisher, offer, and other parameter values with the values of the image that you are importing.
You can get the publisher, offer, and sku values of the image from the text file that downloads with the AZPKG file. The text file is stored in the destination location. The version value is the version noted when downloading the item from Azure in the previous procedure.
In the following example script, values for the Windows Server 2016 Datacenter - Server Core virtual machine are used. Replace URI_path with the path to the blob storage location for the item.
Add-AzsPlatformimage ` -publisher "MicrosoftWindowsServer" ` -offer "WindowsServer" ` -sku "2016-Datacenter-Server-Core" ` -osType Windows ` -Version "2016.127.20171215" ` -OsUri "URI_path"
About solution templates: Some templates can include a small 3 MB .VHD file with the name fixed3.vhd. You don't need to import that file to Azure Stack. Fixed3.vhd. This file is included with some solution templates to meet publishing requirements for the Azure Marketplace.
Review the templates description and download and then import additional requirements like VHDs that are required to work with the solution template.
About extensions: When you work with virtual machine image extensions, use the following parameters:
You do not use Offer for extensions.
Use PowerShell to publish the marketplace item to Azure Stack by using the Add-AzsGalleryItem cmdlet. For example:
Add-AzsGalleryItem ` -GalleryItemUri "https://mystorageaccount.blob.local.azurestack.external/cont1/Microsoft.WindowsServer2016DatacenterServerCore-ARM.1.0.801.azpkg" ` –Verbose
- After you publish a gallery item, you can view it from More services > Marketplace. If your download is a solution template, make sure you add any dependent VHD image for that solution template.
With the release of Azure Stack PowerShell 1.3.0 you can now add Virtual Machine Extensions.
Add-AzsVMExtension -Publisher "Microsoft" -Type "MicroExtension" -Version "0.1.0" -ComputeRole "IaaS" -SourceBlob "https://github.com/Microsoft/PowerShell-DSC-for-Linux/archive/v1.1.1-294.zip" -SupportMultipleExtensions -VmOsType "Linux"