I have a simple template that deploys a NIC, a VM, and a CustomScriptExtension:
{
"name": "Microsoft.CustomScriptExtension-20161202",
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "incremental",
"templateLink": {
"uri": "https://gallery.azure.com/artifact/20161101/Microsoft.CustomScriptExtension-arm.2.0.50/Artifacts/MainTemplate.json"
},
"parameters": {
"vmName": {
"value": "[parameters('virtualMachineName')]"
},
"location": {
"value": "[parameters('configScriptLocation')]"
},
"fileUris": {
"value": "[parameters('configScriptFileUris')]"
}
}
},
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
]
},
My script enables some windows features, downloads .NET 4.6.1 from blob storage and installs it. I've been running this template over and over deleting the VM, NIC, and VHD in between each deploy. Yesterday, I began to encounter an issue where my script extension never finishes deploying.
I'll let the powershell script which calls New-AzureRmResourceGroupDeployment
run and run but it never returns.
Here's what I know:
- The portal shows that the script extension's status is deploying and duration is 1s.
- When I sign into the VM, no log file has been created which indicates to me that the script has not even started since its first line creates the log file.
- There is an empty folder at C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.8
- Under Event Viewer -> Applications and Services Logs -> Microsoft -> WindowsAzure -> Status -> Plugins I see that it is trying to download Microsoft.Compute_CustomScriptExtension_useast2_manifest.xml but can't resolve the hostname. In fact, all name resolution appears to be broken. I suspect this is the true problem but will continue investigation.
Why does my script extension never finish deploying? I tried clicking the Deployments link on the header of my resource group and, from there, deleting the deployments in case those deployment histories were somehow interfering but it appears not to help.
I've also noticed that my extension appears in the portal with the name 'CustomScriptExtension' while I would expect it to be 'Microsoft.CustomScriptExtension-20161202'.