How to migrate a virtual machines to a new XenDesktop Site

How to migrate a virtual machines to a new XenDesktop/XenApp Site. Occasionally I have seen virtual machines attempt to register with the wrong site when doing a multi-site implementation or migration and usually this is because the image has a list of ddcs incorrect. If you have already changed the ListOfDDCs and your VM’s are still attempting to register with the wrong XenApp/XenDesktop site you will want to remove all entries of the previous site from your master image.

  1. In the Unfiltered policy or a new policy on both XenApp/XenDesktop sites you will want to set “disable auto-update, disable the Enable auto update of Controllers policy setting.”
  2. Remove Image Updater virtual machine from XenDesktop Site A Delivery Group and Machine Catalog
  3. Create a maintenance version of the image.
  4. Power on Image Updater for image to be migrated.
  5. Log in to the Image Updater with a valid admin account for the image
    Stop the “Citrix Desktop Service” service
  6. Add the following entries to the images hosts file:
    127.0.0.1  Desktop Delivery Controller Host Name
    127.0.0.1  Desktop Delivery Controller Host Name
    Edit the registry and update all pointers from XenDesktop Site A DDC’s to point to the XenDesktop Site B DDC’s.
  7. Registry Locations to check, only update if entries exist.
    HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\VirtualDesktopAgent\ListOfDDCs
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Citrix\VirtualDesktopAgent\ListOfDDCs
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Citrix\VirtualDesktopAgent\ListOfDDCs
    [HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\VirtualDesktopAgent\State] “RegisteredDdcFqdn”
    [HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\VirtualDesktopAgent\Policy] “ListOfDDCs”
    [HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\VirtualDesktopAgent\PreviousState] “PreviousRegisteredDdcFqdn”
  8. Show Hidden Files and check the following locations.
  9. Delete C:\ProgramData\Citrix\GroupPolicy\
    Delete C:\ProgramData\CitrixCSECache\
    Delete C:\ProgramData\Citrix\PVSAgent\LocallyPersistedData\BrokerAgentInfo\SavedListOfDdcsSids.xml
    Delete C:\ProgramData\Citrix\PVSAgent\LocallyPersistedData\BrokerAgentInfo\GroupPolicyValues.xml
  10. Additional you will want to check the PVS Write Cache Disk to confirm the VDAState.ini files is removed if you still have issues with registering to the wrong site. You could run a PSexec command or a script to remove the file from your existing virtual machines.
    1. D:\pvsvm\VDAstate.ini
  11. Start the “Citrix Desktop Service” service
    Restart the virtual machine to ensure that the old or Site A DDC’s have not been re-injected into the registry.
    Check the event viewer for successful events for the “Citrix Desktop Service” with something similar to the following:
    The Citrix Desktop Service successfully registered with delivery controller DDCSiteB.Domain.com (IP Address 192.168.0.50).

The endpoint address of the controller is https://DeliveryControllerName.Domain.com:443/Citrix/CdsController/IRegistrar. The Citrix Desktop Service successfully registered with delivery controller

Remove hosts entries added in step 3.6
Create new machine catalog and import the image updater to confirm registration.
Shutdown the image and prepare for push to production

Share or Save this:
Share

Leave a Reply

Your email address will not be published. Required fields are marked *