April 19, 2015 at 10:18 am #24443
Here is the situation. On a freshly installed W2012R2 server I have configured this:
– 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
April 21, 2015 at 3:58 am #24492
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.
April 21, 2015 at 4:32 am #24499
Thank you Don. And if I would change the LCM's ConfigurationModeFrequencyMins to 15 minutes? Would that help (a little bit)?
April 21, 2015 at 4:38 am #24501
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.
April 21, 2015 at 4:40 am #24502
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?
April 21, 2015 at 5:02 am #24506
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.
April 15, 2016 at 1:37 am #37811
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
+ CategoryInfo : NotSpecified: (The WS-Manageme...service or the
:String) , RemoteException
+ FullyQualifiedErrorId : NativeCommandError
WMI provider returned an unknown error: HRESULT 0x800706be
April 15, 2016 at 11:44 am #37863
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.
April 16, 2016 at 2:21 am #37877
I am using Powershell v4.0 for this, and this is push configuration. This is a random issue, it doesn't happen every time.
April 17, 2016 at 10:45 pm #37923
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?
April 21, 2016 at 9:20 pm #38139
I am using windows 2012R2 which already has all the powershellv4.0 installed. so this will not work for R2.
April 22, 2016 at 3:19 pm #38189
April 24, 2016 at 8:28 pm #38199
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.
April 24, 2016 at 9:02 pm #38200
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.