CVAD 2203 CU6 || Installing VDA (2203 CU7) using SCCM fails due to wrong Exit Code and results in endless Reboots of the Server

book

Article ID: CTX695811

calendar_today

Updated On:

Description

CVAD 2203 CU6 || Installing VDA (2203 CU7) using SCCM fails due to wrong Exit Code and results in endless Reboots of the Server


There is a long standing bug [CVADHELP-22944] in the Meta Installer that will return 3 (PartialSuccessAndRebootNeeded) instead of an 8 (SuccessRebootNeeded).
 
- Engineering are aware of this issue.
 
- You will the event in the log: XenDesktopSetup:NOTE: Changing return code from SuccessRebootNeeded (8) to PartialSuccessAndRebootNeeded (3)
 
- It now returns ExitCode 3 but writes ExitCode 8 (SuccessRebootNeeded) into HKLM\SOFTWARE\Citrix\MetaInstall\ExitCode
 
 
 
 
Because installation never returns 0, SCCM thinks installer is still incomplete -> triggers reboots forever
 
- The registry value proves the VDA installation is actually finished but the CLI layer is broken.
 
- Exit code 3 = PartialSuccessAndRebootNeeded normally means: “Reboot and rerun installer until exit 0”.
 
- But now the MetaInstaller changes cause ( All sub-components are installed successfully but the wrapper still reports “pending reboot needed” even after reboot, so it never transitions to Success (0) )
 
- This is why [echo %ERRORLEVEL%] = 3, but registry shows [HKLM\SOFTWARE\Citrix\MetaInstall\ExitCode = 8]

Cause

There is a long standing bug [CVADHELP-22944] in the Meta Installer that will return 3 (PartialSuccessAndRebootNeeded) instead of an 8 (SuccessRebootNeeded).
 
- Engineering are aware of this issue
 
- You will the event in the log: XenDesktopSetup:NOTE: Changing return code from SuccessRebootNeeded (8) to PartialSuccessAndRebootNeeded (3)
 
- It now returns ExitCode 3 but writes ExitCode 8 (SuccessRebootNeeded) into HKLM\SOFTWARE\Citrix\MetaInstall\ExitCode

Resolution

Overview
------------

Registry ExitCode  Meaning
8                SUCCESS + reboot needed (final state for CU7)
0                Success
3                PartialSuccess (continue if first or second run)
9                FileLockReboot
 
 

So SCCM logic should be:
 
- If ExitCode in [0, 8] = SUCCESS 
- Else = FAIL or RETRY
 
** This prevents re-run loops **
** Modify SCCM logic to treat registry ExitCode 8 as success, or check registry instead of CLI exit codes **
 
 
 
 
Example shows the installation sequence.
 
SCCM TASK1: Prepare the machine by restarting the machine.
 
SCCM TASK2: Start the VDA installation.
- Add the /quiet, /noreboot, and /noresume options to your command line options.
- Run the VDA installer of your choice (local image or one of the minimal installers).
- Check if CitrixVirtualDesktopAgent.xml exists in the directory location C:\ProgramData\Citrix\XenDesktopSetup.
- If xml is not present, then installation is successful, reboot VDA.
- If xml is present then restart VDA and continue install.
 
SCCM TASK3: Continue VDA installation.
If CitrixVirtualDesktopAgent.xml exists in the directory location C:\ProgramData\Citrix\XenDesktopSetup, the installation must be continued after the restart completes.
 
SCCM TASK3 repeats until CitrixVirtualDesktopAgent.xml does not exist in the directory location C:\ProgramData\Citrix\XenDesktopSetup.
 
- Resume the VDA installation by running the appropriate VDA installer (XenDesktopVdaSetup.exe for most cases, or XenDesktopRemotePCSetup.exe if VDAWorkstationCoreSetup.exe the was previously used) 
 
- Watch for the return code from the VDA installer.
0, 3 or 8: Success, installation complete, restart required.
 
 
** Treat any other return code as an error, and SCCM TASK3 should report an error and end. **
 
 
 
 
 
 
If the [CitrixVirtualDesktopAgent.xml] or directory to this file is not present if means:
 
1) The VDA uninstallation is complete
2) The VDA installation is complete
 
 
The only reason the directory & file would be present is if during an installation or upgrade (the file is created):
 
- Only when the workflow of installation or upgrade is incomplete (is when this file exists).
 
- In the example we were experiencing the need for install code 3 (reboot required).
 
 
  ** If the file / directory does not exist, then the installation & upgrade is complete.**
 
 
 
 
In Short
-----------
 
- If the execution returns an install code 3 & the presence of [CitrixVirtualDesktopAgent.xml ] under [%programdata%\Citrix\XenDesktopSetup] still exists – A reboot is required.
 
** If the [CitrixVirtualDesktopAgent.xml ] under [%programdata%\Citrix\XenDesktopSetup] no longer is present (Uninstallation should be successful) **

Issue/Introduction

CVAD 2203 CU6 || Installing VDA (2203 CU7) using SCCM fails due to wrong Exit Code and results in endless Reboots of the Server