Thursday 27 October 2016

Citrix Studio - Change Hypervisor Connection

In Citrix Studio, it is possible to create a new hypervisor connection, and move the VMs to that new connection. The reason new connection be created and we move VMs to that connection can be varies – from commissioning new vCentre server to changing to a new hypervisor platform (from Microsoft Hyper-V to VMware vSphere).

This post will explain on how to change the connection from current to a new one. The connection needs to be already established prior to implementation of this steps.


  1.  RDP to Citrix Studio server, and launch PowerShell. Add Citrix snap-in by following below command.


    Command : asnp citrix*







  2. Identify current and to be used Broker Connection IDs by using below command. In this example, I want to change from Hypervisor Connection UID 1 to Hypervisor Connection UID  3Command : get-BrokerHypervisorConnection


  3.  Change the Hypervisor Connection UID to 3 by following below command

    Command : Set-BrokerMachine -MachineName "<Domain>\<VMName>" -HypervisorConnectionUid "<ConnectionID>"




  4. Result

  5. Now let's have some fun. Let's change the Hypervisor Connection UID back to 1

    Command 
    Set-BrokerMachine -MachineName "<Domain>\<MachineName>" -HypervisorConnectionUid "1"




  6.  Result


  7. If we have more than 1 VDI machines to be moved, we can use below PowerShell script to ease the job.
asnp Citrix*
forEach ($Machine in get-Content C:\Temp\PSScript\machines.txt)
{

set-BrokerMachine -MachineName "$Machine" -HypervisorConnectionUid "3"
}



Share:
Location: Auckland, New Zealand

0 comments:

Post a Comment