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

Change existing Hypervisorconnection / Move Machines to new Hypervisorconnection


Question

If you are having issues with your existing XenDesktop Hypervisorconnection, maybe Certificate Errors or something else you can simply create a new Hypervisorconnection and move the existing Machinecatalogs/Desktopgroups to the new Hypervisorconnection via the following powershell commands (tested with XenDesktop 7.17):

 

1. PS C:\Users\administrator> add-pssnapin citrix*

2. PS C:\Users\administrator> Get-BrokerHypervisorConnection


Capabilities                           : {PowerOn, PowerOff, SuspendResume, Reset...}
ExplicitPreferredController            : False
HypHypervisorConnectionUid             : 4ebd79c6-e194-4685-9cf0-83cbd562ab95
IsReady                                : True
MachineCount                           : 2
MaxAbsoluteActiveActions               : 100
MaxAbsoluteNewActionsPerMinute         : 10
MaxAbsolutePvdPowerActions             : 50
MaxPercentageActiveActions             : 20
MaxPvdPowerActionsPercentageOfDesktops : 25
MetadataMap                            : {}
Name                                   : XEN01 <-- Existing Hypervisorconnection
PreferredController                    : Domain\DDC01
State                                  : On
Uid                                    : 1 <-- Existing UiD

Capabilities                           : {PowerOn, PowerOff, SuspendResume, Reset...}
ExplicitPreferredController            : False
HypHypervisorConnectionUid             : 42de21c6-c04b-4ace-a1d5-89afa80bdf41
IsReady                                : True
MachineCount                           : 1
MaxAbsoluteActiveActions               : 100
MaxAbsoluteNewActionsPerMinute         : 10
MaxAbsolutePvdPowerActions             : 50
MaxPercentageActiveActions             : 20
MaxPvdPowerActionsPercentageOfDesktops : 25
MetadataMap                            : {}
Name                                   : TestHypervisor <-- New Hypervisorconnection
PreferredController                    : Domain\DDC01
State                                  : On
Uid                                    : 2 <-- New UiD (Note this UiD)

 

3. PS C:\Users\administrator> Get-BrokerMachine -AdminAddress ddc.domain.local | where {(($_.CatalogName -eq "YourMachineCatalogName"))} | ForEach-Object { set-brokermachine -HypervisorConnectionUid 2 -MachineName $_.MachineName }

 

(You only have to change the HypervisorconnectionUid, after that the corresponing values will automatically change!)

 

4. PS C:\Users\administrator>Get-BrokerMachine

 

Search for a Machine within the changed catalog and look for the following lines, it should be showing the new Hypervisorconnection:

 

HypHypervisorConnectionUid  : 42de21c6-c04b-4ace-a1d5-89afa80bdf41
HypervisorConnectionName    : TestHypervisor
HypervisorConnectionUid     : 2

 

Do this for all other machine catalogs and after that:

 

5. PS C:\Users\administrator> Get-BrokerHypervisorConnection

 

look for the line MachineCount of the old HypervisorConnection, wait until it´s showing 0

 

If you now look into your Citrix Director you maybe see powerstate "unknown" for your machines, so you have to restart all Citrix Services on all DDC´s (or just reboot all of them)

 

6. PS C:\Users\administrator> get-service citrix* | restart-service -force

 

7. Use Citrix Studio or powershell to put the old Hypervisorconnection into maintenance mode.

 

If you got lot´s of machines and you are showing the hypervisorconnection column within Director it may be showing the old connection name, it seems like the monitoring database needs some time to get updatet, while I was testing this in a customer environment the monitoring database was still showing the old Hypervisorconnection ID for a few hours.

 

That´s all!!!!

 

Hope this helps

 

Regards

 

Dennis

 

 

Link to comment

14 answers to this question

Recommended Posts

  • 0

Great and timely post. Was actually doing this work this week as well.

 

This also works should you be performing a DR failover for statically assigned machines, say from one cluster of machines to another - irrespective of hypervisor - VMware ESXi (managed by a separate vCenter), Hyper-V Host, using Hyper-V Replication, or Nutanix AHV to another Nutanix cluster.

 

By parsing the 'unknown' machines and then updating the HypervisorConnectionUid, this allows Citrix Studio to properly report Power Management of the machines.

 

 

Link to comment
  • 0

Hi Guys,

 

we are unable to change the hypervisor connection and getting below error while working with MCS Catalog, can some one confirms, it will only works for non MCS machines/Catalogs

 

"Neither hypervisor connection nor machine ID can be specified for an MCS-provisioned machine"

 

please find the below details:

 

·         Desktop Delivery Controller: 7.6.0.5029

·         Catalog type : Citrix Machine Creation Services

·         VDA: 7.6.0.5026

·         VDA OS: Windows Server 2008 R2 (including all critical updates)

·         Hypervisor: Hyper-V 2012

Link to comment
  • 0

Hi Everyone,

We have recently purchased Nutanix system with AHV. I have Citrix 7.15 LTSR on Hyper-v and planning to migrate to Nutanix. I called Citrix yesterday and they mentioned there is no way to do this and have to build the farm from scratch!

 

Easy for them to say that but moving 2000 people to a new farm is time-consuming. I have two DDC and two storefronts and MCS for machine creation. 

I was wondering if this article is applicable for my scenario or anyone has done this before and what are the steps?

 

I really app[reciate your assistance as I am under pressure to get this migration done asap.

Link to comment
  • 0
On 5/8/2019 at 3:15 AM, Carl Stalhood1709151912 said:

What kind of VDAs? If non-persistent, then simply migrate your masters to AHV and create new Catalogs.

 

For persistent machines, you'll have to migrate them one at a time. Then add the migrated machines to a Manual catalog.

Hi Carl,

 

I want to move nearly 500 persistent VDIs from one Vcenter to another. We don't have DRS enabled on the existing Hypervisor cluster. While planning to move the VDI's do I need to plan to get the Hypervisor moved 1st then migrate the associated VDIs ??

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...