Powershell DSC error – No matching MSFT_DNSClientServerAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_DNSClientServerAddress class on the CIM server

 

Background –  I was trying to deploy azure dsc extension to add ADDS role on new azure vm using ARM template (extension resource under compute resource).

Extension – active-directory-new-domain-ha-2-dc and AD

Error – 

{ “status”: “Failed”, “error”: { “code”: “ResourceDeploymentFailure”, “message”: “The resource operation completed with terminal provisioning state ‘Failed’.”, “details”: [ { “code”: “VMExtensionProvisioningError”, “message”: “VM has reported a failure when processing extension ‘CreateADForest’. Error message: “DSC Configuration ‘CreateADPDC’ completed with error(s). Following are the first few: Interface “Ethernet” is not available. Please select a valid interface and try again. PowerShell DSC resource MSFT_xDNSServerAddress failed to execute Test-TargetResource functionality with error message: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: No matching MSFT_DNSClientServerAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_DNSClientServerAddress class on the CIM server: SELECT * FROM MSFT_DNSClientServerAddress WHERE ((InterfaceAlias LIKE ‘Ethernet’)) AND ((AddressFamily = 2)). Verify query parameters and retry. The SendConfigurationApply function did not succeed.”.” } ] } }

 

Solution – 

As per the error the InterfaceAlias  in not there with name “Ethernet” since now a days azure provision VM with default network interface name “Ethernet 2” and “Ethernet” is the name hard coded in the DSC extension ***.ps1 file so just changing the hardcoded value to “Ethernet 2” resolved the issue.

 

 


(Visited 139 times, 1 visits today)
, , , , , , , , , , ,

By Arun Sabale

Arun is a Solution Architect on enterprise client management with more than 14 years of experience in IT. Arun Sabale is Blogger and tech enthusiast. His main focus is on Azure cloud infra, Cloud automation with powershell, python, ARM terraform and all cloud infra services like compute, storage, network, automation, function api etc... LinkedIN - https://www.linkedin.com/in/arun-sabale/