XenDesktop Farm Migration Utility

Overview

The XenDesktop Farm Migration Utility allows you to seamlessly migration VM’s between different XenDesktop farms. This can be done on a per VM basis or in batches of up to 500. As well as providing migration functionality, it can also be used for Disaster Recovery, allowing you to back up and restore your VM’s on your farm.

System Requirements

  • 64 bit Windows OS.
  • .Net Framework 4
  • Citrix XenDesktop Broker Service PowerShell Snap-In.
  • Memory requirements are dependent on the size of the batch being run. In order to run the maximum batch size of 500, you should have at least 4GB of RAM available. The large memory usage is due to the need to create PowerShell objects in the background.
  • There is no minimum CPU requirement, however, the more that is available, the better the utility performance will be.

Download

Get your free copy of this tool from the below link:

XenDesktop_Farm_Migration_Utility.zip

Migration

When the utility is first launched, it will check for the XenDesktop Broker Service PowerShell Snap-In. If this is not found, the utility will not be able to process any migrations and it will not run.

NoSDK

 

 

You can select to perform a migration on a single VM or on a batch of VM’s. The VM name must be entered in DOMAIN\VM format. For batches, the list of VM’s is loaded via a text file. The name of the source DDC and target DDC should be entered and then the Validate button clicked. The utility will communicate with both DDC’s and ensure that they are valid for use.

After validation has run, the drop down menus for target catalog and target delivery group will be populated with the options that are available from the target farm, you must provide a selection for each.

Before you click on the Migrate button to start the migration process, there are 5 additional options that are available to you for selection:

Add users to delivery group? -> This option will add each users that is assigned to the VM to the delivery group that the VM is being placed in.

Set DDC in registry? -> When checked, this will bring up a dialog that will allow you to build a list of DDC information to be added to the ListOfDDCs key in the registry.

Force off disconnected sessions? -> This option will force off any sessions that are showing as disconnected before proceeding with the migration.

Force off non-brokered sessions? -> This option will force off any sessions that are showing as non-brokered before proceeding with the migration.

Override source hypervisor? -> If this option is checked, the Target Hypervisor drop down menu will become enabled. The hypervisor selected will be used instead of the hypervisor recorded from the source farm when adding the VM to the new farm. Be sure to use this option with care and know what you are doing.

After clicking on the Migrate button, the migration progress will be shown in the top window of the Progress pane. The bottom window will show any PowerShell commands that are being executed. When the process completed, the result for each stage of the migration will be shown.

Results

 

Disaster Recovery

There are two options available on this tab, Backup and Restore.

Backup – this is very easy to use. You simply enter the name of the DDC for the farm that you want to back up and click on Validate. Once the DDC has been validated, you click on Process and it will gather all the VM’s from that farm and display them in the output grid. When complete, you click on export to save the CSV file with the VM information.

Restore – When you select the restore option, you will need to browse and select the CSV file that contains your farm backup. After the CSV file has been loaded ,the VM’s for restoring are displayed in the grid. You must enter and validate a DDC before you can begin processing.

There is a checkbox option available called Import Override. If this is selected, it will enabled three drop down boxes for Machine Catalog, Delivery Group and Hypervisor. These options will allow you to override the information that is contained in the CSV file. These options are for advanced administrators.

DISCLAIMER -> Use these options will care and only if you know what you are doing. Ensure that you test before using at scale.

When you are ready, click on process and all the VM’s listed in the CSV file will be added to your farm.

,

11 Comments

  • Brad Myers says:

    Great Session today about this tool. This tool is definitely the best thing to come out of this years Synergy for me as I’m about to migrate 3000 persistant XDs to a new datacenter. This should come in very handy. Can’t wait to test it out and let you know how it goes!

    • Shane O'Neill says:

      Thanks for coming to the session and for the feedback Brad! Please feel free to reach out for any help with the tool…

  • […] Utility to migrate VMs between different XenDesktop farms – citrixtips (Shane O’Neill) […]

  • Anthony Schneider says:

    Great tool, Shane! If we wanted to modify this program to perform other activities during the rebrokering, are you making available the source code?

    • Shane O'Neill says:

      Hi Anthony… This is still a version 1 of the tool, I have a number of enhancements that I want to make to it and I would like to give it some time for more people to try it to ensure that it is stable… 🙂 I think that when I release version 2, I will make the source code available at that time also…

      If you have any changes that you think others would benefit from, please feel free to send them on to me…

  • Daniel Tsatskin says:

    Hi Shane,

    I attended your presentation during Synergy and found it very informative and perfectly timed to our current dilemma. We are in the process of migrating 100’s of MCS provisioned persistent VDI from XD7.0 to XD7.6. I have downloaded the utility that you demonstrated and have started to test in the 2 labs I have stood up. The source lab is XD7 and the destination is XD7.6.
    When I try to run the utility on one of the test VDIs, it fails on “SetDDC” with a specific message of “Can’t read hypervisor ID from target DDC, skipping migration… Please review.”
    I have specified the check box to override source hypervisor, as the names used for the host connections are different between the source and destination. Even though I specified that the target hypervisor name is different, the PS cmd is referencing the source host connection name when querying the destination DDC.

    Any recommendations on how to resolve this would be greatly appreciated. If it would help, I can email you the log file.

    thanks for the great job on putting this together!

    • Shane O'Neill says:

      Hi Daniel… Thanks for the feedback! If you could email me the log file and the contents of the screen panel that outputs the PowerShell commands from the tool face, that would be very helpful… Some screen shots would be great also… You can find my email address under the “About Shane” section at the top of this page… From the situation you are describing, I think I know what the problem might be but I will need to validate… I will be more than happy to work through this with you to fix…

      I am traveling for the next few days so my email reply might be delayed…

      Congratulations on finding the first bug! 🙂

  • Manish says:

    Hi Shane,

    I have tried this tool to migrate test VDI from XenApp 7.6 to 7.12 Citrix site, all looks OK until I get an error saying that Unable to clear Group policy cache and migration fails. We are in multi domain environment wherein our Citrix Controllers are on different domain and VDIs are in different domain with two way transitive trust.May be some permission issue between domains.
    Reagrds

    • Shane O'Neill says:

      Hi Manish, sorry for the slow reply… So this is more than likely a permissions issue for the account that is running the tool… The tool is connecting to the VM UNC path that stores the policy cache… Are you able to browse that UNC under the account that is running the tool?

  • […] You can view the original post and user guide for this tool here. […]

Leave a Reply

XHTML: You can use these tags: <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="">