Jump to content
Welcome to our new Citrix community!
  • 2

VDA Upgrade batch (ADdeploy) in the installer support folder for 7.17 not working


Balaji Muthukrishnan

Question

for long time i have used the ADdeploy batch file available @ Support\AdDeploy (InstallVDA.bat) folder for remotely upgrading the VDA for my persistent VMs...

 

This is how i have done the upgrades (psexec) successfully and with less efforts.... (7.8--> 7.15 CU1 --> 7.15 CU2)

 

When i tried the same for upgrading the VDA for 7.17, i was not able to complete the upgrade. Initially if i initiate the upgrade remotely using psexec its starting the upgrade but keeps rebooting the VDA after 5 mins or so...

 

Link to comment

7 answers to this question

Recommended Posts

  • 4

Fortunately i have found the issue and the reason why its happening from the logs...

After initiating the upgrade first its trying to upgrade Citrix HDX Workstation Service x64 and initiating a reboot and then resuming the installation after a reboot by adding the RunOnce registry entry.

 

This info is found in the XenDesktop Installation.log under %temp%\Citrix\XenDesktop Installer...

~~~~
08:58:24.6890 PROC  : XenDesktopSetup:InstallComponent: Entry, component name = 'ICA for Workstation Services'
08:58:24.6890       : XenDesktopSetup:InstallComponent: About to install component 'ICA for Workstation Services'
08:58:24.6890       : XenDesktopSetup:VerifyCDRoot: Found MediaID file at '\\temp\e$\XenApp_and_XenDesktop_7_17\x64'
08:58:24.7046       : XenDesktopSetup:VerifyCDRoot: Found MediaID file at '\\temp\e$\XenApp_and_XenDesktop_7_17\x64'
08:58:24.7046       : XenDesktopSetup:Media found, Continuing.
08:58:24.7202       : XenDesktopSetup:GetRegValue: Key Opened successfully. Software\WoW6432Node\Citrix\ICAConfigTool
08:58:24.7202       : XenDesktopSetup:GetRegValue: Key Name queried successfully Software\WoW6432Node\Citrix\ICAConfigTool ConfigToolLocation
08:58:24.7202       : XenDesktopSetup:ExecuteIcaConfigurationTool: toolLocation is \\temp\e$\XenApp_and_XenDesktop_7_17\x64\Virtual Desktop Components\IcaConfigurationTool\IcaConfigConsole.exe
08:58:24.7202       : XenDesktopSetup:Starting synchronous process '\\temp\e$\XenApp_and_XenDesktop_7_17\x64\Virtual Desktop Components\IcaConfigurationTool\IcaConfigConsole.exe' with args '/ExecutionMode:DumpConfiguration '
08:58:39.4697       : XenDesktopSetup:Process completed with error code 0x00000000
08:58:39.4697       : XenDesktopSetup:ExecuteIcaConfigurationTool: returnVal 0
08:58:39.5791       : XenDesktopSetup:Version Repository Processing for Removal - Component: Citrix HDX WS x64 (retail)
08:58:39.5791       : XenDesktopSetup:About to remove MSI with product code '{080FE608-C0A8-4397-AB0F-A97D76FA17D1}' (IcaWS_x64) using parameters ''
08:58:39.5947       : XenDesktopSetup:Starting synchronous process 'msiexec' with args '/x "{080FE608-C0A8-4397-AB0F-A97D76FA17D1}" /lv "C:\Users\v079481\AppData\Local\Temp\Citrix\XenDesktop Installer\MSI Log Files\IcaWS_x64_uninstall1600091391.txt" /quiet  REBOOT=ReallySuppress REBOOTPROMPT=Suppress'
09:02:18.6740       : XenDesktopSetup:Process completed with error code 0x00000BC2
09:02:18.6740       : XenDesktopSetup:Reboot level increased on behalf of '{080FE608-C0A8-4397-AB0F-A97D76FA17D1}' from NoReboot to LazyReboot
09:02:18.6740       : XenDesktopSetup:Removal of MSI Product '{080FE608-C0A8-4397-AB0F-A97D76FA17D1}' succeeded
09:02:18.7367       : XenDesktopSetup:Version Repository Remove Component Version Entry - Component: Citrix HDX WS x64 (retail)
09:02:18.7680       : XenDesktopSetup:Reboot level increased on behalf of 'ICA for Workstation Services' from LazyReboot to ImmediateReboot
09:02:18.7837       : XenDesktopSetup:CheckRegKeyExists: RegKey SOFTWARE\Citrix\Citrix Virtual Desktop Agent: Opened Registry Key successfully.
09:02:18.7837       : XenDesktopSetup:SetRegValue: Registry value 1 set successfully SOFTWARE\Citrix\Citrix Virtual Desktop Agent HdxMsiUpgrade
09:02:18.7837       : XenDesktopSetup:InstallComponent: Installed component 'ICA for Workstation Services'

