Thanks for you input on this, I had seen the responses earlier in the week but hadn’t have a chance to test and reply until today. I have now found a way to work around the issue, it doesn’t resolve the underlying issue but lets me move forward.
The issue is with the Azure DSC extension, it looks as if it should be acting on behalf of the LCM when executing. On a machine which executes the code correctly, the DSC extension uses RebootNodeIfNeeded : True. E.g.
VERBOSE: [2016-07-10T11:40:18] Sequence Number : 0
VERBOSE: [2016-07-10T11:40:18] Previous Sequence : 0
VERBOSE: [2016-07-10T11:40:18] RebootPending : False
VERBOSE: [2016-07-10T11:40:18] RebootNodeIfNeeded : True
VERBOSE: [2016-07-10T11:40:18] UseExisting : False
VERBOSE: [2016-07-10T11:40:18] State : Completed
On a machine which fails to execute correctly, RebootIfNeeded is not set:
VERBOSE: [2016-07-10T13:00:15] Sequence Number : 1
VERBOSE: [2016-07-10T13:00:15] Previous Sequence : 1
VERBOSE: [2016-07-10T13:00:15] RebootPending : False
VERBOSE: [2016-07-10T13:00:15] RebootNodeIfNeeded : False
VERBOSE: [2016-07-10T13:00:15] UseExisting : False
VERBOSE: [2016-07-10T13:00:15] State : Completed
Now why it is not setting this value is a mystery at the moment, its exactly the same Azure ARM json template which executes the DSC configurations. The template is based on the latest schema:
The configuration is different, the one that works is NewForest whereas the ones which fail are promotedc and promoterodc, but the basis of the configuration is the same.
I have worked around the problem by setting the LCM using the WMF 5 method suggested by Kyle. The way I do this is within the ARM template. The methodology is as follows:
- Build VM.
- Add a DSC extension, send a configuration script to set the LCM.
- Update the DSC extension, sending it the DSC configuration for the server.
By doing this, the LCM takes over from the ARM DSC extension, forces the reboot, and the machine acts as it would on premise.
There is an issue with doing this however, because the LCM is taking over, the Azure end thinks the configuration has completed successfully when it has not. This means the Azure side will enact any further steps within the template before the extension has finished. For my purposes right now, this isn’t an issue as the application configuration comes last, but it might hurt me later on with more complex configurations.
Is there a way to combine the LCM configuration inside of an existing template? I tried a composite nested within the script but it didn’t seem to work, this put everything in the script into a meta.mof rather then creating separate MOFs.
I’ll keep digging into why its not working.They’ll probably update the extension in a few weeks and it will work without issue.
Thanks for your help, if anyone else has any suggestions or knows why this issue might be occurring I’d be keen to hear the information.