Executing Start-DSCConfiguration WM-Management Error

This topic contains 13 replies, has 4 voices, and was last updated by  Nitin Gupta 1 year, 5 months ago.

  • Author
    Posts
  • #24443

    Richard Diphoorn
    Participant

    Here is the situation. On a freshly installed W2012R2 server I have configured this:

    – Computername
    – VMware Tools Installed
    – DSC resource xNetworking copied inside the VM ( it's a VMware VM, and the resource is copied using the PowerCLI cmdlet Copy-VMGuestFile )
    – Made a mof which configures the IP settings in the VM.

    When executing Start-DscConfiguration -Wait -Force -Path *.* -Verbose the first time, all is working as expected. The IP settings get configured. But, as I'm testing some stuff in this particular case, I'm modifying the mof file a lot of times, and I am setting the configuration on the NIC back to DHCP, so that it can get configured again.

    Then when executing Start-DscConfiguration -Wait -Force -Path *.* -Verbose again, I am receiving random error messages ( see also the attached screenshot ):

    Error Message 1:
    "PowerShell DSC resource MSFT_xIPAddress failed to execute Test-TargetResource functionality with error message: Cannot set or find valid IPAddress using InterfaceAlias Ethernet and AddressFamily IPv4"

    Error Message 2:
    "The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error: HRESULT 0x800706be"

    After a few tries applying the configuration with Start-DscConfiguration, the configuration gets suddenly applied.

    What I noticed, if I delete all *.mof in C:\Windows\System32\Configuration\, the push action executes successfully all the time.

    Not sure if this a bug, or that I am doing something wrong and the described behaviour is expected?

    Also I posted this to connect: https://connect.microsoft.com/PowerShell/Feedback/Details/1251766

  • #24492

    Don Jones
    Keymaster

    Keep in mind that DSC's "use case" isn't really quickly and repetitively running the configuration; it "wants" to do it only every 30 minutes or more. So you may just be running into transitional states that, in a normal production environment, wouldn't be a thing.

  • #24499

    Richard Diphoorn
    Participant

    Thank you Don. And if I would change the LCM's ConfigurationModeFrequencyMins to 15 minutes? Would that help (a little bit)?

  • #24501

    Don Jones
    Keymaster

    It won't accept values under 30 minutes. That's the hardcoded minimum. You can have it check a pull server every 15 minutes, but running the config is a half-hour.

  • #24502

    Richard Diphoorn
    Participant

    Ok, then I have a little challenge to solve. Can you give me some advice to look at, on how to test MOF files in a rapid way? Is Pester suitable for this in your opinion?

  • #24506

    Don Jones
    Keymaster

    There's actually a Connect ticket for a command to do that 🙂 https://connect.microsoft.com/PowerShell/feedback/details/859828/dsc-mof-resource-validation-command natively, no. Pester isn't a MOF validation per se, but you can certainly use it to set up test cases that examine a MOF.

    But the MOF syntax isn't _often_ the problem. What I do is test inside a VM, and I have a snapshot that I take just before I shove the MOF into the VM. That way I can roll back easily, run Start-DscConfiguration, and it'll "take" immediately since DSC hasn't been running.

  • #37811

    Lokesh Jangir
    Participant

    Hi All,
    I am also facing the same issue. I am using push method for configuration. My DSC is renaming the computer and installing ADC on aws instance. Rename works very well but after the restart the configuration of ADC(Secondary DC in Domain) fails with this error-

    powershell.exe : The WS-Management service cannot process the request. The WMI
    service or the
    At line:1 char:1
    + powershell.exe -WindowStyle Hidden -command Resume-AWSVMDSCExtension
    -Administra ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
    + CategoryInfo : NotSpecified: (The WS-Manageme...service or the
    :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

    WMI provider returned an unknown error: HRESULT 0x800706be

  • #37863

    Nitin Gupta
    Participant

    Error code 0x800706be generally indicates that Local Configuration Manager crashed.
    Are you using disconnected session (Disconnect-PSSession) in any of the resource? If you are then this is a known issue in WMF 5.0 RTM.

  • #37877

    Lokesh Jangir
    Participant

    Hi Nitin,
    I am using Powershell v4.0 for this, and this is push configuration. This is a random issue, it doesn't happen every time.

  • #37923

    Nitin Gupta
    Participant

    There are some known problems with WMF 4.0 which are fixed in WMF 4.0 update and can be obtained from https://blogs.msdn.microsoft.com/powershell/2016/01/19/windows-management-framework-wmf-4-0-update-now-available-for-windows-server-2012-windows-server-2008-r2-sp1-and-windows-7-sp1/.
    Can you install WMF 4.0 update if possible and try?

  • #38139

    Lokesh Jangir
    Participant

    I am using windows 2012R2 which already has all the powershellv4.0 installed. so this will not work for R2.

  • #38189

    Nitin Gupta
    Participant

    For 2012R2 you can install KB3000850 (https://support.microsoft.com/en-us/kb/3000850) which is equivalent of WMF 4.0 update.

  • #38199

    Lokesh Jangir
    Participant

    Hi Nitin,
    Did you ever face this issue or did you work on this type of issue ?
    For your kind information i want to let you know that Windows 2012R2 release comes with all these WMF4.0 updates preinstalled. Thanks for response.

  • #38200

    Nitin Gupta
    Participant

    Hi Lokesh,
    It is both. Good to know. This KB came way later than 2012R2 RTM, may be now it is pre-installed in newer images.
    I have occasionally seen crashes where if the configuration is compiled on WMF 5.0 RTM (or equivalent) and sent to nodes with WMF 4.0. So far I have not found any way out of it other than doing compilation also on WMF 4.0 node.

You must be logged in to reply to this topic.