Azure SQL Server with template

Cedric Leguebe 1 Reputation point Microsoft Employee
2022-09-15T14:10:47.457+00:00

Hello,
I tried to deploy an Azure SQL Server with template created from an existing SQL Server but I received this error ... someone know this problem ?
Thanks In Advance241523-2022-09-15-09-29-35.png

Azure SQL Database
Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
308 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Cedric Leguebe 1 Reputation point Microsoft Employee
    2022-09-15T14:27:24.907+00:00

    {
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
    "virtualMachines_RemSitSrv_name": {
    "defaultValue": "RemSitSrv",
    "type": "String"
    },
    "networkInterfaces_RemSitSrvVMNic_name": {
    "defaultValue": "RemSitSrvVMNic",
    "type": "String"
    },
    "publicIPAddresses_RemSitSrvPublicIP_name": {
    "defaultValue": "RemSitSrvPublicIP",
    "type": "String"
    },
    "sqlVirtualMachines_remsitsrv_name": {
    "defaultValue": "remsitsrv",
    "type": "String"
    },
    "virtualNetworks_VirtualNetworkSQLAOHA_externalid": {
    "defaultValue": "/subscriptions/0e9939f5-7ea2-497b-9069-c1981acbd953/resourceGroups/SQLAOHA/providers/Microsoft.Network/virtualNetworks/VirtualNetworkSQLAOHA",
    "type": "String"
    },
    "networkSecurityGroups_SQLAOHANSG_externalid": {
    "defaultValue": "/subscriptions/0e9939f5-7ea2-497b-9069-c1981acbd953/resourceGroups/SQLAOHA/providers/Microsoft.Network/networkSecurityGroups/SQLAOHANSG",
    "type": "String"
    }
    },
    "variables": {},
    "resources": [
    {
    "type": "Microsoft.Network/publicIPAddresses",
    "apiVersion": "2020-11-01",
    "name": "[parameters('publicIPAddresses_RemSitSrvPublicIP_name')]",
    "location": "westeurope",
    "sku": {
    "name": "Basic",
    "tier": "Regional"
    },
    "properties": {
    "ipAddress": "52.233.164.191",
    "publicIPAddressVersion": "IPv4",
    "publicIPAllocationMethod": "Static",
    "idleTimeoutInMinutes": 4,
    "ipTags": []
    }
    },
    {
    "type": "Microsoft.Compute/virtualMachines",
    "apiVersion": "2022-03-01",
    "name": "[parameters('virtualMachines_RemSitSrv_name')]",
    "location": "westeurope",
    "dependsOn": [
    "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_RemSitSrvVMNic_name'))]"
    ],
    "properties": {
    "hardwareProfile": {
    "vmSize": "Standard_A8_v2"
    },
    "storageProfile": {
    "imageReference": {
    "publisher": "MicrosoftWindowsServer",
    "offer": "WindowsServer",
    "sku": "2019-Datacenter",
    "version": "latest"
    },
    "osDisk": {
    "osType": "Windows",
    "name": "[concat(parameters('virtualMachines_RemSitSrv_name'), '_OsDisk_1_9b62c799bf324406b441e0aaa79eb93f')]",
    "createOption": "FromImage",
    "caching": "ReadWrite",
    "managedDisk": {}
    },
    "dataDisks": []
    },
    "osProfile": {
    "computerName": "[parameters('virtualMachines_RemSitSrv_name')]",
    "adminUsername": "AdminLabSQLAOHA",
    "adminPassword": "Humfrey1975",
    "windowsConfiguration": {
    "provisionVMAgent": true,
    "enableAutomaticUpdates": true,
    "patchSettings": {
    "patchMode": "AutomaticByOS",
    "assessmentMode": "ImageDefault"
    }
    },
    "secrets": [],
    "allowExtensionOperations": true
    },
    "networkProfile": {
    "networkInterfaces": [
    {
    "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_RemSitSrvVMNic_name'))]"
    }
    ]
    },
    "diagnosticsProfile": {
    "bootDiagnostics": {
    "enabled": true
    }
    },
    "licenseType": "Windows_Server"
    }
    },
    {
    "type": "Microsoft.Network/networkInterfaces",
    "apiVersion": "2020-11-01",
    "name": "[parameters('networkInterfaces_RemSitSrvVMNic_name')]",
    "location": "westeurope",
    "dependsOn": [
    "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_RemSitSrvPublicIP_name'))]"
    ],
    "properties": {
    "ipConfigurations": [
    {
    "name": "ipconfigRemSitSrv",
    "properties": {
    "privateIPAddress": "10.0.0.9",
    "privateIPAllocationMethod": "Static",
    "publicIPAddress": {
    "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_RemSitSrvPublicIP_name'))]"
    },
    "subnet": {
    "id": "[concat(parameters('virtualNetworks_VirtualNetworkSQLAOHA_externalid'), '/subnets/SubnetServer')]"
    },
    "primary": true,
    "privateIPAddressVersion": "IPv4"
    }
    }
    ],
    "dnsSettings": {
    "dnsServers": []
    },
    "enableAcceleratedNetworking": false,
    "enableIPForwarding": false,
    "networkSecurityGroup": {
    "id": "[parameters('networkSecurityGroups_SQLAOHANSG_externalid')]"
    }
    }
    },
    {
    "type": "Microsoft.SqlVirtualMachine/sqlVirtualMachines",
    "apiVersion": "2022-02-01",
    "name": "[parameters('sqlVirtualMachines_remsitsrv_name')]",
    "location": "westeurope",
    "dependsOn": [
    "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_RemSitSrv_name'))]"
    ],
    "properties": {
    "virtualMachineResourceId": "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_RemSitSrv_name'))]",
    "sqlImageOffer": "SQL2019-WS2019",
    "sqlServerLicenseType": "AHUB",
    "sqlManagement": "LightWeight",
    "sqlImageSku": "Enterprise"
    }
    }
    ]
    }

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.