Sep 272017
 

Tick tock, tick tock. June 30th, 2018 is fast approaching and will be here before we know it. If you are anything like me, you still have plenty of old 2008R2 XenApp 6.5 farms lying around. I’m sure you have seen all the articles like this, this, this, and this. These are great resources on how to migrate your XenApp 6.5 farm information into a 7.x site collection. However, everything I have read is missing a critical piece of information that I needed in my environment. How do I get my existing session hosts migrated into this 7.x site collection? I have seen this Citrix article that states the basic premise, however most things I have read/heard state that you should always install a clean VDA and reinstall your applications.  For my environment, this just is not feasible.  I have hundreds of applications across dozens of customers and Active Directory forests. Many of these applications were difficult to install on XenApp in the first place. Some of them required software vendor coordination to install. There is the issue of license key transfer, etc. etc. Too many issues arise for this to work in any sane amount of hours. For my needs, I needed to figure out a consistent way to move my workers from 6.5 to 7.x. I needed to upgrade my hosts, plain and simple. If you have ever tried to uninstall XenApp 6.5, it does not do a very good job, sadly.  It leaves a lot of remnants that the 7.x installation detects and then fails to install the VDA.  A LOT.

I developed a process that does the following:

  • Uninstalls XenApp 6.5 (For real)
  • Upgrades 2008R2 to 2012R2
  • Installs the VDA

I will be sharing with you the uninstallation of XenApp 6.5.  I spend countless hours (less than my estimate of fresh install, exponentially, of course) on this process figuring out what pieces 7.x detects and going back to the uninstallation to add the removal of that piece to the script.  A lot of the things I found needed to be uninstalled in a specific order, or other pieces would fail.

The first part of this script uninstalls all 7 Rollup Packs, in reverse order.

The next part of the script does the uninstallation of on XenApp 6.5.

The next part of the script does uninstallation of all of the crap that is left after this uninstall.

During testing I ran through this uninstallation at least 50 times. I took a snapshot of the XenApp 6.5 system, tested the uninstall, reverted to the snapshot and tested again. The insane thing is that I would get different results, and different failures, randomly throughout my testing. What is the definition of insanity? “Doing the same thing over and over again expecting different results” Well, I guess I’m officially insane. Due to this, I added 2 more XenApp 6.5 servers to my testing in order to see what other failures this process may uncover. This was a smart idea, because I found many more things that needed to be scripted in an attempt to catch them all. So many orphaned services, registry keys and files left, randomly after each uninstall. Frustrating! Most were only found until after the 2012R2 upgrade and trying to install the VDA and digging into the logs for specific failures. VERY frustrating! I was tempted to hit the bottle many times at work during this process.

This next part was annoying and odd, and may not be necessary in your environment. I had a bitch of a time getting some of the C++ redistributables uninstalled. These are a critical component of XenApp 6.5 AND 7.x. If these are not removed cleanly, the VDA installation process fails miserably. I was not able to uninstall mine as they kept pointing to the original installation directory that did not exist anymore. I ended up downloading the installation files to a directory on the C: and changing the registry to point the installation to that location. Sigh.

This portion uses the PowerShell module Expand-ZIPFile to extract the installation files to the C:. I have attached everything at the end of the article. You can use whatever method you would like to extract the files. Please note the .reg file sets the install (uninstall) directory to C:\.

After these files are in place, I am able to successfully uninstall these C++ components.

After this portion. Reboot. Finally. This process takes a good half hour, at least, depending on your hardware.

Lastly, there is a cleanup script that removes all the orphaned services, registry keys, and files that I found to be left during multiple uninstall attempts. It also removed the Remote Desktop Services role.

Reboot. This part of the script doesn’t take long at all. This should now give you a clean slate (tabula rasa) in which you can upgrade and install the VDA.

The rest of the process is pretty self-explanatory. You do an in-place upgrade of 2008R2 to 2012R2. Then install the VDA. There is a lot more to it, and I can post a write-up if comments demand it.

I have attached the scripts/files to github. Thanks to braynyac (Tim Riegler) for posting them for me.

I hope this has been helpful to some of you. This was very time consuming and I hope I have saved some of you a ton of time who are in the same situation as we are in our XenApp 6.5 environment.

Have fun!

Link to all github with all files.

  9 Responses to “XenApp 6.5 to 7.x Migration. How To Move Your XenApp Workers. For Real!”

  1. Hi
    thanks a lot for all your work ! i’ve not yet tested your script in our Farm but it should be made next week
    i’ve another question, i’ve migrated (for testing) 4 Xenapp6.5 server (worker) using the Wizard located in the Xendesktop 7.15 LTSR Iso
    when i use autorun.exe, it detects Xenapp6.5 and ask me to uninstall it, and install VDA
    this process is a little bit long, with 2 reboot but it has never failed….
    BUT, i don’t know exactly what is made by the wizard !!
    have you logged all steps ?? it can be very helpfull…

    Tks again for your work 🙂

    • That is the same problem I ran into as well. However, in many circumstances, the 7.15 iso will not uninstall the 6.5 components correctly. That is why I developed this script. I have not logged the steps of the install wizard, no.

  2. Thanks Ryan
    Cou you share your vda install script ? i would like to full automate…
    i’m using it

    SET OPTIONS=
    SET OPTIONS=/QUIET
    SET OPTIONS=%OPTIONS% /NOREBOOT
    SET OPTIONS=%OPTIONS% /VIRTUALMACHINE
    SET OPTIONS=%OPTIONS% /COMPONENTS VDA
    SET OPTIONS=%OPTIONS% /XENAPP
    SET OPTIONS=%OPTIONS% /CONTROLLERS “DDC1,DDC2”
    SET OPTIONS=%OPTIONS% /OPTIMIZE
    SET OPTIONS=%OPTIONS% /ENABLE_HDX_PORTS

    IF “%PROCESSOR_ARCHITECTURE%”==”AMD64” PUSHD “x64\XenDesktop Setup”
    IF “%PROCESSOR_ARCHITECTURE%”==”x86” PUSHD “x86\XenDesktop Setup”
    START /WAIT XenDesktopVDASetup.exe %OPTIONS%

    but seems not working as expected…

    Tks and Brgds

    • Nothing special there. The VDA pretty much just installs.

      XenDesktopServerSetup.exe /components VDA /NOSQL /quiet /configure_firewall

      • Many thanks !

        • After twice restart , some Citrix* component appears on Add/remove …

          so i’ve execute this powershell

          wmic product where “name like ‘Citrix%%'” call uninstall /nointeractive

          unfortunately, i’ve each reboot pop up Citrix Receiver (PNA) asking me a MSI file to uninstall it successfully…
          i’m trying to find a solution

          Rgds

          • i’ve launched at the end of script, the Citrix utility…ReceiverCleanupUtility.exe /silent
            ALL Citrix are now successfully uninstalled !!

  3. How long should this script take to run? I am noticing that it is taking quite some time to run part 1 upwards of around 45 minutes.

Leave a Reply to Ryan Gallier Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.