This template allows you to create a new Virtual Machine from a custom image on a new storage account deployed together with the storage account, which means the source image VHD must be transferred to the newly created storage account before that Virtual Machine is deployed. This is accomplished by the usage of a transfer virtual machine that is deployed and then uses a script via custom script extension to copy the source VHD to the destination storage account.
This Azure Resource Manager (ARM) template was created by a member of the community and not by Microsoft. Each ARM template is licensed to you under a licence agreement by its owner, not Microsoft. Microsoft is not responsible for ARM templates provided and licensed by community members and does not screen for security, compatibility or performance. Community ARM templates are not supported under any Microsoft support programme or service and are made available AS IS without warranty of any kind.
|transferVmName||Name of the Windows VM that will perform the copy of the VHD from a source storage account to the new storage account created in the new deployment, this is known as transfer vm.|
|vmSize||VM size of new virtual machine that will be deployed from a custom image.|
|newVmName||Name of the new VM deployed from the custom image.|
|adminUsername||Name of the local administrator account, this cannot be Admin, Administrator or root.|
|adminPassword||Local administrator password, complex password is required, do not use any variation of the password word because it will be rejected.|
|sourceStorageAccountResourceGroup||Resource group name of the source storage account.|
|sourceImageURI||Full URIs for one or more custom images (VHDs) that should be copied to the deployment storage account to spin up new VMs from them. URLs must be comma separated.|
|customImageName||Name of the VHD to be used as source syspreped/generalized image to deploy the VM. E.g. mybaseimage.vhd.|
|_artifactsLocation||The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated.|
|_artifactsLocationSasToken||The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated.|
|location||Location for all resources.|
Use the template
New-AzureRmResourceGroupDeployment -Name <deployment-name> -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/201-vm-custom-image-new-storage-account/azuredeploy.jsonInstall and configure Azure PowerShell
azure config mode arm azure group deployment create <my-resource-group> <my-deployment-name> --template-uri https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/201-vm-custom-image-new-storage-account/azuredeploy.jsonInstall and Configure the Azure Cross-Platform Command-Line Interface