Saturday, April 29, 2017

Error: VSS_E_WRITERERROR_TIMEOUT. Error Code = 0x80,042,3f2

SCCM site database maintenance task failed with one of the below error;

After GatherWriterMetadata SMS Writer status = FAILED_AT_PREPARE_BACKUP.
Error: VSS_E_WRITERERROR_TIMEOUT. Error Code = 0x80,042,3f2.

ERROR: SQL Backup task failed. Error message - Asynchronous QueryStatus failed or did not finish properly.
STATMSG: ID=5052 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_SITE_BACKUP" SYS=sccb.w2k8.lab SITE=SCB PID=35284 TID=34312 GMTDATE=Wed Apr 26 23:25:37.402 2017 ISTR0="\\sccb.w2k8.lab" ISTR1="CM_CP1;" ISTR2="Asynchronous QueryStatus failed or did not finish properly." ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
Error: Sql Server could not prepare for the Backup.

Current state of SQL backup: [failed]. Aborting it.
SMS_SITE_BACKUP 4/26/2017 11:25:37 PM 34312 (0x8608)

SMS_SITE_BACKUP failed. Please see previous errors.

Above errors can be seen in smsbkup.log under <CM installDir>\Program Files\Microsoft Configuration Manager\Logs

Below event viewer msgs can be seen on the site database server;

Event ID: 12346
Volume Shadow Copy Error: An error 0x8007000e, Not enough storage is available to complete this operation.
 was encountered while trying to initialize the Registry Writer.  This may cause future shadow-copy creations to fail.

Event ID: 12347
Volume Shadow Copy Service error: An internal inconsistency was detected in trying to contact shadow copy service writers.  The Registry Writer failed to respond to a query from VSS. Check to see that the Event Service and Volume Shadow Copy Service are operating properly, and please check the Application event log for any other events.

   Gathering Writer Data
   Executing Asynchronous Operation

   Execution Context: Requestor
   Current State: GatherWriterMetadata

If we investigate, further;
- COM+ Event System service is running
- Volume Shadow Copy service is running
- SMS_SITE_VSS_WRITER is running and can restart the service without any error
- On the command line run vssadmin list writers  and should list all the writers

When I ran vssadmin list writers on the site server, I have received various vss writers names and with last error. All of the writers showed stable except SMS Writer.
For the SMS Writer, state: [7] Last error: Timed out.

Then ran vssadmin list writers on the Site database server and received empty list.

A quick google showed me various articles to re-register the dll’s to initialise the writers.
However decided to restart the server as it has been up and running for good few months.
After the restart, I re-ran the vssadmin list writers  and this time it showed various writers.

Now initiated backup by starting the SMS_SITE_BACKUP service.
Even though I have received "After GatherWriterMetadata SMS Writer status = FAILED_AT_PREPARE_BACKUP. Error: VSS_E_WRITERERROR_TIMEOUT. Error Code = 0x80,042,3f2." Error in the beginning of the backup process, it has completed the site backup successfully.

The reason for the site database backup failure was, on the site database server the Registry Writer was not present. For some reason all the VSS writers had disappeared from the database server.
After restarting the server, the writers were back and everything worked as normal.

Tuesday, April 11, 2017

How does SCCM Current Branch automatic client upgrade work

Once new client is promoted and deployed to the production machines based on the client upgrade settings, the client machines will upgrade to new client.
If we want to monitor the process as it happens, follow the below steps to see and monitor the progress. Some times it will help us to troubleshoot upgrade issues.

1. After deploying the client to the production using hierarchy settings, on the client machine run Machine policy Retrieval & Evaluation Cycle
2. The existing agent will detect the client version and start processing the upgrade request. Open ccmsetup.log and we see these initial entries;

3. Existing client will query for ccmsetup.exe and download ccmsetup.exe from assigned MP;

4. The machine policy will check for existence of Configuration manager client upgrade task, if doesn’t exist then Configuration manager client upgrade task will be created in scheduled task;

5. Now open the task scheduler and we can see Configuration manager client upgrade task. The newly created scheduled task will run on random timings.

6. For testing or immediate client install, Run the Configuration manager client upgrade task from task scheduler
When we ran the task scheduler, ccmsetup.log (C:\Windows\ccmsetup\Logs)will show ccmsetup is launched by windows task scheduler for client upgrade;

