Non-Power-Managed Multi-Session VDAs Skipped During Scheduled Reboot Cycles

book

Article ID: CTX696835

calendar_today

Updated On:

Description

1. Run PowerShell on the affected VDA to get its actual boot time:
(Get-CimInstance Win32_OperatingSystem).LastBootUpTime

2.Get Machine SID of the skipped machine

PowerShell
Get-BrokerMachine -MachineName "DOMAIN\MachineName" | Select-Object SID

3. Query the Site Database
Run the following SQL query on the Citrix Site Database to compare database values:
SELECT WI.Sid, W.LastShutdownTime, W.LastRegistrationTime
FROM chb_State.Workers W
INNER JOIN chb_Config.WorkerIndex WI ON WI.Uid = W.Uid

If LastShutdownTime of the machine shows a date in the future, follow the resolution below.

Environment

Direct modification of the Citrix Site Database should be performed with caution. Always perform a full database backup prior to running manual UPDATE statements.

Cause

The Citrix Site Database contains an invalid LastShutdownTime timestamp set to a future date for the affected machine in the chb_State.Workers table.
Because the Broker service sees a shutdown time that is newer than the scheduled reboot window, it assumes the VDA has already completed its reboot and passively skips it during the cycle.

Resolution


1.Perform a manual restart of the affected VDA machine.

2.Once back online, run PowerShell on the VDA to record the new, accurate boot time:
(Get-CimInstance Win32_OperatingSystem).LastBootUpTime

3.Take a backup of the site database.

4.Execute the following SQL query to sync LastShutdownTime with the actual boot time:

UPDATE W
SET W.LastShutdownTime = 'YYYY-MM-DD HH:MM:SS.SSS' -- Insert timestamp from Step 2
FROM chb_State.Workers W
INNER JOIN chb_Config.WorkerIndex WI ON WI.Uid = W.Uid
WHERE WI.Sid = 'S-1-5-21-...'; -- Insert SID obtained from Step 2 in the Details section

Note: Direct modification of the Citrix Site Database should be performed with caution. Always perform a full database backup prior to running manual UPDATE statements.

Issue/Introduction

In Citrix Virtual Apps and Desktops (CVAD 2203 CU7), non-power-managed multi-session VDAs are skipped during scheduled restart cycles.
Delivery Controller (DDC) CDF traces show the affected machines processed under the FinalizePassivelyRebootedWorkers phase and marked "passively shutdown/rebooted".
However, checking (Get-CimInstance Win32_OperatingSystem).LastBootUpTime on the VDA shows the server has not actually rebooted.