Windows Azure Pack, Microsoft Azure, VConnect, Azure Connect

Deploy with Azure Resource Manager Templates from Windows Azure Pack

Provision Virtual Machines from Windows Azure Pack to Microsoft Azure Public cloud with ARM Templates

Step 1: Install VConnect for Windows Azure Pack. You can download a free trail by registering here.

Step 2: Add a Azure Connection to a Azure Subscription. Follow steps mentioned here to prepare and add your subscription to VConnect from WAP Admin Portal.

Step 3: Create a new Azure Resource Manager template that deploys a single Virtual Machine or download from Azure Quick Start templates here

In the ARM template:

- Configure dependent resources such as Storage Accounts, Public IP, VNets etc., to suit your needs

        - Parameterize values you like to change in future youself as an admin or if you may want to expose those to end users. 

All Parameters in ARM templates will be dynamically shown for administrators in VM Template creation wizard for further customization. Any parameters that the admin allows Tenant users to override will be shown to the end user in VM Creation Wizard.

Following is a sample template that ships with Azure Connect on VConnect: Show Hide

 

{

    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

    "contentVersion": "1.0.0.0",

    "parameters": {

        "vmName": { "type": "string" },

        "vmSize": {

            "type": "string",

            "defaultValue": "Standard_A1",

            "allowedValues": [

                "Basic_A0",

                "Basic_A1",

                "Basic_A2",

                "Basic_A3",

                "Basic_A4",

                "Standard_A0",

                "Standard_A1",

                "Standard_A2",

                "Standard_A3",

                "Standard_A4",

                "Standard_A5",

                "Standard_A6",

                "Standard_A7",

                "Standard_A8",

                "Standard_A9",

                "Standard_A10",

                "Standard_A11"

            ],

            "metadata": {

                "description": "Azure VM Sizes. If you dont see a size you want, please check with your administrator."

            }

        },

        "location": {

            "type": "string",

            "defaultValue": "West US",

            "allowedValues": [

                "East Asia",

                "Southeast Asia",

                "Central US",

                "East US",

                "East US 2",

                "West US",

                "North Central US",

                "South Central US",

                "North Europe",

                "West Europe",

                "Japan West",

                "Japan East",

                "Brazil South",

                "Australia East",

                "Australia Southeast",

                "Central India",

                "West India",

                "South India"

            ],

            "metadata": {

                "description": "Azure Locations. If you dont see a location you want, please check with your administrator."

            }

        },

        "storageAccountName": {

            "type": "string",

            "metadata": {

                "description": "Storage Account Name."

            }

        },

        "adminUsername": {

            "type": "string",

            "metadata": {

                "description": "Username for the Virtual Machine."

            }

        },

        "adminPassword": {

            "type": "securestring",

            "metadata": {

                "description": "Password for the Virtual Machine."

            }

        },

        "windowsOSVersion": {

            "type": "string",

            "defaultValue": "2012-R2-Datacenter",

            "allowedValues": [

                "2008-R2-SP1",

                "2012-Datacenter",

                "2012-R2-Datacenter",

                "2016-Technical-Preview-3-with-Containers",

                "Windows-Server-Technical-Preview"

            ],

            "metadata": {

                "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter."

            }

        }

    },

    "variables": {

        "imagePublisher": "MicrosoftWindowsServer",

        "imageOffer": "WindowsServer",

        "addressPrefix": "10.0.0.0/16",

        "subnetName": "Subnet",

        "subnetPrefix": "10.0.0.0/24",

        "storageAccountType": "Standard_LRS",

        "publicIPAddressType": "Dynamic",

        "vmStorageAccountContainerName": "vhds",

        "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",

        "nicName": "[concat('Nic', uniqueString(parameters('vmName'), resourceGroup().id))]",

        "publicIPAddressName": "[concat('PIP',parameters('vmName'), uniqueString(resourceGroup().id))]",

        "virtualNetworkName": "[concat('VNet',parameters('vmName'), uniqueString(resourceGroup().id))]",

        "dnsNameForPublicIP": "[concat('DNS',parameters('vmName'), uniqueString(resourceGroup().id))]",

        "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]"

    },

    "resources": [

        {

            "apiVersion": "2015-05-01-preview",

            "type": "Microsoft.Network/publicIPAddresses",

            "name": "[variables('publicIPAddressName')]",

            "location": "[parameters('location')]",

            "tags": {

                "displayName": "PublicIPAddress",

                "associatedVM": "[parameters('vmName')]"

            },

            "properties": {

                "publicIPAllocationMethod": "[variables('publicIPAddressType')]",

                "dnsSettings": {

                    "domainNameLabel": "[toLower(variables('dnsNameForPublicIP'))]"

                }

            }

        },

        {

            "apiVersion": "2015-05-01-preview",

            "type": "Microsoft.Network/virtualNetworks",

            "name": "[variables('virtualNetworkName')]",

            "location": "[parameters('location')]",

            "tags": {

                "displayName": "VirtualNetwork",

                "associatedVM": "[parameters('vmName')]"

            },

            "properties": {

                "addressSpace": {

                    "addressPrefixes": [

                        "[variables('addressPrefix')]"

                    ]

                },

                "subnets": [

                    {

                        "name": "[variables('subnetName')]",

                        "properties": {

                            "addressPrefix": "[variables('subnetPrefix')]"

                        }

                    }

                ]

            }

        },

        {

            "apiVersion": "2015-05-01-preview",

            "type": "Microsoft.Network/networkInterfaces",

            "name": "[variables('nicName')]",

            "location": "[parameters('location')]",

            "tags": {

                "displayName": "NetworkInterface",

                "associatedVM": "[parameters('vmName')]"

            },

            "dependsOn": [

                "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",

                "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"

            ],

            "properties": {

                "ipConfigurations": [

                    {

                        "name": "ipconfig1",

                        "properties": {

                            "privateIPAllocationMethod": "Dynamic",

                            "publicIPAddress": {

                                "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"

                            },

                            "subnet": {

                                "id": "[variables('subnetRef')]"

                            }

                        }

                    }

                ]

            }

        },

        {

            "apiVersion": "2015-05-01-preview",

            "type": "Microsoft.Compute/virtualMachines",

            "name": "[parameters('vmName')]",

            "location": "[parameters('location')]",

            "tags": {

                "displayName": "VirtualMachine"

            },

            "dependsOn": [

                "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"

            ],

            "properties": {

                "hardwareProfile": {

                    "vmSize": "[parameters('vmSize')]"

                },

                "osProfile": {

                    "computerName": "[parameters('vmName')]",

                    "adminUsername": "[parameters('adminUsername')]",

                    "adminPassword": "[parameters('adminPassword')]"

                },

                "storageProfile": {

                    "imageReference": {

                        "publisher": "[variables('imagePublisher')]",

                        "offer": "[variables('imageOffer')]",

                        "sku": "[parameters('windowsOSVersion')]",

                        "version": "latest"

                    },

                    "osDisk": {

                        "name": "osdisk",

                        "vhd": {

                            "uri": "[concat('http://',parameters('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',parameters('vmName'),'.vhd')]"

                        },

                        "caching": "ReadWrite",

                        "createOption": "FromImage"

                    }

                },

                "networkProfile": {

                    "networkInterfaces": [

                        {

                            "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"

                        }

                    ]

                }

            }

        }

    ]

}

 

Step 4: After customizing the ARM template, you can drop it in VConnect install location at "%systemdrive%:\inetpub\MgmtSvc-CloudAssert-VConnect\bin\ArmTemplates\"

Step 5: Create a VM Template and choose the ARM template

Step 6: Customize the Parameters and provide admin defaults

Step 7: Login from Tenant Portal as a tenant user and Create new VM from VConnect

Select the subscription and appropriate Connection in which you have created the VM Template in previous steps:

 If you have only one connection, you will not see a connection drop down, thats ok, click next to go to next step.

Choose a VM Template:

Input the values asked by the Wizard and click ok:

These are the parameters defined both in ARM Templates, which was later customized by administrator via VM Template creation process from WAP admin portal. Tenant users only sees the parameters that the administrator has allowed for end users to override.