09:02:18.7837 PROC  : XenDesktopSetup:InstallComponent: Exit (return False)
09:02:18.7837       : XenDesktopSetup:Install tasks for this session have finished.
09:02:18.7837       : XenDesktopSetup:Installation partially complete, reboot is required
09:02:18.9090       : XenDesktopSetup:InstallationManager.PrepareInstallationToResumeAfterReboot: Copying meta-installer to folder: C:\ProgramData\Citrix\XenDesktopSetup\
09:02:18.9247 PROC  : XenDesktopSetup:CoreUtilities.CancelPendingDeletion(): Cancelling pending deletion of all files in folder: C:\ProgramData\Citrix\XenDesktopSetup\
09:02:18.9247       : XenDesktopSetup:GetRegValue: Key Opened successfully. SYSTEM\CurrentControlSet\Control\Session Manager
09:02:18.9247       : XenDesktopSetup:GetRegValue: Key Name queried successfully SYSTEM\CurrentControlSet\Control\Session Manager PendingFileRenameOperations
09:02:18.9247       : XenDesktopSetup:None of the files from the requested folder 'C:\ProgramData\Citrix\XenDesktopSetup' is marked for deletion
09:02:27.0374       : XenDesktopSetup:CheckRegKeyExists: RegKey Software\Citrix\MetaInstall: Opened Registry Key successfully.
09:02:27.0374       : XenDesktopSetup:SetRegValue: Registry value C:\ProgramData\Citrix\XenDesktopSetup set successfully Software\Citrix\MetaInstall MetaInstallerInstallLocation
09:02:27.0374       : XenDesktopSetup:InstallationManager.PrepareInstallationToResumeAfterReboot: Adding string value to 'RunOnce' sub-key. Value Name: '!XenDesktopSetup', Value: 'C:\ProgramData\Citrix\XenDesktopSetup\XenDesktopVDASetup.exe'
09:02:27.0844       : XenDesktopSetup:Installation Manager returned PartialSuccessAndRebootNeeded

09:02:27.0844       : XenDesktopSetup:MetaInstaller terminating
09:02:27.1001       : XenDesktopSetup:To complete the process, restart the machine.


~~~~

Thats why in the first reboot after Citrix HDX WS x64 upgrade, VDA was still in unregister state and if i login to the VDA through console, its resuming the installation and then rebooting the VDA to finalize the installation.

 

From the logs its evident that reboot after Citrix HDX WS x64 is for sure, so to work aroud, i have modified the command switch for the VDA to include /NORESUME, so that after installing the Citrix HDX WS x64 its not adding the Runonce registry entry to resume the installation after the reboot.

the /NOREBOOT wont help here...because of this (/NORESUME) i have to run the batch file remotely for each endpoints for the VDA to get successfully upgrade.

 

Note: I you directly run the batch file inside the VDA in a console session, you wont face this issue, as the VDA is going to reboot after installing Citrix HDX WS x64 and after you relogin, its going to resume the installation.

 

Problem comes only if you remotely run the batch file, i guess, this will be applicable to some one who is upgrading the VDA via AD GPO.

  • Like 5
Link to comment
  • 1

Finally i am able to fix/resolve the VDA remote installation using the Support\AdDeploy\installVDA.bat file

 

