Citrix Provisioning

Migrate VM to a new hosting resource

You can migrate VMs provisioned with Citrix Provisioning and without changing the Citrix Virtual Apps and Desktops and provisioning power functions. You might migrate the VM when you are retiring a hosting resource and want to migrate the provisioned VMs to a new hosting resource instead of provisioning new VMs.

Important: After you migrate the VM, the provisioned MCS catalog in the old host no longer works.

Shut down the VM. Then, do these processes in any order:

  • Edit the hosting unit.
  • Change the host resource to point to your new hosting resource.
  • Migrate the provisioned VM from your old hosting resource to the new one.

When you have finished performing these processes, test your VM.

Edit the hosting unit

  1. In the provisioning console, edit the host unit.
  2. Change the host address to your new host resource main IP address.
  3. On the Credentials tab, change the user name and password to the ones you want to use for the new hosting resource.
  4. Click OK.

Change the hosting resource

For the provisioning VM to migrate successfully:

  • Change the hosting resource to point to your new hosting resource.
  • Change the storage to the storage server.
  • Specify the new network.
  1. Open Citrix Studio.
  2. Edit the connection:
    1. On the Hosting tab, select the hosting resource hosting connection and select Action > Edit Connection.
    2. In the Connection Properties tab, select Edit settings.
    3. In the Edit settings screen, change the address to the new hosting resource pool main IP.
    4. On the Credentials tab, change the user name and password to be used for the new hosting resource pool.
    5. Select OK.
  3. Change the previously defined storage to the new storage for the hosting resource on your new hosting resource.
    1. Select the hosting resource and select Action > Edit Storage.
    2. In the OS Storage tab, clear the local storage location to remove it from use.
    3. Select the new storage server to put it in use.
    4. On the Temporary Storage tab, clear the local storage location and select the new storage location.
    5. Select OK.
  4. Change the network interface in an existing hosting connection. Still in the Citrix Cloud Connector, open a PowerShell session with administrator privileges. Run these commands.
    1. Import PowerShell modules: Add-PSSnapinCitrix*
    2. Get the host connection details. Note the values for PSChildName and the network path (NewNetworkPath) that are returned: dir XDHyp:\HostingUnits
    3. Set the PSChildName to the new hosting resource: PSChildName = <NewHostingResource>
    4. Set the network path to the new network: Set-Item -Path XDHyp:\HostingUnits\<PSChildName> -NetworkPath <NewNetworkPath>
    5. Run the command that changes the network interface: Set-Item -Path "XDHyp:\HostingUnits\<NewHostingResource\" -NetworkPath "XDHyp:\Connections\XS2\<New Network Path>

Migrate the provisioned VM from the old hosting resource to the new one

  1. In Citrix Studio, select the provisioned VM.
  2. From the context menu, select Move VM.
  3. Using the wizard, enter values for the following:
    • Destination: <NewHostingResource>
    • Target Server: Not needed
    • Place all virtual disks on the same: New storage location
    • Target Network: <NewNetworkPath>
    • Storage Network: Storage network on new hosting resource
  4. Select Finish.

Test the migration

To test that the migration was successful:

  • Start the VM from the Provisioning console.
  • Start the VM from Studio.
  • Verify the BDM update. To do so:
    1. Record the IPs in the bootstrap. Configure the bootstrap of the provisioning server that you are currently logged into using invalid IPs.
    2. Enable the bootstrap option Verbose mode.
    3. Right-click the HDD BDM-booting provisioned VM and select Target > Update BDM Partitions.
    4. Boot the provisioned VM from the Provisioning console.
    5. Verify that the VM is trying to boot from the invalid IP. Shut down the VM.
    6. Configure the bootstrap and fix the IPs in the bootstrap to valid ones. Or, click Read Servers from database. Disable verbose mode if necessary. Do the BDM update on the previous client again.
    7. Verify that the VM can boot.
Migrate VM to a new hosting resource