June 5, 2014 at 2:26 pm #15960
I'm just starting to use DSC and am working on setting up a new test Hyper-V cluster. I am planning on having 3 nodes all use the same MOF file. I have gotten my MOF configured and working with the initial node and am now working on starting the next 2 nodes on pulling down the MOF.
What is the best practice in this situation, I'm assuming instead of using a node of the computernames under my configuration I should instead use Localhost so that it can apply to any of the machines. Is that right, or is there a better way I should be handling that?
Also I noticed that when I initially started having one of the new nodes pull down the MOF file it was getting the "Current configuration does not exist." error that KB2883200 fixes, however this was a fresh install of 2012 R2 with Update 1, so it was already up to date. It looks like changing the node name in the configuration to that specific server name made it start working, and then switching back to Localhost kept working. I am planning on testing that more with the third node that I am currently in the process of bringing up.
If there is any more information that would be helpful please let me know.
June 5, 2014 at 3:12 pm #15961
If you're using a pull server, you can just assign the same GUID to the LCM on the groups of servers that you want to be identically configured. For a push model, you sort of need to have a MOF for each computer, but that's not a big deal. All of those MOF files can be generated from the same configuration script, and when you run Start-DscConfiguration, it will process every computer that has a MOF file in the specified folder.
June 6, 2014 at 3:01 am #15966
Yeah, using "localhost" isn't really the right approach, unless you're running the config on EACH node, and generating the MOF file there – which is more effort than is intended.
June 6, 2014 at 7:49 am #15976
Thank you for the comments, I am using Pull mode, and after looking at the MOF generated some more, I'm hoping I have a better understanding but please correct me if I'm wrong. I didn't see these answers in The DSC Book, but if I missed something please feel free to tell me to RTFM.
If I'm planning on using the pull mode, and will have multiple servers accessing that MOF, does it matter what node name I put in the configuration file? It will generate the MOF name based on that, but I then change that when I convert it to the GUID to copy to my pull server. I didn't see anything in the MOF that jumped out at me as mattering, but I could have missed it.
It looks like the error I am hitting about the current configuration not existing will take some more troubleshooting for me. I have my MOF forcing an install of Hyper-V without forcing a reboot. That part would work so obviously the MOF was being used however after I manually rebooted the machine it wouldn't appear to be willing to continue until I made some change to the MOF. Originally I had change the name of the MOF before copying to the GUID, the second time I added a Depends on for one other config part, both times that got it working again. I'll need to do some more work with that to see if I'm just missing something or what. One question I did have is if my MOF requires a reboot and I don't have it set to do so automatically, do I get a notification of that somewhere?
Again thank you for all the help.
June 6, 2014 at 8:04 am #15979
When you're using a pull server, the node in your configuration is the GUID that you're using as the ConfigurationID on the target node(s). Hostnames never enter the picture.
June 6, 2014 at 8:08 am #15980
Ok, that makes sense. Thank you very much Dave. Initially I was thinking that the final MOF file was going to contain the node name which is why I thought I might have to use localhost so that it could apply to any machine. However since the MOF file doesn't care I'll now change my node name and update my understanding.
That might be a good thing to include in The DSC Book in case I'm not the only one confused.
That works much better in my brain so thanks again.
I'm still going to try to poke around at the reboot part to see what I can get figured out for that.
June 6, 2014 at 8:24 am #15983
I think you may have been overthinking it a little, is all :). But yes, the key thing is that the MOF doesn't include a host name. Using the host name as the MOF filename is solely for the benefit of pushing the MOF, so that the push command knows where to send it.
There's no "notification" of a pending reboot. As near as I've been able to determine, to date, there's no way to "tell" in terms of something you could check or query easily.
You must be logged in to reply to this topic.