Forum Discussion
Azure DSC extension fails to installed "ParentResourceNotFound"
- Apr 30, 2020
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.
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
- creadleApr 30, 2020Copper 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.