Cloud Computing, Virtualization & Datacenter

Microsoft Azure Stack – Deploying your own images as a tenant

As a tenant you may want to deploy your own images instead of using the images provided by the cloud service provider. All you need to achieve your objective in Azure Stack is a sysprepped Windows Server or Linux image, an ARM template and a PowerShell script.

The first step is to prepare the ARM template. I am using two files for the ARM template the general template file and the parameter template file.

In the general template file we have to add a new parameter called osDiskVhdUri.

In the resources section we have to modify the virtual machine resource and there the value for the uri under image in the storageProfile property. When we are using Linux instead of Windows then we have to modify the osType also. Otherwise the deployment will fail.

Our first step is the authentication against our Azure Stack environment and the selection of the right subscription. Then we read the parameter file and save the values into a variable. At the next steps we are creating the resource group and the storage account.