Monday, June 12, 2017

That damn event ID 129

I was getting this event id 129 on several server 2012 R2 systems

Log Name:      System
Source:        LSI_SAS
Event ID:      129
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Reset to device, \Device\RaidPort0, was issued.

and I found this

Changed LSI_SAS to PVSCSI and got:

Log Name:      System
Source:        pvscsi
Event ID:      129
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Reset to device, \Device\RaidPort0, was issued.

Contacted VMware and they blamed on M$, and told me to upgrade the SAS driver.
Went to site and look for newer driver for "Lsi SAS 3801E", that is what the real name of the "LSI Adaptoer, SAS 3000 series, 8-port with 1068"

and failed to find any newer drivers for windows 2012 R2, ended up downloading driver for 2008 R2 and replaced it, but still got the event id 129.

but still getting the 129.

Called M$ and they blamed VMware, ended up doing 3way call with VMware and M$, it was fun to hear them blaming each others, and finally they agreed(!) that it was disk system's problem.

Called SAN manufacture and they said there is no error recorded.

Finally I found that event id 129 recorded only when vsphere replication in active.
Called vmware, still was blaming SAN system, and two days later I got this reply:

"I want you to try one more troubleshooting step, which helps to identify and regulate if vSphere Replication is replicating huge data though there are no changes happening on the VM.

This issue is could also be caused by a GuestOS sent unmap command. 
To disable Unmap in the Guest OS:

Using a Windows CMD window on the Host, run the command:

fsutil behavior set DisableDeleteNotify 1

To re-enable the feature, use the following command:

fsutil behavior set DisableDeleteNotify 0

To verify the current setting, use the following command:

fsutil behavior query DisableDeleteNotify

DisableDeleteNotify=0 - indicates the 'Trim and Unmap' feature is on (enabled)
DisableDeleteNotify=1 - indicates the 'Trim and Unmap' feature is off (disabled)

Kindly try the above steps and update the status to us, Awaiting your response."

Tried the solution and the event id 129 is gone.

BUT, unmap is to reclaim TPVV's space!

I asked if VMware can make changes so when replication happens the replication process ignore the unmap command. Their answer was "We will surely consider  the inputs suggested by your side which helps us to enhance the product"

Hope this help someone and save their time.

Thursday, February 02, 2017

SCCM UEFI OS deployment error 0x80004005

I tried to push Windows 10 through UEFI on SCCM 2016 and got error like this

<![LOG[!sBootDevicePath.empty(), HRESULT=80004005 (e:\qfe\nts\sms\framework\tscore\bootvolume.cpp,34)]LOG]!>
<![LOG[System partition not set]LOG]!>
<![LOG[Unable to find the partition that contains the OS boot loaders. Please ensure the hard disks have been properly partitioned
Unspecified error (Error: 80004005; Source: Windows)]LOG]!>
<![LOG[BootVolume::GetCurrent(pBootVolume), HRESULT=80004005 (e:\qfe\nts\sms\framework\tscore\bootimage.cpp,542)]LOG]!>

The problem was, on "Partition Disk 0 - UEFI" step, I forgot to check "Make this the book disk"

Tuesday, December 13, 2016

How to create a clustered task to repeate

It is not possible to create a task with single trigger with repeat. In stead, you can created multiple triggers. It is not recommended to add it manually using the gui, when the cluster fail over the manually changed/added triggers will be vanished. Always use powershell to insure multiple triggers stay with the task.

In this example I created a resource specific task (R: is clustered disk 2), this task runs on a node where the R: is active.

$action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-executionpolicy bypass -file test.ps1" -WorkingDirectory "R:\scripts"
$triggers = @()
$triggers += New-ScheduledTaskTrigger -Daily -At 04:00
$triggers += New-ScheduledTaskTrigger -Daily -At 08:00
$triggers += New-ScheduledTaskTrigger -Daily -At 15:00
$triggers += New-ScheduledTaskTrigger -Daily -At 22:00
Register-ClusteredScheduledTask –Cluster fileClusterServer –TaskName testTask –TaskType ResourceSpecific –Resource "cluster disk 2" –Action $action –Trigger $triggers

The script below is a bit messy but it creates a clustered task that runs on every hour

$action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-executionpolicy bypass -file test.ps1" -WorkingDirectory "R:\scripts"
$triggers = @()
for ($i=0; $i -le 23; $i++)

[string] $j = $i
if ($i -le 9)
$j = "0"+ $j

$taksTriggerTime = $j

$taskTime = $j + ":00"

$triggers += New-ScheduledTaskTrigger -Daily -At $taskTime

Register-ClusteredScheduledTask –Cluster fileClusterServer –TaskName testTask –TaskType ResourceSpecific –Resource "cluster disk 2" –Action $action –Trigger $triggers  

Note: the resource specific task will run under the system (node), if fail over happens the active node's system account will run the task, folder security will change automagically so you don't have to add all nodes to folder's security tab.
It is not possible to make the task run under some sort of a service account at this point. It runs under only system account.

