Add 2 template sets
This commit is contained in:
Родитель
b885f8dc83
Коммит
a92fd009e7
|
@ -0,0 +1,18 @@
|
|||
# Create a Virtual Machine from a Linux Image with Empty Data Disk
|
||||
|
||||
<a href="https://azuredeploy.net/" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
|
||||
This template allows creates a Linux VM with empty data disk
|
||||
|
||||
In the parameters file:
|
||||
|
||||
"vmDiagnosticsStorageAccountResourceGroup":{
|
||||
"value" : "diagnosticsResourceGroup"
|
||||
},
|
||||
"vmDiagnosticsStorageAccountName":{
|
||||
"value" : "diagnosticsStorageAccount"
|
||||
},
|
||||
|
||||
the specified diagnostics storage account must be created in the specified diagnostics resource group.
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"newStorageAccountName" : {
|
||||
"value":"uniqueStorageAccountName"
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": ""
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": ""
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"value": "myDNSname"
|
||||
},
|
||||
"imagePublisher" : {
|
||||
"value" : "Canonical"
|
||||
},
|
||||
"imageOffer" : {
|
||||
"value" : "UbuntuServer"
|
||||
},
|
||||
"imageSKU" : {
|
||||
"value" : "14.04.0-LTS"
|
||||
},
|
||||
"location": {
|
||||
"value": "West US"
|
||||
},
|
||||
"virtualNetworkName": {
|
||||
"value": "myVNET"
|
||||
},
|
||||
"vmSize": {
|
||||
"value": "Standard_A1"
|
||||
},
|
||||
"vmName" : {
|
||||
"value" : "myVM"
|
||||
},
|
||||
"publicIPAddressName" : {
|
||||
"value" : "myPublicIP"
|
||||
},
|
||||
"nicName" : {
|
||||
"value" : "myNic"
|
||||
},
|
||||
"vmExtensionName" : {
|
||||
"value" : "myExtension"
|
||||
},
|
||||
"vmDiagnosticsStorageAccountResourceGroup":{
|
||||
"value" : "diagnosticsResourceGroup"
|
||||
},
|
||||
"vmDiagnosticsStorageAccountName":{
|
||||
"value" : "diagnosticsStorageAccount"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,269 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters" : {
|
||||
"newStorageAccountName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Name of storage account"
|
||||
}
|
||||
},
|
||||
"dnsNameForPublicIP" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "DNS name for Public IP"
|
||||
}
|
||||
},
|
||||
"adminUserName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Admin username"
|
||||
}
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"Description": "Admin Password"
|
||||
}
|
||||
},
|
||||
"imagePublisher" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the Publisher of Image"
|
||||
}
|
||||
},
|
||||
"imageOffer" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the Offer of the image"
|
||||
}
|
||||
},
|
||||
"imageSKU" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the SKU of the image"
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"type": "String",
|
||||
"defaultValue" : "West US",
|
||||
"metadata": {
|
||||
"Description": "Deployment location"
|
||||
}
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_A1",
|
||||
"metadata": {
|
||||
"Description": "Size of the VM"
|
||||
}
|
||||
},
|
||||
"publicIPAddressName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the Public IP address"
|
||||
}
|
||||
},
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the my VM"
|
||||
}
|
||||
},
|
||||
"virtualNetworkName":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the VNET"
|
||||
}
|
||||
},
|
||||
"nicName":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the NIC"
|
||||
}
|
||||
},
|
||||
"vmExtensionName":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the VM Extension"
|
||||
}
|
||||
},
|
||||
"vmDiagnosticsStorageAccountResourceGroup":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the VM Diagnostics Storage Account"
|
||||
}
|
||||
},
|
||||
"vmDiagnosticsStorageAccountName":{
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"addressPrefix":"10.0.0.0/16",
|
||||
"subnet1Name": "Subnet-1",
|
||||
"subnet2Name": "Subnet-2",
|
||||
"subnet1Prefix" : "10.0.0.0/24",
|
||||
"subnet2Prefix" : "10.0.1.0/24",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"publicIPAddressType" : "Dynamic",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vnetID":"[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]",
|
||||
"subnet1Ref" : "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
|
||||
"dataDisk1VhdName" : "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',parameters('vmName'),'dataDisk1.vhd')]",
|
||||
"accountid": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',parameters('vmDiagnosticsStorageAccountResourceGroup'),'/providers/','Microsoft.Storage/storageAccounts/', parameters('vmDiagnosticsStorageAccountName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[parameters('newStorageAccountName')]",
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[parameters('publicIPAddressName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[parameters('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[parameters('virtualNetworkName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnet1Name')]",
|
||||
"properties" : {
|
||||
"addressPrefix": "[variables('subnet1Prefix')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('subnet2Name')]",
|
||||
"properties" : {
|
||||
"addressPrefix": "[variables('subnet2Prefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[parameters('nicName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnet1Ref')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computername": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher" : "[parameters('imagePublisher')]",
|
||||
"offer" : "[parameters('imageOffer')]",
|
||||
"sku" : "[parameters('imageSKU')]",
|
||||
"version" : "latest"
|
||||
},
|
||||
"osDisk" : {
|
||||
"name" : "osDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/vhds/','osdisk.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks" : [
|
||||
{
|
||||
"name" : "datadisk1",
|
||||
"diskSizeGB" : "100",
|
||||
"lun" : 0,
|
||||
"vhd":{
|
||||
"Uri" : "[variables('dataDisk1VhdName')]"
|
||||
},
|
||||
"createOption" : "Empty"
|
||||
}
|
||||
],
|
||||
"destinationVhdsContainer" : "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/')]"
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces" : [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', parameters('vmExtensionName'))]",
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Diagnostics",
|
||||
"type": "IaaSDiagnostics",
|
||||
"typeHandlerVersion": "1.2",
|
||||
"settings": {
|
||||
"xmlCfg":"PFdhZENmZz4NCiAgICAgICAgPERpYWdub3N0aWNNb25pdG9yQ29uZmlndXJhdGlvbiBvdmVyYWxsUXVvdGFJbk1CPSIyNTAwMCI+DQogICAgICAgIDxQZXJmb3JtYW5jZUNvdW50ZXJzIHNjaGVkdWxlZFRyYW5zZmVyUGVyaW9kPSJQVDFNIj4NCiAgICAgICAgICAgIDxQZXJmb3JtYW5jZUNvdW50ZXJDb25maWd1cmF0aW9uIGNvdW50ZXJTcGVjaWZpZXI9IlxQcm9jZXNzb3IoX1RvdGFsKVwlIFByb2Nlc3NvciBUaW1lIiBzYW1wbGVSYXRlPSJQVDFNIiB1bml0PSJwZXJjZW50IiAvPg0KICAgICAgICAgICAgPFBlcmZvcm1hbmNlQ291bnRlckNvbmZpZ3VyYXRpb24gY291bnRlclNwZWNpZmllcj0iXE1lbW9yeVxDb21taXR0ZWQgQnl0ZXMiIHNhbXBsZVJhdGU9IlBUMU0iIHVuaXQ9ImJ5dGVzIi8+DQogICAgICAgICAgICA8L1BlcmZvcm1hbmNlQ291bnRlcnM+DQogICAgICAgICAgICA8RXR3UHJvdmlkZXJzPg0KICAgICAgICAgICAgICAgIDxFdHdFdmVudFNvdXJjZVByb3ZpZGVyQ29uZmlndXJhdGlvbiBwcm92aWRlcj0iU2FtcGxlRXZlbnRTb3VyY2VXcml0ZXIiIHNjaGVkdWxlZFRyYW5zZmVyUGVyaW9kPSJQVDVNIj4NCiAgICAgICAgICAgICAgICAgICAgPEV2ZW50IGlkPSIxIiBldmVudERlc3RpbmF0aW9uPSJFbnVtc1RhYmxlIi8+DQogICAgICAgICAgICAgICAgICAgIDxFdmVudCBpZD0iMiIgZXZlbnREZXN0aW5hdGlvbj0iTWVzc2FnZVRhYmxlIi8+DQogICAgICAgICAgICAgICAgICAgIDxFdmVudCBpZD0iMyIgZXZlbnREZXN0aW5hdGlvbj0iU2V0T3RoZXJUYWJsZSIvPg0KICAgICAgICAgICAgICAgICAgICA8RXZlbnQgaWQ9IjQiIGV2ZW50RGVzdGluYXRpb249IkhpZ2hGcmVxVGFibGUiLz4NCiAgICAgICAgICAgICAgICAgICAgPERlZmF1bHRFdmVudHMgZXZlbnREZXN0aW5hdGlvbj0iRGVmYXVsdFRhYmxlIiAvPg0KICAgICAgICAgICAgICAgIDwvRXR3RXZlbnRTb3VyY2VQcm92aWRlckNvbmZpZ3VyYXRpb24+DQogICAgICAgICAgICA8L0V0d1Byb3ZpZGVycz4NCiAgICAgICAgPC9EaWFnbm9zdGljTW9uaXRvckNvbmZpZ3VyYXRpb24+DQogICAgPC9XYWRDZmc+",
|
||||
"StorageAccount":"[parameters('vmDiagnosticsStorageAccountName')]"
|
||||
},
|
||||
"protectedSettings": {
|
||||
"storageAccountName": "[parameters('vmDiagnosticsStorageAccountName')]",
|
||||
"storageAccountKey": "[listKeys(variables('accountid'),'2014-12-01-preview').key1]",
|
||||
"storageAccountEndPoint": "https://core.windows.net/"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"itemDisplayName": "Create a VM from a Linux Image with Empty Data Disk",
|
||||
"description": "This template allows creates a Linux VM with empty data disk",
|
||||
"summary": "Create a VM from a Linux Image with Empty Data Disk",
|
||||
"githubUsername": "kenazk",
|
||||
"dateUpdated": "2015-04-04"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
# Create a Virtual Machine from a Windows Image with Empty Data Disk
|
||||
|
||||
<a href="https://azuredeploy.net/" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
|
||||
This template allows creates a Windows VM with empty data disk
|
||||
|
||||
In the parameters file:
|
||||
|
||||
"vmDiagnosticsStorageAccountResourceGroup":{
|
||||
"value" : "diagnosticsResourceGroup"
|
||||
},
|
||||
"vmDiagnosticsStorageAccountName":{
|
||||
"value" : "diagnosticsStorageAccount"
|
||||
},
|
||||
|
||||
the specified diagnostics storage account must be created in the specified diagnostics resource group.
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"newStorageAccountName" : {
|
||||
"value":"uniqueStorageAccountName"
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": ""
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": ""
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"value": "myDNSname"
|
||||
},
|
||||
"imagePublisher" : {
|
||||
"value" : "MicrosoftWindowsServer"
|
||||
},
|
||||
"imageOffer" : {
|
||||
"value" : "WindowsServer"
|
||||
},
|
||||
"imageSKU" : {
|
||||
"value" : "2012-Datacenter"
|
||||
},
|
||||
"location": {
|
||||
"value": "West US"
|
||||
},
|
||||
"virtualNetworkName": {
|
||||
"value": "myVNET"
|
||||
},
|
||||
"vmSize": {
|
||||
"value": "Standard_A1"
|
||||
},
|
||||
"vmName" : {
|
||||
"value" : "myVM"
|
||||
},
|
||||
"publicIPAddressName" : {
|
||||
"value" : "myPublicIP"
|
||||
},
|
||||
"nicName" : {
|
||||
"value" : "myNic"
|
||||
},
|
||||
"vmExtensionName" : {
|
||||
"value" : "myExtension"
|
||||
},
|
||||
"vmDiagnosticsStorageAccountResourceGroup":{
|
||||
"value" : "diagnosticsResourceGroup"
|
||||
},
|
||||
"vmDiagnosticsStorageAccountName":{
|
||||
"value" : "diagnosticsStorageAccount"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,269 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters" : {
|
||||
"newStorageAccountName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Name of storage account"
|
||||
}
|
||||
},
|
||||
"dnsNameForPublicIP" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "DNS name for Public IP"
|
||||
}
|
||||
},
|
||||
"adminUserName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Admin username"
|
||||
}
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"Description": "Admin Password"
|
||||
}
|
||||
},
|
||||
"imagePublisher" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the Publisher of Image"
|
||||
}
|
||||
},
|
||||
"imageOffer" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the Offer of the image"
|
||||
}
|
||||
},
|
||||
"imageSKU" : {
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the SKU of the image"
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"type": "String",
|
||||
"defaultValue" : "West US",
|
||||
"metadata": {
|
||||
"Description": "Deployment location"
|
||||
}
|
||||
},
|
||||
"vmSize": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_A1",
|
||||
"metadata": {
|
||||
"Description": "Size of the VM"
|
||||
}
|
||||
},
|
||||
"publicIPAddressName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the Public IP address"
|
||||
}
|
||||
},
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the my VM"
|
||||
}
|
||||
},
|
||||
"virtualNetworkName":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the VNET"
|
||||
}
|
||||
},
|
||||
"nicName":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the NIC"
|
||||
}
|
||||
},
|
||||
"vmExtensionName":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the VM Extension"
|
||||
}
|
||||
},
|
||||
"vmDiagnosticsStorageAccountResourceGroup":{
|
||||
"type" : "string",
|
||||
"metadata": {
|
||||
"Description": "Name of the VM Diagnostics Storage Account"
|
||||
}
|
||||
},
|
||||
"vmDiagnosticsStorageAccountName":{
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"addressPrefix":"10.0.0.0/16",
|
||||
"subnet1Name": "Subnet-1",
|
||||
"subnet2Name": "Subnet-2",
|
||||
"subnet1Prefix" : "10.0.0.0/24",
|
||||
"subnet2Prefix" : "10.0.1.0/24",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"publicIPAddressType" : "Dynamic",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vnetID":"[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]",
|
||||
"subnet1Ref" : "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
|
||||
"dataDisk1VhdName" : "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',parameters('vmName'),'dataDisk1.vhd')]",
|
||||
"accountid": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',parameters('vmDiagnosticsStorageAccountResourceGroup'),'/providers/','Microsoft.Storage/storageAccounts/', parameters('vmDiagnosticsStorageAccountName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[parameters('newStorageAccountName')]",
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[parameters('publicIPAddressName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[parameters('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[parameters('virtualNetworkName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnet1Name')]",
|
||||
"properties" : {
|
||||
"addressPrefix": "[variables('subnet1Prefix')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('subnet2Name')]",
|
||||
"properties" : {
|
||||
"addressPrefix": "[variables('subnet2Prefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[parameters('nicName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnet1Ref')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[parameters('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computername": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher" : "[parameters('imagePublisher')]",
|
||||
"offer" : "[parameters('imageOffer')]",
|
||||
"sku" : "[parameters('imageSKU')]",
|
||||
"version" : "latest"
|
||||
},
|
||||
"osDisk" : {
|
||||
"name" : "osDisk",
|
||||
"vhd": {
|
||||
"uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/vhds/','osdisk.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks" : [
|
||||
{
|
||||
"name" : "datadisk1",
|
||||
"diskSizeGB" : "100",
|
||||
"lun" : 0,
|
||||
"vhd":{
|
||||
"Uri" : "[variables('dataDisk1VhdName')]"
|
||||
},
|
||||
"createOption" : "Empty"
|
||||
}
|
||||
],
|
||||
"destinationVhdsContainer" : "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/')]"
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces" : [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', parameters('vmExtensionName'))]",
|
||||
"apiVersion": "2014-12-01-preview",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Diagnostics",
|
||||
"type": "IaaSDiagnostics",
|
||||
"typeHandlerVersion": "1.2",
|
||||
"settings": {
|
||||
"xmlCfg":"PFdhZENmZz4NCiAgICAgICAgPERpYWdub3N0aWNNb25pdG9yQ29uZmlndXJhdGlvbiBvdmVyYWxsUXVvdGFJbk1CPSIyNTAwMCI+DQogICAgICAgIDxQZXJmb3JtYW5jZUNvdW50ZXJzIHNjaGVkdWxlZFRyYW5zZmVyUGVyaW9kPSJQVDFNIj4NCiAgICAgICAgICAgIDxQZXJmb3JtYW5jZUNvdW50ZXJDb25maWd1cmF0aW9uIGNvdW50ZXJTcGVjaWZpZXI9IlxQcm9jZXNzb3IoX1RvdGFsKVwlIFByb2Nlc3NvciBUaW1lIiBzYW1wbGVSYXRlPSJQVDFNIiB1bml0PSJwZXJjZW50IiAvPg0KICAgICAgICAgICAgPFBlcmZvcm1hbmNlQ291bnRlckNvbmZpZ3VyYXRpb24gY291bnRlclNwZWNpZmllcj0iXE1lbW9yeVxDb21taXR0ZWQgQnl0ZXMiIHNhbXBsZVJhdGU9IlBUMU0iIHVuaXQ9ImJ5dGVzIi8+DQogICAgICAgICAgICA8L1BlcmZvcm1hbmNlQ291bnRlcnM+DQogICAgICAgICAgICA8RXR3UHJvdmlkZXJzPg0KICAgICAgICAgICAgICAgIDxFdHdFdmVudFNvdXJjZVByb3ZpZGVyQ29uZmlndXJhdGlvbiBwcm92aWRlcj0iU2FtcGxlRXZlbnRTb3VyY2VXcml0ZXIiIHNjaGVkdWxlZFRyYW5zZmVyUGVyaW9kPSJQVDVNIj4NCiAgICAgICAgICAgICAgICAgICAgPEV2ZW50IGlkPSIxIiBldmVudERlc3RpbmF0aW9uPSJFbnVtc1RhYmxlIi8+DQogICAgICAgICAgICAgICAgICAgIDxFdmVudCBpZD0iMiIgZXZlbnREZXN0aW5hdGlvbj0iTWVzc2FnZVRhYmxlIi8+DQogICAgICAgICAgICAgICAgICAgIDxFdmVudCBpZD0iMyIgZXZlbnREZXN0aW5hdGlvbj0iU2V0T3RoZXJUYWJsZSIvPg0KICAgICAgICAgICAgICAgICAgICA8RXZlbnQgaWQ9IjQiIGV2ZW50RGVzdGluYXRpb249IkhpZ2hGcmVxVGFibGUiLz4NCiAgICAgICAgICAgICAgICAgICAgPERlZmF1bHRFdmVudHMgZXZlbnREZXN0aW5hdGlvbj0iRGVmYXVsdFRhYmxlIiAvPg0KICAgICAgICAgICAgICAgIDwvRXR3RXZlbnRTb3VyY2VQcm92aWRlckNvbmZpZ3VyYXRpb24+DQogICAgICAgICAgICA8L0V0d1Byb3ZpZGVycz4NCiAgICAgICAgPC9EaWFnbm9zdGljTW9uaXRvckNvbmZpZ3VyYXRpb24+DQogICAgPC9XYWRDZmc+",
|
||||
"StorageAccount":"[parameters('vmDiagnosticsStorageAccountName')]"
|
||||
},
|
||||
"protectedSettings": {
|
||||
"storageAccountName": "[parameters('vmDiagnosticsStorageAccountName')]",
|
||||
"storageAccountKey": "[listKeys(variables('accountid'),'2014-12-01-preview').key1]",
|
||||
"storageAccountEndPoint": "https://core.windows.net/"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"itemDisplayName": "Create a VM from a Windows Image with Empty Data Disk",
|
||||
"description": "This template allows creates a Windows VM with empty data disk",
|
||||
"summary": "Create a VM from a Windows Image with Empty Data Disk",
|
||||
"githubUsername": "kenazk",
|
||||
"dateUpdated": "2015-04-04"
|
||||
}
|
Загрузка…
Ссылка в новой задаче