This article explains how to configure PVS vDisk Update Management using SCCM. It is assumed that SCCM is installed and configured.
It is highly advised to designate an OU for the PVS auto update client and limit SCCM access to this OU only.
Complete the following steps:
Create a client custom device setting and set “Additional software manages the deployment of applications and software updates” to Yes.
Note: Provisioning Services only supports pushing Windows updates and applications using .msi based installers. Packages using .exe based installers are not supported because this method of pushing software is not controlled by the device settings permitting third party software to manage updates.
Create a new Device in the PVS Console.
Create an AD Machine Account in the OU managed by SCCM.
Set the Access Mode of the vDisk to Private Image mode.
Add SCCM administrator and the SCCM server into the local admin group of the PVS target device.
Once the target device has been discovered in the SCCM console, push the SCCM client to the target device.
Note: The installation of SCCM client can take as long as one hour.
Verify the SCCM client is active before proceeding.
Create a Device Collection in SCCM and make the target device a member of this collection.
After the client has appeared as active in SCCM, shut it down.
In PVS Console change the Access Mode to Standard Image Mode.
In the PVS console, delete the machine account from AD using PVS.
Delete the client record in the PVS console.
Enable automatic vDisk updates in site’s properties. (Farm > Sites > Your site)
Note: This is only supported in a virtual environment. (The update client has to be a virtual machine)
In the host node (Farm > Site > Your site > Host), create a host record using the Virtual Host Connection Wizard.
ESX – The PVS server needs to have a self-signed cert with the vCenter server.
SCVMM – SCVMM console needs to be installed and restart the Citrix PVS Soap server.
XenServer – no additional steps needed.
Create a managed vDisk record (Farm > Site > Your site > vDisk Update Management > vDisks). Managed vDisk is the PVS vDisk that will be involved in the update. This is the vDisk assigned to the PVS client in step 2.
In the vDisk Select screen, only vDisks that are in standard image mode will appear for selection. In the Host/VM page, choose the host created step 13 and enter the name of the VM created in step 2. This is case sensitive.
In the Active directory page, pick the SCCM OU created earlier.
Create an update task. Follow the Update Task Wizard and use the managed vDisk assigned to the PVS Device in step 2. This wizard allows user to pick the time to update and the version that will be created when the update is successful. By default, these steps will allow Provisioning Services to create a client record (the client record is not visible in the PVS console). The client record will be associated with the managed vDisk. Both of these records are created using the info provided in earlier steps. A maintenance version of the vDisk will be created.
Run the update task. The PVS server will wait for 60 seconds before booting the update client in maintenance mode. The client will wait for a total of 60 minutes (this is adjustable, see section 5).
In SCCM deploy updates to the PVS target device, the system will reboot if necessary. When creating the application in SCCM set the Deployment Purpose to Required. If the update is successful, the client will shut down after 60 minutes and the maintenance version will be promoted or stay in maintenance mode, depending on the user’s choice during the Update Task wizard in step 17. If the update failed, no updates were found, or the task is cancelled, the maintenance version will be deleted.
After running an update task, user can view the status of the update task by right-clicking on the managed vDisk that was used for the update and choose the option “Completed update status…”. This screen will show the status of the last update task run using the managed vDisk. This status can be completed/success, timed out, cancelled, etc.
Edit: When using SCCM to perform updates, there is a timeout that is default to 60 minutes. If you have big updates to apply, then 60 minutes won't be enough to finish.
Changing this timeout with the registry key mentioned below won't work and there will still be a timeout after 60 minutes so you won't be able to perform your upgrades.
The method to increase this timeout is as follow:
On the PVS console, expand Views, right click on Hosts and select Virtual Host Connection Properties
Then increase the value for "Update Timeout" (see below)
After a successful update, if a maintenance version of the managed vDisk is created (or if it is already in maintenance mode), manually boot the update client. The client will automatically boot in maintenance mode.
The following registry keys are used to control various aspects of Provisioning Services that will be useful to debug various issues:
This registry key allows PVS to keep the maintenance version even if the timeout of 60 minutes expires or other errors occur. This is useful for debugging.
HKLM\Software\Citrix\ProvisioningServices\DiskProvider
KeepVersionOnError REG_DWORD 0 to delete, 1 to keep the maintenance version.
This registry controls how long PVS server will wait before shutting down the PVS client regardless of whether updates are successful or not.
HKLM\Software\Citrix\ProvisioningServices\ImageUpdate
UpdateTimeout REG_DWORD time in minutes, minimum is 10, default is 60.
This registry will delay the start of the update VM once an update task is executed. This is done because in some PVS environments with lots of vDisks, versions, and servers, the inventory service does not add the newly created maintenance version used for update fast enough.
HKLM\Software\Citrix\ProvisioningServices\XipProcessor
StartVMDelay REG_DWORD time in seconds, default is 60.
On the update target device check for SCCM2012.log under %programdata%\Citrix\Provisioning Services. This file records the different actions the CCM client runs and can be used to determine where the process fails.
To not check for an action create a registry value for one of the actions in the following key:
HKLM\Software\Citrix\ProvisioningServices\ImageUpdate
The values for the actions are DWORDs with 0 being disabled and 1 being enabled. The default value is 1 (to check for the action) if the value is not present.
Actions:
"Application Global Evaluation Task"
"Discovery Data Collection Cycle"
"Request & Evaluate Machine Policy"
"Request & Evaluate User Policy"
"Hardware Inventory Collection Cycle"
"MSI Product Source Update Cycle"
"Software Inventory Collection Cycle"
"Software Metering Usage Report Cycle"
"Standard File Collection Cycle"
"Software Updates Assignments Evaluation Cycle"
"Updates Source Scan Cycle"
In the above example where the process is stuck on Updates Source Scan Cycle, create the following key HKLM\Software\Citrix\ProvisioningServices\ImageUpdate and create a DWORD “Updates Source Scan Cycle” and set it to 0.
The vDisk has to be in Private Image Mode first otherwise the setting will be lost.