Somethings has changed in the later versoin (1906 and later version) of VDA installation as I was doing remote installation using (psexec) AdDeploy\installVDA.bat file till 7.8,7.17 and 7.15 without any issues.

When i was using the install.bat file to upgrade VDA 1906.2 to VDA 1912 LTSR CU1 (remote installation using psexec), it keeps failing to install.

 

--From the installation logs, i can see that the VDA forced a reboot after removing the component Citrix HDX WS x64 ({5AF7350F-B7C4-4500-A921-3CC9C2ED606D})

 

~~~~

10:56:14.6530       : XenDesktopSetup:Starting synchronous process 'C:\Virtual Apps and Desktops 1912LTSR-CU1\x64\Virtual Desktop Components\IcaConfigurationTool\IcaConfigConsole.exe' with args '/ExecutionMode:DumpConfiguration '
10:56:18.0209       : XenDesktopSetup:Process completed with error code 0x00000000
10:56:18.0209       : XenDesktopSetup:ExecuteIcaConfigurationTool: returnVal 0
10:56:18.0259       : XenDesktopSetup:Version Repository Processing for Removal - Component: Citrix HDX WS x64
10:56:18.0289       : XenDesktopSetup:About to remove MSI with product code '{5AF7350F-B7C4-4500-A921-3CC9C2ED606D}' (IcaWS_x64) using parameters ''
10:56:18.0299       : XenDesktopSetup:Starting synchronous process 'msiexec' with args '/x "{5AF7350F-B7C4-4500-A921-3CC9C2ED606D}" /lv "C:\Users\80a\AppData\Local\Temp\Citrix\XenDesktop Installer\MSI Log Files\IcaWS_x64_uninstall774934825.txt" /quiet  REBOOT=ReallySuppress REBOOTPROMPT=Suppress'
10:59:05.3379       : XenDesktopSetup:Process completed with error code 0x00000BC2
10:59:05.3389       : XenDesktopSetup:Reboot level increased on behalf of '{5AF7350F-B7C4-4500-A921-3CC9C2ED606D}' from NoReboot to LazyReboot
10:59:05.3389       : XenDesktopSetup:Removal of MSI Product '{5AF7350F-B7C4-4500-A921-3CC9C2ED606D}' succeeded
10:59:05.3399       : XenDesktopSetup:Version Repository Remove Component Version Entry - Component: Citrix HDX WS x64
10:59:05.3399       : XenDesktopSetup:ExecuteIcaConfigurationTool: toolLocation is C:\Virtual Apps and Desktops 1912LTSR-CU1\x64\Virtual Desktop Components\IcaConfigurationTool\IcaConfigConsole.exe
10:59:05.3409       : XenDesktopSetup:Starting synchronous process 'C:\Virtual Apps and Desktops 1912LTSR-CU1\x64\Virtual Desktop Components\IcaConfigurationTool\IcaConfigConsole.exe' with args '/ExecutionMode:PreCleanUp '
10:59:05.6629       : XenDesktopSetup:Process completed with error code 0x00000000
10:59:05.6629       : XenDesktopSetup:ExecuteIcaConfigurationTool: returnVal 0
10:59:05.6639       : XenDesktopSetup:Reboot level increased on behalf of 'ICA for Workstation Services' from LazyReboot to ImmediateReboot
10:59:05.6649       : XenDesktopSetup:CheckRegKeyExists: RegKey SOFTWARE\Citrix\Citrix Virtual Desktop Agent: Opened Registry Key successfully.
10:59:05.6649       : XenDesktopSetup:SetRegValue: Registry value 1 set successfully SOFTWARE\Citrix\Citrix Virtual Desktop Agent HdxMsiUpgrade
10:59:05.6649       : XenDesktopSetup:InstallComponent: Installed component 'ICA for Workstation Services'
10:59:05.6649 PROC  : XenDesktopSetup:InstallComponent: Exit (return False)
10:59:05.6649       : XenDesktopSetup:Install tasks for this session have finished.
10:59:05.6669       : XenDesktopSetup:Installation partially complete, reboot is required

~~~~

