- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试构建用于 SQL IaaS 部署的模板,包括 VM、SQL IaaS 扩展和 SQL IaaS 计算机。当 SQL IaaS 计算机部署时,我收到错误,因为我认为 VM 尚未完全完成部署。
我当前的模板如下所示:
{
"name": "[parameters('virtualMachineName')]",
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2018-10-01",
"location": "[variables('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('virtualMachineSize')]"
},
"osProfile": {
"computerName": "[parameters('virtualMachineName')]",
"adminUsername": "",
"adminPassword": "",
"windowsConfiguration": {
"provisionVMAgent": true
}
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftSQLServer",
"offer": "[variables('sqlOffer')]",
"sku": "[parameters('sqlEdition')]",
"version": "latest"
},
"osDisk": {
"createOption": "FromImage",
"osType": "Windows",
"caching": "ReadWrite",
"name": "[variables('OSDiskName')]",
"managedDisk": {
"storageAccountType": "Premium_LRS"
}
},
"dataDisks": [
{
"name": "[concat(parameters('virtualMachineName'),'-DATA1')]",
"createOption": "Empty",
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
},
"lun": 0,
"diskSizeGB": "[parameters('sizeOfUserDBDiskInGB')]",
"caching": "ReadOnly"
},
{
"name": "[concat(parameters('virtualMachineName'),'-DATA2')]",
"createOption": "Empty",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"lun": 1,
"diskSizeGB": 128,
"caching": "ReadOnly"
},
{
"name": "[concat(parameters('virtualMachineName'),'-DATA3')]",
"createOption": "Empty",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"lun": 2,
"diskSizeGB": 1023,
"caching": "ReadOnly"
},
{
"name": "[concat(parameters('virtualMachineName'),'-DATA4')]",
"createOption": "Empty",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"lun": 4,
"diskSizeGB": 512,
"caching": "ReadOnly"
},
{
"name": "[concat(parameters('virtualMachineName'),'-DATA5')]",
"createOption": "Empty",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"lun": 5,
"diskSizeGB": 512,
"caching": "None"
},
{
"name": "[concat(parameters('virtualMachineName'),'-DATA6')]",
"createOption": "Empty",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"lun": 6,
"diskSizeGB": 512,
"caching": "None"
}
]
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[reference(resourceId(resourceGroup().name, 'Microsoft.Storage/storageAccounts', parameters('diagnosticsStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]"
}
}
},
"tags": {
"Application Stack": "[parameters('Application Stack')]",
"Business Contact": "[parameters('Business Contact')]",
"Associated to": "[resourceGroup().name]",
"Business Owner": "[parameters('Business Owner')]",
"BusinessUnit": "[parameters('Business Unit')]",
"Department": "[parameters('Department')]",
"Region": "[parameters('Region')]",
"Type": "[variables('VMType')]"
}
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'), '/SqlIaasExtension')]",
"location": "[variables('location')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
],
"properties": {
"type": "SqlIaaSAgent",
"publisher": "Microsoft.SqlServer.Management",
"typeHandlerVersion": "1.2",
"autoUpgradeMinorVersion": "true",
"settings": {
"AutoTelemetrySettings": {
"Region": "[variables('location')]"
},
"AutoPatchingSettings": {
"PatchCategory": "WindowsMandatoryUpdates",
"Enable": true,
"DayOfWeek": "Saturday",
"MaintenanceWindowStartingHour": "2",
"MaintenanceWindowDuration": "180"
},
"ServerConfigurationsManagementSettings": {
"SQLConnectivityUpdateSettings": {
"ConnectivityType": "Private",
"Port": "1433"
},
"SQLWorkloadTypeUpdateSettings": {
"SQLWorkloadType": "General"
},
"SQLStorageUpdateSettings": {
"DiskCount": 1,
"NumberOfColumns": 1,
"StartingDeviceID": "2",
"DiskConfigurationType": "NEW"
},
"AdditionalFeaturesServerConfigurations": {
"IsRServicesEnabled": "false"
}
}
},
"protectedSettings": {
"SQLAuthUpdateUserName": "",
"SQLAuthUpdatePassword": ""
}
}
},
{
"type": "Microsoft.SqlVirtualMachine/sqlVirtualMachines",
"apiVersion": "2017-03-01-preview",
"name": "[parameters('virtualMachineName')]",
"location": "[variables('location')]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]"
],
"properties": {
"virtualMachineResourceId": "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]",
"sqlImageOffer": "[variables('sqlOffer')]",
"sqlServerLicenseType": "AHUB",
"sqlManagement": "Full",
"sqlImageSku": "[parameters('sqlEdition')]"
}
}
最后一部分部署 Azure SQL IaaS 计算机,这取决于正在运行的 VM 代理。我收到一条错误消息,
"error": {
"code": "VmAgentNotRunning",
"message": "The VM agent in Virtual Machine: '/subscriptions/{GUID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VmName}' is not in running state. Please make sure it is installed and in running state and try again later."
}
有没有办法可以在部署 SQL IaaS 计算机之前添加等待或添加对正在运行的代理的依赖项?如果不部署它,该模板就可以很好地工作。部署机器后,我可以运行 powershell 脚本来创建对象,但我试图避免这种情况。提前致谢。
最佳答案
诀窍是将“sqlManagement”:“Full”更改为“sqlManagement”:“LightWeight”,
关于sql - Azure ARM 模板 "VmAgentNotRunning",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60104721/
我正在尝试构建用于 SQL IaaS 部署的模板,包括 VM、SQL IaaS 扩展和 SQL IaaS 计算机。当 SQL IaaS 计算机部署时,我收到错误,因为我认为 VM 尚未完全完成部署。
我是一名优秀的程序员,十分优秀!