Hello @Alan Chen ,
Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question.
If your DSC configuration fails, this will be reported in the Azure portal and will stop your ARM deployment from continuing. The portal will give you a brief description of the error but often this is just something along the lines of “configuration failed to apply” rather than a useful error.
To investigate this issue, you will need to login to the VM and check a few locations on the VM as long as the VM deployment succeeds
- C:\WindowsAzure\Logs\Plugins\Microsoft.Powershell.DSC<DSC Extension Version Number> – This is where your verbose DSC logs will be, you can look at these and find where the error occured.
- C:\Packages\Plugins\Microsoft.Powershell.DSC<DSC Extension Version Number> – This is where the extensions data is stored and there are a few places in here to look for information 1. Status folder – In here is the latest status of the DSC extension, it’s useful to see what the date and time on this is to see if your error is actually from your recent configurationDSC or if you are just getting a cached response.
- DSCWork – This is where your DSC file is actually extracted to and your MOF files are generated, you can look in here to see that you are actually running the right file or even manually alter and compile your DSC file if you want to test it on that machine.
Here is a useful article on this context by one of our MVPs will come handy for you, please refer to Completing your automated VM deployments with the DSC VM extension
If the reply is helpful, I would request, you to **"Accept Answer and Upvote" so that the relevancy of this post will improve when anyone in the community search for a similar query**