0
votes

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.

1
well, debug your extension, why your powershell dsc configuration times out. that would be the answer to your question4c74356b41
You can see in the C:\WindowsAzure\Logs\WaAppAgent.log (for Windows, /var/log/waagent.log for Linux GA logs), and see what could be the issue in the box which is preventing DSC to run. If it is a GA issue, then all other extensions shoudl also be affected, and if it is a DSC setup issue, when that would be clear in the logs, and in the CommandExecution.log of the DSC extension itself.vrdmr

1 Answers

0
votes

Instead of using the DSC extension to register the DSC pull server on the virtual machines within the scale set, I decided to use a PowerShell script and vmss extension to do the same. This worked - just another way of registering DSC pull servers.

I suspect there was a problem with using the older VMSS DSC extension or the credentials being passed in were incorrect.