VDA upgrade failure when deployed through SCCM

VDA upgrade failure when deployed through SCCM

book

Article ID: CTX297141

calendar_today

Updated On:

Description

VDA deployment using SCCM


Instructions

Based on previous cases SCCM packages are usually run in the system context. This can cause problems because we assume the installer is run in a user context and the user will login a second time to complete the install if a reboot is required.
 
An installation of a VDA is divided into two main parts:
 
1.            Installation of the prerequisites
2.            Installation of the VDA
 
 The installer automatically installs and enables Remote Desktop Services role services, if they are not already installed and enabled.
 
The installer automatically deploys the following requirements:
 
•             Microsoft .NET Framework
•             Microsoft Visual C++ Runtimes, 32 and 64 bit
 
 
 
When this is finished, you see the following:

 
 
This is also documented in https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/1912-ltsr/install-configure/install-command.html
                                “By default, when a machine restart is needed during an installation, the installer resumes automatically after the restart completes.”
 
To do this, the installer creates the following registry entry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

 
 
By design, “Run and RunOnce keys are run each time a new user logs in.” this must be an interactive logon i.e. this will not be triggered by the system account https://msdn.microsoft.com/en-us/library/windows/desktop/aa376977(v=vs.85).aspx
 
This can cause an issue if the SCCM sequence is run as "system" as this resume of the installer will not be triggered on reboot.
You will also leave behind a runonce key which will then be run on the next "user(interactive)" logon
 
To override the default, specify the noresume parameter:  https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/1912-ltsr/install-configure/install-command.html
 
noresume - prevents the VDA from creating this registry key
 
We simply have to run the installer a second time using a second task sequence to finish the install
 
Task sequence with SCCM:
 
1.            install VDA: XenDesktopVDASetup.exe /noreboot /quiet /components VDA /noresume
2.            Exit code 3
Reboot
3.            Run the same command a second time VDA: XenDesktopVDASetup.exe /noreboot /quiet /components VDA /noresume
Exit code 0
Reboot
 
 

Environment

Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.