Azure DSC extension fails to installed "ParentResourceNotFound"

Occasional Contributor

I am unable to add VMs as DSC Nodes in my Azure Automation Account.  So I tried to install the dsc extension using the powershell cmdlet "Register-AzureRmAutomationDscNode".  This failed with the error (Somes details removed and replaced with < .. >)


eploymentName          : 20171227013800

ResourceGroupName       :<RG NAME>

ProvisioningState       : Failed

Timestamp               : 27/12/2017 13:38:05

Mode                    : Incremental

TemplateLink            :

                          Uri            :


                          ContentVersion :


Parameters              :

                          Name             Type                       Value

                          ===============  =========================  ==========

                          vmName           String                     <VMNAME>

                          location         String                     uksouth

                          modulesUrl       String                     https://eus2oaasibizamarketprod1.blob.core.window


                          configurationFunction  String


                          registrationKey  SecureString

                          registrationUrl  String           

                          net/accounts/<A GUID>

                          nodeConfigurationName  String

                          configurationMode  String                     ApplyAndAutocorrect

                          configurationModeFrequencyMins  Int                        15

                          refreshFrequencyMins  Int                        30

                          rebootNodeIfNeeded  Bool                       False

                          actionAfterReboot  String                     ContinueConfiguration

                          allowModuleOverwrite  Bool                       False

                          timestamp        String                     27/12/2017 13:38:00


Outputs                 :

DeploymentDebugLogLevel :


I can see that this is an ARM error, but I can't understand why im getting it.  The target VM exists and I have also tried pulling the name straight from the get-azurermvm cmdlet.  Any ideas?

3 Replies

for this to work you need to have your DSC scripts uploaded and compiled within the automation account first. 


Upload Step code excerpt

Upload-DscScript -automationAccount $inAutomationAccount -resourceGroup $inResourceGroup -scriptPath $inScriptPath -published $inPublish -force $inForce


Compile Step code excerpt

$CompilationJob = Start-AzureRmAutomationDscCompilationJob -ResourceGroupName $resourceGroup -AutomationAccountName $automationAccount -ConfigurationName $configurationName -ConfigurationData $configurationData -Parameters $Parameters -Verbose


When you consume the node configurations if they name does not match the name in the configuration it will fail. 


The function name within the DSC needs to match the filename as well. 





Thanks for the reply, everything is published so I think it must just be a badly formatted command (Spelling of my inputs probably).  I have however figured out why I couldn't do this via the console (this was my first issue) so I should be good for what I need now.  Once I have it working I can take another look at the ps


just in case your interested, it looks like our firewall is blocking access to some metadata files the extension needs to install properly

best response confirmed by Chris Gibson (Occasional Contributor)

@Chris Gibson Late to the show, but I figured this out cause I ran into the same issue.  You need to include the -azurevmresourcegroup option on the cmdlet.  It's a bit deceiving cause the cmdlet will run, but without that, it can't actually reference the VM on which to deploy the extension, which is why you get the (very non-informative!) ParentResourceNotFound error.