Open roopafelix opened 8 years ago
I am attaching the Template also. SQL Always ON.txt
There is a pending pull request with several changes to the dependent repo at https://github.com/Azure/azure-quickstart-templates/pull/892. After this request has been merged, you may wish to test deployment again.
Hi ,
I am new to ARM,SO cloud you please let me know how to create Vnet with Primary AD.If you have any Template for full Setup that will be great.
{"status":"Failed","error":{"code":"ResourceDeploymentFailure","message":"The resource operation completed with terminal provisioning state 'Failed'.","details":[{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing extension 'InstallDomainController'. Error message: \"DSC Configuration completed with error(s).\".\"\r\n }\r\n ]\r\n }\r\n}"}]}]}}:
Template am using is { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "newStorageAccountNamePrefix": { "type": "string", "metadata": { "description": "The prefix of the new storage account created to store the VMs disks, three different storage accounts will be created using this string as a prefix for the name" } }, "storageAccountType": { "type": "string", "allowedValues": [ "Standard_LRS", "Standard_GRS", "Standard_RAGRS", "Premium_LRS" ], "metadata": { "description": "The type of the Storage Account created" }, "defaultValue": "Standard_GRS" }, "vmNamePrefix": { "type": "string", "metadata": { "description": "The Prefix for the Vms" } }, "adVMSize": { "type": "string", "allowedValues": [ "Standard_D1", "Standard_DS1", "Standard_D2", "Standard_DS2", "Standard_D3", "Standard_DS3", "Standard_D4", "Standard_DS4", "Standard_D11", "Standard_DS11", "Standard_D12", "Standard_DS12", "Standard_D13", "Standard_DS13", "Standard_D14", "Standard_DS14" ], "metadata": { "description": "The size of the AD VMs Created" }, "defaultValue": "Standard_D1" }, "sqlVMSize": { "type": "string", "allowedValues": [ "Standard_D1", "Standard_DS1", "Standard_D2", "Standard_DS2", "Standard_D3", "Standard_DS3", "Standard_D4", "Standard_DS4", "Standard_D11", "Standard_DS11", "Standard_D12", "Standard_DS12", "Standard_D13", "Standard_DS13", "Standard_D14", "Standard_DS14" ], "metadata": { "description": "The size of the AD VMs Created" }, "defaultValue": "Standard_D3" }, "sqlWitnessVMSize": { "type": "string", "allowedValues": [ "Standard_D1", "Standard_DS1", "Standard_D2", "Standard_DS2", "Standard_D3", "Standard_DS3", "Standard_D4", "Standard_DS4", "Standard_D11", "Standard_DS11", "Standard_D12", "Standard_DS12", "Standard_D13", "Standard_DS13", "Standard_D14", "Standard_DS14" ], "metadata": { "description": "The size of the AD VMs Created" }, "defaultValue": "Standard_D1" }, "dnsPrefix": { "type": "string", "metadata": { "description": "The DNS Prefix for the Public IP Address" } }, "domainName": { "type": "string", "metadata": { "description": "The domain name" } }, "sqlServerServiceAccountUserName": { "type": "string", "metadata": { "description": "The SQL Server Service account name" }, "defaultValue": "sqlservice" }, "sqlServerServiceAccountPassword": { "type": "securestring", "metadata": { "description": "The SQL Server Service account password" } }, "vmNetworkSubnet": { "type": "string", "metadata": { "description": "The address range of the subnet static IPs are allocated from in the new VNET" }, "defaultValue": "10.0.0.0/24" }, "virtualNetworkAddressRange": { "type": "string", "metadata": { "description": "The address range of the new VNET in CIDR format" }, "defaultValue": "10.0.0.0/16" }, "sqlSubnet": { "type": "string", "metadata": { "description": "The address range of the SQL subnet created in the new VNET" }, "defaultValue": "10.0.1.0/24" }, "primaryAdIpAddress": { "type": "string", "metadata": { "description": "The address of Primary AD" }, "defaultValue": "10.0.0.4" }, "secondaryIpAddress": { "type": "string", "metadata": { "description": "The address of secondary AD" }, "defaultValue": "10.0.0.5" }, "adminUsername": { "type": "string", "metadata": { "description": "The name of the Administrator of the new VMs and Domain" }, "defaultValue": "sqlAdministrator" }, "adminPassword": { "type": "securestring", "metadata": { "description": "The password for the Administrator account of the new VMs and Domain" } }, "assetLocation": { "type": "string", "metadata": { "description": "The location of resources that the script is dependent on such as linked templates and DSC modules" }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sql-server-2014-alwayson-dsc" }, "location": { "type": "string", "allowedValues": [ "West US", "East US", "East US 2", "Central US", "South Central US", "North Central US", "North Europe", "West Europe", "East Asia", "Southeast Asia", "Japan East", "Japan West", "Southeast Asia" ], "metadata": { "description": "The region to deploy the resources into" } }, "sqlLBIPAddress": { "type": "string", "metadata": { "description": "The address of ILB for SQL Server AlwaysOn listener" }, "defaultValue": "10.0.1.10" }, "dataBaseNames": { "type": "array", "metadata": { "description": "An array of databases name, each database will be created and added to the availability group" }, "defaultValue": [ "testdb1", "testdb2" ] } }, "variables": { "adSubnetName": "ADStaticSubnet", "subnets": [ { "name": "[variables('adSubnetName')]", "properties": { "addressPrefix": "[parameters('vmNetworkSubnet')]" } }, { "name": "[variables('sqlSubnetName')]", "properties": { "addressPrefix": "[parameters('sqlSubnet')]" } } ], "virtualNetworkName": "FlexDevVNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", "adSubnetRef": "[concat(variables('vnetID'),'/subnets/',variables('adSubnetName'))]", "adTemplateURL": "[concat(parameters('assetLocation'),'/ADVmTemplate.json')]", "adStorageName": "[concat(parameters('newStorageAccountNamePrefix'),'adsa')]", "adVmDepoyment": "DeployAdVms", "adVmDepoymentId": "[concat('Microsoft.Resources/deployments/', variables('adVmDepoyment'))]", "deployPrimaryAdTemplateURL": "[concat(parameters('assetLocation'),'/DeployPrimaryAD.json')]", "deploySecondaryAdTemplateURL": "[concat(parameters('assetLocation'),'/DeploySecondaryAD.json')]", "deployPrimaryAd": "deployPrimaryAd", "deployPrimaryAdId": "[concat('Microsoft.Resources/deployments/', variables('deployPrimaryAd'))]", "deploySecondaryAdName": "deploySecondaryAdName", "deploySecondaryAdNameId": "[concat('Microsoft.Resources/deployments/', variables('deploySecondaryAdName'))]", "sqlSubnetName": "sqlSubnet", "sqlSubnetRef": "[concat(variables('vnetID'),'/subnets/',variables('sqlSubnetName'))]", "sqlStorageName": "[concat(parameters('newStorageAccountNamePrefix'),'sqlsa')]", "sqlClusterTemplateURL": "[concat(parameters('assetLocation'),'/SqlClusterVmTemplate.json')]", "deploySqlClusterVms": "deploySqlClusterVms", "deploySqlClusterVmsId": "[concat('Microsoft.Resources/deployments/', variables('deploySqlClusterVms'))]", "sqlWitnessTemplateURL": "[concat(parameters('assetLocation'),'/SqlWitnessVmTemplate.json')]", "sqlWitnessStorageName": "[concat(parameters('newStorageAccountNamePrefix'),'sqlwsa')]", "deploySqlWitnessVms": "deploySqlWitnessVms", "deploySqlWitnessVmsId": "[concat('Microsoft.Resources/deployments/', variables('deploySqlWitnessVms'))]", "adVmNamePrefix": "[concat(parameters('vmNamePrefix'),'-AD-')]", "adPDCVMName": "[concat(variables('adVmNamePrefix'),'0')]", "adBDCVMName": "[concat(variables('adVmNamePrefix'),'1')]", "vnetwithDNSTemplateUri": "[concat(parameters('assetLocation'),'/vnet-with-dns-server.json')]", "updateVNetDNS1": "updateVNetDNS1", "updateVNetDNS1Id": "[concat('Microsoft.Resources/deployments/', variables('updateVNetDNS1'))]", "updateVNetDNS2": "updateVNetDNS2", "updateVNetDNS2Id": "[concat('Microsoft.Resources/deployments/', variables('updateVNetDNS2'))]", "updateSQLWNic": "updateSQLWNic", "updateSQLWNicId": "[concat('Microsoft.Resources/deployments/', variables('updateSQLWNic'))]", "sqlwNicName": "SqlWitnessMachine-Nic-0", "nicTemplateURL": "[concat(parameters('assetLocation'),'/nic.json')]", "updateSQLCNic1": "updateSQLCNic1", "updateSQLCNic1Id": "[concat('Microsoft.Resources/deployments/', variables('updateSQLCNic1'))]", "sqlNicName1": "SqlMachine-Nic-0", "updateSQLCNic2": "updateSQLCNic2", "updateSQLCNic2Id": "[concat('Microsoft.Resources/deployments/', variables('updateSQLCNic2'))]", "sqlNicName2": "SqlMachine-Nic-1", "publicLBName": "sqlLoadBalancer", "lbFE": "SqlLBFE", "lbBE": "SqlLBBE", "sqllbID": "[resourceId('Microsoft.Network/loadBalancers',variables('publicLBName'))]", "sqllbFEConfigID": "[concat(variables('sqllbID'),'/frontendIPConfigurations/',variables('lbFE'))]", "sqlBEAddressPoolID": "[concat(variables('sqllbID'),'/backendAddressPools/',variables('lbBE'))]", "deploySqlWitnessShare": "deploySqlWitnessShare", "deploySqlWitnessShareId": "[concat('Microsoft.Resources/deployments/', variables('deploySqlWitnessShare'))]", "deploySqlWitnessShareTemplateUrl": "[concat(parameters('assetLocation'),'/DeploySqlWitnessShare.json')]", "sqlWitnessSharePath": "[concat(parameters('dnsPrefix'),'-fsw')]", "sqlWitnessVmNamePrefix": "[concat(parameters('vmNamePrefix'),'-SqlW-')]", "sqlwVMName": "[concat(variables('sqlWitnessVmNamePrefix'),'0')]", "deploySqlAlwaysOn": "deploySqlAlwaysOn", "deploySqlAlwaysOnTemplateUrl": "[concat(parameters('assetLocation'),'/DeploySqlAlwaysOn.json')]", "sqlClusterVmNamePrefix": "[concat(parameters('vmNamePrefix'),'-SqlC-')]", "sqlCVMName1": "[concat(variables('sqlClusterVmNamePrefix'),'0')]", "sqlCVMName2": "[concat(variables('sqlClusterVmNamePrefix'),'0')]", "sqlLBName": "sqlLoadBalancer", "sqlAOEPName": "[concat(parameters('dnsPrefix'),'-hadr')]", "sqlAOAGName": "[concat(parameters('dnsPrefix'),'-ag')]", "sqlAOListenerName": "[concat(parameters('dnsPrefix'),'ag-listener')]", "sqlAvailabilitySetName": "sqlAvailabilitySet" }, "resources": [ { "name": "[variables('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "properties": { "addressSpace": { "addressPrefixes": [ "[parameters('virtualNetworkAddressRange')]" ] }, "subnets": "[variables('subnets')]" } }, { "type": "Microsoft.Compute/availabilitySets", "name": "[variables('sqlAvailabilitySetName')]", "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]" }, { "name": "[variables('adVmDepoyment')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('virtualNetworkName')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('adTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" }, "adminPassword": { "value": "[parameters('adminPassword')]" }, "dnsPrefix": { "value": "[parameters('dnsPrefix')]" }, "storageAccount": { "value": "[variables('adStorageName')]" }, "subnetUri": { "value": "[variables('adSubnetRef')]" }, "primaryAdIpAddress": { "value": "[parameters('primaryAdIpAddress')]" }, "secondaryIpAddress": { "value": "[parameters('secondaryIpAddress')]" }, "storageAccountType": { "value": "[parameters('storageAccountType')]" }, "vmNamePrefix": { "value": "[variables('adVmNamePrefix')]" }, "vmSize": { "value": "[parameters('adVMSize')]" } } } }, { "name": "[variables('deploySqlClusterVms')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('virtualNetworkName')]", "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('sqlClusterTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" }, "adminPassword": { "value": "[parameters('adminPassword')]" }, "storageAccount": { "value": "[variables('SqlStorageName')]" }, "storageAccountType": { "value": "[parameters('storageAccountType')]" }, "nicSubnetUri": { "value": "[variables('sqlSubnetRef')]" }, "lbSubnetUri": { "value": "[variables('sqlSubnetRef')]" }, "vmNamePrefix": { "value": "[variables('sqlClusterVmNamePrefix')]" }, "sqlLBIPAddress": { "value": "[parameters('sqlLBIPAddress')]" }, "vmSize": { "value": "[parameters('sqlVMSize')]" }, "availabilitySetName": { "value": "[variables('sqlAvailabilitySetName')]" } } } }, { "name": "[variables('deploySqlWitnessVms')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('virtualNetworkName')]", "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('sqlWitnessTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" }, "adminPassword": { "value": "[parameters('adminPassword')]" }, "storageAccount": { "value": "[variables('sqlWitnessStorageName')]" }, "subnetUri": { "value": "[variables('sqlSubnetRef')]" }, "storageAccountType": { "value": "[parameters('storageAccountType')]" }, "vmNamePrefix": { "value": "[variables('sqlWitnessVmNamePrefix')]" }, "vmSize": { "value": "[parameters('sqlWitnessVMSize')]" }, "availabilitySetName": { "value": "[variables('sqlAvailabilitySetName')]" } } } }, { "name": "[variables('deployPrimaryAd')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('adVmDepoymentId')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('deployPrimaryAdTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "primaryADName": { "value": "[variables('adPDCVMName')]" }, "domainName": { "value": "[parameters('domainName')]" }, "location": { "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" }, "adminPassword": { "value": "[parameters('adminPassword')]" }, "assetLocation": { "value": "[parameters('assetLocation')]" } } } }, { "name": "[variables('updateVNetDNS1')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('deployPrimaryAdId')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('vnetwithDNSTemplateUri')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, "virtualNetworkAddressRange": { "value": "[parameters('virtualNetworkAddressRange')]" }, "subnets": { "value": "[variables('subnets')]" }, "dnsServerAddress": { "value": [ "[parameters('primaryAdIpAddress')]" ] } } } }, { "name": "[variables('deploySecondaryAdName')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('updateVNetDNS1Id')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('deploySecondaryAdTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "secondaryADName": { "value": "[variables('adBDCVMName')]" }, "domainName": { "value": "[parameters('domainName')]" }, "location": { "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" }, "adminPassword": { "value": "[parameters('adminPassword')]" }, "assetLocation": { "value": "[parameters('assetLocation')]" } } } }, { "name": "[variables('updateVNetDNS2')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('deploySecondaryAdNameId')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('vnetwithDNSTemplateUri')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, "virtualNetworkAddressRange": { "value": "[parameters('virtualNetworkAddressRange')]" }, "subnets": { "value": "[variables('subnets')]" }, "dnsServerAddress": { "value": [ "[parameters('primaryAdIpAddress')]", "[parameters('secondaryIpAddress')]" ] } } } }, { "name": "[variables('updateSQLWNic')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('updateVNetDNS1Id')]", "[variables('updateVNetDNS2Id')]", "[variables('deploySqlWitnessVmsId')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('nicTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "nicName": { "value": "[variables('sqlwNicName')]" }, "ipConfigurations": { "value": [ { "name": "ipconfig1", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('sqlSubnetRef')]" } } } ] }, "dnsServers": { "value": [ "[parameters('primaryAdIpAddress')]", "[parameters('secondaryIpAddress')]" ] } } } }, { "name": "[variables('updateSQLCNic1')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('updateVNetDNS1Id')]", "[variables('updateVNetDNS2Id')]", "[variables('deploySqlClusterVmsId')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('nicTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "nicName": { "value": "[variables('sqlNicName1')]" }, "ipConfigurations": { "value": [ { "name": "ipconfig1", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('sqlSubnetRef')]" }, "loadBalancerBackendAddressPools": [ { "id": "[variables('sqlBEAddressPoolID')]" } ] } } ] }, "dnsServers": { "value": [ "[parameters('primaryAdIpAddress')]", "[parameters('secondaryIpAddress')]" ] } } } }, { "name": "[variables('updateSQLCNic2')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('updateVNetDNS1Id')]", "[variables('updateVNetDNS2Id')]", "[variables('deploySqlClusterVmsId')]", "[variables('updateSQLCNic1Id')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('nicTemplateURL')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[parameters('location')]" }, "nicName": { "value": "[variables('sqlNicName2')]" }, "ipConfigurations": { "value": [ { "name": "ipconfig1", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('sqlSubnetRef')]" }, "loadBalancerBackendAddressPools": [ { "id": "[variables('sqlBEAddressPoolID')]" } ] } } ] }, "dnsServers": { "value": [ "[parameters('primaryAdIpAddress')]", "[parameters('secondaryIpAddress')]" ] } } } }, { "name": "[variables('deploySqlWitnessShare')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('updateSQLWNicId')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('deploySqlWitnessShareTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "sqlwVMName": { "value": "[variables('sqlwVMName')]" }, "domainName": { "value": "[parameters('domainName')]" }, "location": { "value": "[parameters('location')]" }, "sharePath": { "value": "[concat(parameters('dnsPrefix'),'-fsw')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" }, "adminPassword": { "value": "[parameters('adminPassword')]" }, "assetLocation": { "value": "[parameters('assetLocation')]" } } } }, { "name": "[variables('deploySqlAlwaysOn')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "[variables('updateSQLCNic1Id')]", "[variables('updateSQLCNic2Id')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('deploySqlAlwaysOnTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "sqlVMNamePrefix": { "value": "[variables('sqlClusterVmNamePrefix')]" }, "domainName": { "value": "[parameters('domainName')]" }, "dnsPrefix": { "value": "[parameters('dnsPrefix')]" }, "sharePath": { "value": "[variables('sqlWitnessSharePath')]" }, "sqlwVMName": { "value": "[variables('sqlwVMName')]" }, "sqlLBName": { "value": "[variables('sqlLBName')]" }, "sqlLBIPAddress": { "value": "[parameters('sqlLBIPAddress')]" }, "dnsServerName": { "value": "[variables('adPDCVMName')]" }, "dataBaseNames": { "value": "[parameters('dataBaseNames')]" }, "location": { "value": "[parameters('location')]" }, "sqlServerServiceAccountUserName": { "value": "[parameters('sqlServerServiceAccountUserName')]" }, "sqlServerServiceAccountPassword": { "value": "[parameters('sqlServerServiceAccountPassword')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" }, "adminPassword": { "value": "[parameters('adminPassword')]" }, "assetLocation": { "value": "[parameters('assetLocation')]" }, "sqlAlwaysOnEndpointName": { "value": "[variables('sqlAOEPName')]" }, "sqlAlwaysOnAvailabilityGroupName": { "value": "[variables('sqlAOAGName')]" }, "sqlAlwaysOnAvailabilityGroupListenerName": { "value": "[variables('sqlAOListenerName')]" } } } } ], "outputs": {} }
Please suggest