~~~~
11:10:05.0470       : XenDesktopSetup:CalculateComponentInstallOrder Entered
11:10:05.0470 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Citrix Diagnostics Facility'
11:10:05.0470 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Microsoft .NET Framework 4.7.1'
11:10:05.0783 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Citrix Telemetry Service'
11:10:05.0783 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'ICA for Workstation Services'
11:10:05.0783 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Microsoft Visual x64 C++ 2017 Runtime'
11:10:05.1251       : XenDesktopSetup:Found installed MSI product upgrade code'{36F68A90-239C-34DF-B58C-64B30153CE35}', product code {E493B8F4-E300-43EC-95D0-BDF3711297EA}, version '14.27.29016'
11:10:05.1564       : XenDesktopSetup:Found installed MSI product upgrade code'{9B0BAA88-E15F-3A1F-ACC0-B206E9DDF71C}', product code {F07B1E25-5670-4556-9C7F-5A1966C83269}, version '14.27.29016'
11:10:05.1564 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Microsoft Visual x86 C++ 2017 Runtime'
11:10:05.1876       : XenDesktopSetup:Found installed MSI product upgrade code'{65E5BD06-6392-3027-8C26-853107D3CF1A}', product code {E2C131AD-D30F-4D67-ACE9-B3D485E84DA8}, version '14.27.29016'
11:10:05.2345       : XenDesktopSetup:Found installed MSI product upgrade code'{C78B8E51-0C65-377E-85D1-282F689FE505}', product code {5CD4E357-9ED6-42AC-B654-F1FC21DD60C9}, version '14.27.29016'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Citrix Browser Content Redirection'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'CSE Component'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Broker Agent'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Machine Management Provider'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Director VDA Plug-in'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'AppDisks VDA Plug-in'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'VDA Monitor Plug-in'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'VDA WMI Proxy Plug-in'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Citrix Authentication Identity Assertion VDA Plug-in'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Citrix Universal Print Client'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Citrix Disconnect Button'
11:10:05.2345 PROC  : XenDesktopSetup:InstallableComponent.Initialize() 'Citrix User Profile Manager'
~~~~

--Though this was the behavior when using installVDA.bat file for remote VDA installation in the earlier version, Executing the install.bat (using psexec) file again will successfully complete VDA installation.


--But when i do the same steps while upgrading VDA to 1912 LTSR CU1, after removing Citrx HDX WS x64 component VM restarts and then i am not able to manage the VM remotely. Not able to take RDP/mstsc. The only option is to login via Hypervisor Console (sometimes its not allowing with message "No Logon server found")

 

--After i login to the VM via Hypervisor console, when i check the services console, many citrix dependent service were not started. Workstation service was not started mainly, i can see crtical citrix service has depedency on Workstation service (Citrix desktop service, Citrix PvS for VM Agent Service and ICA service)

 

--Since Citrix HDX WS x64 component was already removed and workstation service was not starting due to some issue, checked the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall) for some clue. luckily saw the Machine Identity Service Agent component was not removed (PvsVmAgent-Citrix PVS for VM Agent service was also not started due to dependency with workstation service). SO removed the component from uninstall string msiexec /X{5AF7350F-B7C4-4500-A921-3CC9C2ED606D}

 

--After removing the component, i was able to start the workstation service and manage the VM remotely (able to take the VM using rdp/mstsc)

 

--Then the installer Runonce entry kicked in and completed the remote installation.

 

I tried the same with couple of VMs and did the same thing to rectify it.

 

--when running the install.bat file directly on the VM upgrade didnt have any issues. I ran in to these kind of issues only using remote install method using psexec by calling the installVDA.bat file remotely.

 

 

I am not sure if this is the workaround/Fix for the VDA remote installation, but it works perfectly for me and i decided to include the removal of below 2 Components (In the same order as mentioned below. if modified then VM becomes un managed. so uninstall Machine Identity service Agent component first and then Citrix HDX WS x64) before running the batch file in my Powershell script.

 

1. Machine Identity service Agent
2. Citrix HDX WS x64

 

~~~~

