DSC Reboot Loop

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Jeffrey Patton Jeffrey Patton 2 years, 1 month ago.

  • Author
    Posts
  • #25883
    Profile photo of Jeffrey Patton
    Jeffrey Patton
    Participant

    I have created a DSC to prepare a server to host Active Director Group Policy Management. As we're moving to using DSC to maintain configurations of servers this seemed an easy one. There are a handful of features that are required for the service as well as a handful that we want on the system. Additionally I need to make sure there is an archive folder, and that the windows\temp directory is available.

    I have set ensure=present to all features I need and ensure=absent to all features I don't need. What I see is that my machine want's to reboot all the time. The output below shows that the server state is pending reboot, and when I reboot the server, it goes back and re-applies the configuration and then needs to reboot again.

    I'm not sure what the issue is considering that all features required are in fact installed and the directories I need are present. I'm very open to any suggestions that anyone has.

    I have the following DSC

    This the LCM
    PS C:\Windows\system32> Get-DscLocalConfigurationManager

    ActionAfterReboot : ContinueConfiguration
    AllowModuleOverwrite : False
    CertificateID :
    ConfigurationID :
    ConfigurationMode : ApplyAndMonitor
    ConfigurationModeFrequencyMins : 15
    Credential :
    DebugMode : {NONE}
    DownloadManagerCustomData :
    DownloadManagerName :
    LCMCompatibleVersions : {1.0}
    LCMState : PendingReboot
    LCMVersion : 1.0
    RebootNodeIfNeeded : False
    RefreshFrequencyMins : 30
    RefreshMode : PUSH
    PSComputerName :

    On this system RebootNodeIfNeeded is set to false, so it doesn't bounce, on my test system this is set to true and that server reboots every few minutes or so.

  • #25884
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    You should check your DSC Operational event log to be sure, but one possibility based on just seeing the configuration is that one of your "Present" WindowsFeature resources is installing some sub-feature, which you then later have marked as "Absent". This could result in the system just constantly installing and uninstalling the same feature, and the uninstall may require a reboot to complete.

  • #25885
    Profile photo of Jeffrey Patton
    Jeffrey Patton
    Participant

    Good point Dave, I'll double-check that. Originally I thought perhaps it was unhappy with the windows\temp folder. this should be easy enough to check

  • #25886
    Profile photo of Jeffrey Patton
    Jeffrey Patton
    Participant

    That was it, the following features were ensure=absent on mine, flipped to ensure=present and rebooted and it appears much happier now 🙂

    note to self, don't just assume the doc tells you all the features (+ dependencies) required...check em.

    WindowsFeature NETFrameworkFeatures
    {
    Name = "NET-Framework-Features"
    Ensure = "Present"
    }
    WindowsFeature NETFrameworkCore
    {
    Name = "NET-Framework-Core"
    Ensure = "Present"
    }
    WindowsFeature NETFramework45ASPNET
    {
    Name = "NET-Framework-45-ASPNET"
    Ensure = "Present"
    }
    WindowsFeature PowerShellV2
    {
    Name = "PowerShell-V2"
    Ensure = "Present"
    }

You must be logged in to reply to this topic.