A while back I wrote a blog post about being able to take one IaaS VM Azure Resource Manager (ARM) template and deploy it to both Azure or Azure Stack. This blog post included a JSON file and the PowerShell to do this. The idea for that came from needing to set up a cool and working demo for MMS 2016 and the need to showcase the power of Microsoft’s HybridCloud. Here is a link to that original blog post:
Today I have finished updating the PowerShell and ARM template/JSON file to be more streamlined and to work with TP2. Here is the link to download these:Here are the updates:
https://gallery.technet.microsoft.com/Create-VM-on-Azure-or-3c6d0420
Here are the updates:
- The JSON and PowerShell script have been modified to work with Azure Stack TP2.
- This script now utilizes the connection PowerShell module AzureStack.Connect.psm1 from Azure Stack tools.
- This is included with the download of this script and JSON file on TechNet Gallery.
- The script is hard coded to look locally to import the AzureStack.Connect.psm1 module.
- Streamlined the JSON file and PowerShell script.
- The script no longer prompts for the publicDNS name. It is now automatically set to the same as the vmname.
- The script no longer prompts for the storage account name. It is automatically set to vmnamestorage.
- The script no longer prompts for the resourcegroup name. This is now automatically set to vmname-RG.
- By default this script now uses a JSON file hosted on Github. This is set in the $templateFilePath variable as shown on the next line.
- To keep it to the local directory just use the JSON file name.
GITHUB: $templateFilePath = “https://raw.githubusercontent.com/Buchatech/Azure-AzureStackVM/master/AzureandAzureStack.json”
LOCAL: $templateFilePath = “AzureandAzureStack.json“
This will be my last blog post of 2016. See you next year folks…..
Happy Stacking!