7. Once the setup is initiated, the scheduled task will be deleted from the Scheduled tasks
8. Wait for 5-10 min to complete the installation and check the ccmsetup.log file. 
    It should have ccmSetup is existing with return code 0

Saturday, April 8, 2017

SCCM Check for running executable files before installing an application

With release of SCCM current branch 1702, there is new feature Check for running executable files before installing an application introduced in the console. With this feature we have control on whether to install an application or not when a particular executable is running.
However, by default this feature is not installed when upgraded to 1702 as this is an Pre-release feature.
To get this pre-released feature installed, first enable pre-released features then turn the individual feature on.

Enabling pre-released features in SCCM current branch:
Enabling pre-released feature is a site wide change and once you enable this feature, the options will be greyed out and cannot be undone.
To enable Pre-released feature open SCCM console then go to \Administration\Overview\Site Configuration\Sites then click on Hierarchy settings from the ribbon.

On hierarchy properties window, on the General tab select Consent to use Pre-Release features then click OK.

Now in SCCM console go to \Administration\Overview\Updates and Servicing\Features and select Pre-release - Install Behaviour for applications and right click then select Turn on.

Click Yes on the confirmation window;

To see the newly applied feature close the console and re-open. Then go to \Administration\Overview\Updates and Servicing\Features. Pre-release - Install Behaviour for applications feature status will show as On.

Open one of the existing application deployment types and you can see Install Behaviour tab.
Application deployment type before turning on the Pre-release - Install Behaviour for applications feature;

Application deployment type after turning on the Pre-release - Install Behaviour for applications feature;

Saturday, April 1, 2017

SCCM Current Branch client upgrade

Since SCCM current branch, the deployment of upgrade SCCM client package to the client devices has taken a new approach. Unlike before, we can create a test package and deploy it to the test device as part of the in-console upgrade. Upon successful completion of site upgrade, the pre-production client package will be deployed to the nominated test collection.

We have an other option to configure pre-production client deployment settings from  site hierarchy settings;
Open SCCM console then go to \Administration\Overview\Site Configuration\Sites then click on Hierarchy Settings from the top ribbon

On hierarchy properties window go to Client Upgrade tab, Select Upgrade all clients in the pre-production collection automatically using pre-production client option, then browse to the nominated pre-prod device collection then click Ok.
Make sure Upgrade all clients in the pre-production collection automatically using pre-production box is ticked, otherwise the clients wont get updated automatically.

The other way of configuring the pre-production client deployment is during the installation of the update.
During the update wizard on the client update settings, select option to validate in pre-production collection then enter the pre-production collection name. Once the installation of update is successful then the clients in pre-production collection will be updated to the latest client version.

How to promote the new client to production:
Open SCCM console then go to \Administration\Overview\Updates and Servicing node
Select installed update then click on Promote Pre-production client tab from the top ribbon

On Promote pre-production client window;
Review the Production client version and pre-production client version and Pre-production collection. If everything is good then click on promote.

Click yes when prompted for confirmation;
 Once the client is promoted to production;
- Promote Pre-production Client will be greyed out under \Administration\Overview\Updates and Servicing

- Pre-production client upgrade will be unchecked
 - The production client version will be changed to the latest version
Now, on the hierarchy settings property window, on the Client Upgrade tab select Upgrade all clients in the hierarchy using production client, if  required select Do not upgrade Servers. Also enter required days in Automatically upgrade clients within days field. This is an important settings. If you have many clients using WAN links, then it may flood the WAN links.
When prompted to enable automatic upgrade of all clients in the hierarchy click OK

For my lab i have selected to;
- Upgrade all clients in the hierarchy using production client
- Selected to Do not upgrade servers
- Automatically upgrade clients within days 1

Monitoring Client deployment:
Pre-production and production client deployments can be monitored from  \Monitoring\Overview\Client Status node in SCCM console.
To monitor Pre-production client deployment use \Monitoring\Overview\Client Status\Pre-production Client Deployment node
To Monitor Production client deployment use \Monitoring\Overview\Client Status\Production Client Deployment node.

Note: Once the client is promoted to production, the pre-production client status node will not show any devices.

Wednesday, March 29, 2017

Changes to Updates and Servicing node in SCCM 1702

If you have Installed update 1702 for System Center Configuration Manager, you may not find the Updates and Servicing node in its usual place. It dint go missing though.
From update 1702, the Updates and Servicing node has moved from \Administration\Overview\Cloud Services  to \Administration\Overview\