How does LCM determine a configuration has changed

When the LCM checks the pull server to see if its configuration has changed, how does it do this?

Does it simply compare the checksum of its current configuration with the checksum on the pull server, and if different download and apply the updated configuration (uniquely identified by a GUID)?

Thanks…

Yup. So if you don’t generate a new checksum, it won’t work. Plus, the checksum is used for an integrity check after the config is pulled.

What Don said. I don’t even want to admit how long it took me to figure that out when I started learning DSC. If there is a file on a Pull server, whether it’s a Configuration .MOF or a Resource .ZIP file, if any changes whatsoever are made, you need a new Checksum or the changes will be ignored.

Thanks to all…

I updated a resource module .zip file and its associated .zip.checksum file on the pull server, but I didn’t update its version number. The LCM on the client machine I am testing with isn’t pulling down the updated resource, so applying a updated configuration, that depends on a new custom resource contained in the updated resource module, is failing.

So while the updated configuration was pulled because of the checksum change, the updated resource is not getting pulled even though its checksum has changed. Should it?

I have “AllowModuleOverwrite=True”.

You’ve specified the required version of the resource module in the config?

Yes I have.

The version number in the .zip file needs to match what is in the .psd1 file . As an example, if my Module is named xComputerManagement_1.2.zip, the ModuleVersion specified in xComputerManagement.psd1 also needs to be 1.2, otherwise it doesn’t work (at least in my experience).

The module .zip file is “FMGlobalDSCResources_1.0_1.0.zip”, and ModuleVersion=“1.0” in the FMGlobalDSCResources_1.0.psd1 file.

I have included a version number in the name of the module containing my custom DSC resources so I can have more than one version of a module installed on a machine. This is why the .zip file has “_1.0_1.0” in the name.

I don’t think that is going to work. If you rename FMGLobalDSCResources_1.0_1.0.zip to FMGlobalDSCResources_1.0.zip does it work? If you want to have more than one version of a module on a machine (which is a reasonable thing to want), why wouldn’t you just name the next version of FMGlobalDSCResources to _1.1 instead of _1.0_1.0 ?

The module name is FMGlobalDSCResources_1.0, so the .zip file needs to be named FMGlobalDSCResources_1.0_1.0.zip. When it is, it successfully got pulled down the first time. When the file was named FMGlobalDSCResources_1.0.zip, it failed to be pulled.

What doesn’t seem to work is updating the same .zip file as well as its checksum. Based on what the LCM writes to the event log on the client server doing the Pulling, it states it already has the resource, so doesn’t appear it checks the checksum file to see if the zipped up resource module has changed.

Ok, that makes sense then. I am out of ideas at this point without being able to see everything for myself. I will keep thinking about it :slight_smile: