We have a release pipeline in Azure Devops which essentially does the following:
- checks out the code from a GitHub repo
- uploads code to the VSO artifact storage
- creates a temp virtual machine to build
- deploys the services
- runs a PowerShell script
- cleans up templates
This has been working until recently. Now, during the PowerShell step, I see the following error:
Failed to update image for VMSS foo. Error: Provisioning of VM extension 'PowershellDSC' has timed out. Extension installation may be taking too long, or extension status could not be obtained.
In Azure > Virtual machine scale sets > Foo - Extensions > Extensions, I can see the POwerShell extension defined, type DSC, but removing this returns the same message.
Any idea why this might be happening? Also, how can I reproduce this without building?
EDIT 14 NOV 2019
Thanks for replying. In Azure > Extensions, I uninstalled the extension and then restarted the scale set. I then reinstated the extension and restarted the scale set. Now, I have an error related to key not found.
The DSC Extension received an incorrect input: Value for password key 'registrationKeyPrivate' is missing
This is the command I am running to install the PowerShell DSC extension:
'az vmss extension set --vmss-name MyVmss --name DSC --resource-group MyVmssGroup --version 2.76.0.0 --publisher Microsoft.Powershell --extension-instance-name MyPowershellDSCExt --settings C:\Users\me\mylmsconfig.json'
The mylmsconfig.json contains the following to configure the LMS pointing to Azure Automation DSC:
{
"Properties": [
{
"Name": "RegistrationKey",
"Value": {
"UserName": "PLACEHOLDER_DONOTUSE",
"Password": "PrivateSettingsRef:registrationKeyPrivate"
},
"TypeName": "PSCredential"
},
{
"Name": "RegistrationUrl",
"Value": "https://uks-agentservice-prod-1.azure-automation.net/accounts/myautomationservice",
"TypeName": "System.String"
},
{
"Name": "NodeConfigurationName",
"Value": "bindingsname.localhost",
"TypeName": "System.String"
},
{
"Name": "ConfigurationMode",
"Value": "ApplyandAutoCorrect",
"TypeName": "System.String"
}
]
}
Where does the "registrationKeyPrivate" need to be defined? I would expect to see the above details reflected in the LMS configuration after running Get-DscLocalConfigurationManager on the virtual machine.