Get-CimInstance -ClassName Win32_Product -ComputerName "0D-" | where {$_.Name -like "*Machine Identity Service*"} | Remove-CimInstance
Get-CimInstance -ClassName Win32_Product -ComputerName "0D-" | where {$_.Name -like "*Citrix HDX WS*"} | Remove-CimInstance

~~~~

 

If any one is trying remote installation for VDA upgrade (In my case from VDA 1906.2 to 1912 LTSR CU1) in your script file before calling the installVDA.bat file(Support\AdDeploy\installVDA.bat), make sure to Remove the above 2 Citrix components and then run the install.bat (Support\AdDeploy\installVDA.bat) file. VDA upgrade is working as expected. This helps me in upgrading 2000+ persistent VDA upgrade :)

 

Note: I forgot to mention one more point might be useful for others...

 

when i use the uninstallVDA.bat file (1906_2Alone, did not test with other version uninstallVDA.bat file) to remove the existing VDA installation, it keeps failing in all the test VMs. when i check the uninstall log files, i can see it found VDA, but not matching VDA version.

~~~~

2020-09-13 05:35:59 "SETUP PROCESS BEGIN"       
2020-09-13 05:35:59 "IDENTIFY LOG FILE:" C:\Users\80~1\AppData\Local\Temp\VDA_UNINSTALL_ProcessLog_053558.LOG      
2020-09-13 05:35:59 "SETUP PROCESS END"       
2020-09-13 05:35:59 "PERFORMING NET USE * /d /y"       
There are no entries in the list.

2020-09-13 05:35:59 "PERFORMING NET USE AGAINST SHARE: "       
New connections will be remembered.

There are no entries in the list.

2020-09-13 05:36:00 "PERFORMING NET USE AGAINST SHARE: " \\bware\Logshare      
The command completed successfully.

2020-09-13 05:36:00 "SUCCESS IN MAPPING ALL DRIVES, CONTINUING."       
2020-09-13 05:36:04 "FOUND WORKSTATION"       
2020-09-13 05:36:04 "FOUND 64-bit"       
2020-09-13 05:36:05 "FOUND 10.0"       
2020-09-13 05:36:05 "FOUND WINDOWS 10 CLIENT 64-BIT"       
2020-09-13 05:36:05 "VDA FOUND"       
2020-09-13 05:36:05 "VDA VERSION 7.22.0.14 NOT FOUND"    
  
2020-09-13 05:36:05 "PREPARING TO UNINSTALL..."  

~~~~

 

I had to change the batch file commands for the UninstallVDA.bat file to work. from ( if %errorlevel%==0 (goto VDADETECTED) else (goto VDANOTDETECTED) ) to ( if %errorlevel%==1 (goto VDADETECTED) else (goto VDANOTDETECTED) ). As per my understanding it is not able to query the registry value to determine the VDA version (reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citrix Virtual Desktop Agent" /v "DisplayVersion") remotely. So point to note here is, if anyone is trying remote uninstallation of VDA make sure to change the %errorlevel%==1 for the uninstall VDA to succeed.

 

~~~~

 

REM *************************************************************
REM *************************************************************
REM ********** SUBROUTINE: DETECT_VDA ***************************
REM ********** PROCESSING: DETECTS PRESENCE OF VDA **************
REM **********             BY CHECKING UNINSTALL REGISTRY KEY ***
REM *************************************************************
REM *************************************************************

REM ****************
REM DETECT VDA INSTALL
REM ****************
:DETECT_VDA
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citrix Virtual Desktop Agent" /v "DisplayVersion"
if %errorlevel%==0 (goto VDADETECTED) else (goto VDANOTDETECTED)
goto ENDDETECTVDA
:VDANOTDETECTED

CALL :LOGMSG "VDA NOT FOUND"

SET Detected_VDA=FALSE
goto ENDDETECTVDA

:VDADETECTED

CALL :LOGMSG "VDA FOUND"

SET Detected_VDA=TRUE
goto ENDDETECTVDA
:ENDDETECTVDA

~~~~

Edited by mbalajitry
missed few things to document
  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...