Citrix Virtual Apps and Desktops

Manage a VMware catalog

Manage machine catalogs describes the wizards that manage a machine catalog. The following information covers details specific to VMware virtualization environments.

Note:

Before managing a VMware catalog, you need to finish creating a VMware catalog. See Create a VMware catalog.

Update the folder ID of a machine catalog

You can update the folder ID of an MCS machine catalog by specifying the FolderId in the custom properties of Set-ProvScheme command. The VMs created after updating the folder ID are created under this new folder ID. If this property is not specified in CustomProperties, then VMs are created under the folder where the master image is located.

Perform the following steps to update the folder ID of a machine catalog.

  1. Open a Web browser and enter the URL for the vSphere Web Client.

  2. Enter the credentials and click Login.

  3. Create a VM placement folder in vSphere Web Client.

  4. Open a PowerShell window.

  5. Run asnp citrix* to load the Citrix-specific PowerShell modules.

  6. Specify the FolderID in the CustomProperties of Set-ProvScheme. In this example, the folder ID value is group-v2406.

    Set-ProvScheme -ProvisioningSchemeUid "50bb319c-2e83-4a37-9ea1-94f630687372" -CustomProperties "<CustomProperties xmlns=""http://schemas.citrix.com/2014/xd/machinecreation"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""><Property xsi:type=""StringProperty"" Name=""FolderId"" Value=""group-v2406"" /></CustomProperties>"
    <!--NeedCopy-->
    
  7. Add a VM to the machine catalog using Studio.
  8. Check the new VM on vSphere Web Client. The new VM is created under the new folder.

Find the folder ID in vSphere

Access Managed Object Browser (MOB) on any ESXi or vCenter server system to find the folder ID of the VMs.

The MOB is a web-based server application available inbuilt in all ESX/ESXi and vCenter server systems. This vSphere utility allows you to view detailed information about objects like VMs, datastores, and resource pools.

  1. Open a web browser and enter http://x.x.x.x/mob, where x.x.x.x is the IP address of the vCenter Server or ESX/ESXi host. For example, https://10.60.4.70/mob.
  2. On the Home page of MOB, click the value of the property content.
  3. Click the value of the rootFolder.
  4. Click the value of the childEntity.
  5. Click the value of the vmFolder.
  6. You can find the folder ID in the value of the childEntity.

Storage migration of VMs

You can move the disk storage of existing VMs from an old storage to a new storage. During migration, MCS retains the VM capabilities such as power management, reset OS disk, and so on. You can also add new VMs to the machine catalog using the new disk storage. To do this, use the PowerShell command Move-ProvVMDisk.

Currently, you can only migrate full clone persistent VMs.

The new storage must satisfy the following conditions:

  • It must be within the same cluster of the old storage.
  • The host on which the VM is running must have access to both the old and new datastores.

You can do the following tasks:

  • Migrate the disk storage
  • Deprecate the old storage

Migrate the disk storage

To migrate the disk storage:

  1. Add a new storage to an existing hosting unit. Change the old storage to Superseded. You can do this using the Web Studio or PowerShell commands.

    • If using the Web Studio, see Edit storage.
    • If using PowerShell commands:
      • Run Add-Hyphostingunitstorage to add the new storage to the existing hosting unit.
      • Run Set-Hyphostingunitstorage with Superseded as true to disable new VM creation in the old storage.
  2. Turn off the VMs and turn on the Maintenance Mode.
  3. Move disk storage of the VMs to the new storage and update the storage information. For example:

    Move-ProvVMDisk -ProvisioningSchemeName "myFullCloneProvScheme" -VMName ("VMware-TestVM01", "VMware-TestVM02") -DiskType OS,Identity -DestinationStorageId datastore1,datastore1
    <!--NeedCopy-->
    
  4. Get the task ID of the migration. For example:

    ,(Get-ProvVM -ProvisioningSchemeName xxxxx) | Move-ProvVMDisk -ProvisioningSchemeName xxxxx -DiskType OS,Identity -DestinationStorageId datastore1,datastore1
    <!--NeedCopy-->
    
  5. Check the status of the migration.

    • (Get-ProvTask -TaskID xxxxxxxxx).DiskMovedVirtualMachines: Provides the list of VMs with successful disk migration, including the VMs that are already migrated to the new storage.
    • (Get-ProvTask -TaskID xxxxxxxxx).DiskMoveFailedVirtualMachines: Provides the list of VMs with failed migration.
    • (Get-ProvTask -TaskID xxxxxxxxx).NotStartedVirtualMachines: Provides the list of VMs whose migration has not yet started.
    • Get-ProvVM -ProvisioningSchemeName xxxxx -VMName "VMware-TestVM01: Provides the updated VM properties after the migration. Check the properties such as StorageId, AssignedImage, BootedImage, IdentityDiskId, IdentityDiskStorage, and LastBootTime.

After migrating the disks of MCS created VMs with snapshot, you might see the warning Consolidation is required in the VSphere Client. To consolidate and avoid data loss:

  1. Take a VMware VM backup. For example, transfer all VM files into another folder on a datastore.
  2. After you see the warning, click Consolidate, and then click OK to confirm the consolidation.

Deprecate the old storage

To deprecate the old storage after VMs disk migration:

  1. Get the information about the base disks and machine count in each disk storage of the hosting unit. For example:

    $result=Get-ProvSchemeResourceInStorage -ProvisioningSchemeName xxxxx
    $result
    $result.ProvResourceInStorage | Format-List -Property *
    <!--NeedCopy-->
    

    After a successful migration, MCS automatically removes the stale base disk and there are no machines in the old storage. Therefore, after running the command, make sure that there are no machines and base disk in the old storage.

  2. Run Remove-Hyphostingunitstorage to entirely remove the old storage from the hosting unit. You can also use the Web Studio to remove the old storage.

Identify resources created by MCS

Following are the tags that MCS adds to the resources. The tags in the table are represented as “key”:”value”.

Resource name Tag
Prep VM “CitrixProvisioningSchemeId”: “xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”
  “XdConfig:”XdProvisioned=True”
VM in catalog “CitrixProvisioningSchemeId”: “xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”
  “XdConfig:”XdProvisioned=True”

More information

Manage a VMware catalog