Friday, October 28, 2016

How to change SCCM reserve disk space for a DP

1) Run SQL query:

select SCR.ID, SCR.Name,SC.NalPath, SCR.Value3 from sc_sysresuse_property SCR join sc_sysresuse SC on SCR.SysResUseID = SC.ID where = 'MinFreeSpace' and SC.NALPath like '%%' and SC.RoleTypeID = 3

get SCR_ID

2) Use the returned ID in step 1). Run the below query to update the 'MinFreeSpace' value.
update sc_sysresuse_property set value3 = 'set desired value in MB' where name = 'MinFreeSpace' and ID = ''
update sc_sysresuse_property set value3 =10240  where name = 'MinFreeSpace' and ID = xxxxxxxxxxxxx

3) Change registry value HKLM\software\Microsoft\SMS\DPreserveddiskspace to match the  number you used on step 2, eg: 10240. 

You don't have to reboot the DP.

Restart the SMS_SITE_Component_Manager service on SCCM site server.

Monday, October 17, 2016

SCOM 2012 r2 console crash after windows patch

After I installed Oct 2016 windows patches
I got this error whenever I tried to open "windows Computers" under "Monitoring"

Application log:
Faulting application name: Microsoft.EnterpriseManagement.Monitoring.Console.exe, version: 7.1.10226.1177, time stamp: 0x5697e092
Faulting module name: ntdll.dll, version: 6.1.7601.23543, time stamp: 0x57d2fde1
Exception code: 0xc000041d
Fault offset: 0x000000000004ef57
Faulting process id: 0x18a0
Faulting application start time: 0x01d228f4261a1d54
Faulting application path: C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Console\Microsoft.EnterpriseManagement.Monitoring.Console.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 7a5e2e0a-94e7-11e6-ab30-0050569b0035

SCOM console logs:

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: Microsoft.EnterpriseManagement.Monitoring.Console.exe
  Application Version: 7.1.10226.1177
  Application Timestamp: 5697e092
  Fault Module Name: ntdll.dll
  Fault Module Version: 6.1.7601.23543
  Fault Module Timestamp: 57d2fde1
  Exception Code: c0000005
  Exception Offset: 000000000004eef1
  OS Version: 6.1.7601.
  Locale ID: 1033
  Additional Information 1: 383a
  Additional Information 2: 383a5f09f3fd70a29b8be053663a1d2a
  Additional Information 3: 0ebe
  Additional Information 4: 0ebe29effad583805ef4413487a5a75f

Read our privacy statement online:

If the online privacy statement is not available, please read our privacy statement offline:

It seems "October 2016 security monthly quality rollup" is causing the issue
KB3192392 for Windows 8.1 and Server 2012 R2
KB3185332 for Windows server 2012
KB3185330 for Windows server 2008 R2

Remove the KB and restart the SCOM server and it will be fixed.

Saturday, October 15, 2016

Clustered task in Windows server 2012 R2 with 0x1 error

I tried to create a clustered task and got 0x1 error, according to M$ it means

0x1: An incorrect function was called or an unknown function was called. (ref:

This is the original script that generated 0x1 error

$action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "runme.ps1" -WorkingDirectory "E:\Shares\scripts"

E: is a clustered disk and I got 0x1 error when I execute the task manually.

Later I found that it has to do with execution policy, so I have changed it to

$action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-executionpolicy bypass -file runme.ps1" -WorkingDirectory "E:\Shares\scripts"

and it ran without error.

Here is the complete script to create the task
$action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-executionpolicy bypass -file runme.ps1" -WorkingDirectory "E:\Shares\scripts"
$trigger = New-ScheduledTaskTrigger -Daily -At 3pm
Register-ClusteredScheduledTask –Cluster filesharecluster –TaskName MyResourceSpecificTask –TaskType ResourceSpecific –Resource "cluster disk 2" –Action $action –Trigger $trigger

and this is what the runme.ps1 looks like, as you can see you can run dos command and powershell

dir c:\ | export-csv "e:\shares\scripts\result.csv"

somehow trying to to run bat file also generated 0x1 error, some suggested that the account that runs the task needs to be in "logon as a batch" job in local security policy but I have not tried it yet.

Friday, July 15, 2016

New-RDSessionDeployment : Validation failed for the "RD Connection Broker" parameter

I had this error when I tried to deploy a RDS 2012 R2

PS C:\Users\admin> New-RDSessionDeployment -ConnectionBroker xxx.test.local -SessionHost xxx.test.local
New-RDSessionDeployment : Validation failed for the "RD Connection Broker" parameter.
xxx.test.local      Unable to connect to the server by using Windows PowerShell remoting. Verify that you can
connect to the server.
At line:1 char:1
+ New-RDSessionDeployment -ConnectionBroker xxx.test.local -SessionHost xxx.te ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-RDSessionDeployment

I googled and googled and found no cure...until I tried this...disable IPv6

and tried it again, and it worked. Close the current PowerShell and open a new one after you disabled the IPv6.