2015-07-01 29 views
0

我正嘗試通過ARM(Azure資源管理器)模板創建一個帶有廚師客戶端的Windows VM。我找到一個示例模板在github上:未能在資源管理器模板中爲VM添加主廚擴展

https://github.com/Azure/azure-quickstart-templates/tree/master/chef-extension-windows-vm

{ 
    "name": "[concat(variables('vmName'),'/',variables('chefClientName'))]", 
    "type": "Microsoft.Compute/virtualMachines/extensions", 
    "apiVersion": "2015-05-01-preview", 
    "location": "[variables('location')]", 
    "dependsOn": [ 
     "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" 
    ], 
    "properties": { 
     "publisher": "Chef.Bootstrap.WindowsAzure", 
     "type": "ChefClient", 
     "typeHandlerVersion": "1201.12", 
     "settings": { 
      "client_rb": "[parameters('client_rb')]", 
      "runlist": "[parameters('runlist')]" 
     }, 
     "protectedSettings": { 
      "validation_key": "[parameters('validation_key')]" 
     } 
    } 
} 

我在PowerShell中部署該模板,storageAcount /的vNet/IP/NIC/VM創建成功。但廚師擴展名來創建失敗,出現以下錯誤:

New-AzureResourceGroupDeployment : 3:44:51 PM - Resource Microsoft.Compute/virtualMachines/extensions 
'myVM/chefExtension' failed with message 'Extension with publisher 'Chef.Bootstrap.WindowsAzure', type 'ChefClient', 
and type handler version '1201.12' could not be found in the extension repository.' 
At line:1 char:1 
+ New-AzureResourceGroupDeployment -Name $deployName -ResourceGroupName $RGName -T ... 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (:) [New-AzureResourceGroupDeployment], Exception 
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand 

如何創建一個虛擬機與ARM模板廚師? 謝謝。

回答

0

失敗是由錯誤的「typeHandlerVersion」導致的,「1201.12」不再可用。 「1207.12」工作正常。要獲得可用的擴展信息,請使用以下PowerShell命令: Get-AzureVMAvailableExtension |選擇ExtensionName,Publisher,版本,發佈日期

相關問題