Citrix Virtual Apps and Desktops

Create a Microsoft System Center Virtual Machine Manager catalog

Create machine catalogs describes the wizards that create a machine catalog. The following information covers details specific to Microsoft System Center Virtual Machine Manager (VMM) virtualization environments.

Note:

Before creating a VMM catalog, you need to finish creating a connection to VMM. See Connection to Microsoft System Center Virtual Machine Manager.

Create a master VM

  1. Install a VDA on the master VM, and select the option to optimize the desktop to improve performance.
  2. Take a snapshot of the master VM to use as a backup.
  3. Create virtual desktops.

MCS on SMB 3 file shares

For machine catalogs created with MCS on SMB 3 file shares for VM storage, ensure that credentials meet the following requirements. These requirements ensure that calls from the Controller’s Hypervisor Communications Library (HCL) connect successfully to SMB storage:

  • VMM user credentials must include full read write access to the SMB storage.
  • Storage virtual disk operations during VM life cycle events are performed through the Hyper-V server using the VMM user credentials.

When you use SMB storage, enable the Authentication Credential Security Support Provider (CredSSP) from the Controller to individual Hyper-V machines. Use this process for VMM 2012 SP1 with Hyper-V on Windows Server 2012. For more information, see CTX137465.

The HCL uses CredSSP to open a connection to the Hyper-V machine. This feature passes Kerberos-encrypted user credentials to the Hyper-V machine. The PowerShell commands in the session on the remote Hyper-V machine run with the credentials provided. In this case, the credentials of the VMM user, so that communication commands to storage work correctly.

The following tasks use PowerShell scripts that originate in the HCL and are then sent to the Hyper-V machine to act on the SMB 3.0 storage.

  • Consolidate master image: A master image creates an MCS provisioning scheme (machine catalog). It clones and flattens the master VM ready for creating VMs from the new disk created (and removes dependency on the original master VM).

    ConvertVirtualHardDisk on the root\virtualization\v2 namespace

    Example:

$ims = Get-WmiObject -class $class -namespace "root\\virtualization\\v2";
$result = $ims.ConvertVirtualHardDisk($diskName, $vhdastext)
$result
<!--NeedCopy-->
  • Create difference disk: Creates a difference disk from the master image generated by consolidating the master image. The difference disk is then attached to a new VM.

    CreateVirtualHardDisk on the root\virtualization\v2 namespace

    Example:

$ims = Get-WmiObject -class $class -namespace "root\\virtualization\\v2";
$result = $ims.CreateVirtualHardDisk($vhdastext);
$result
<!--NeedCopy-->
  • Upload identity disks: The HCL cannot directly upload the identity disk to SMB storage. Therefore, the Hyper-V machine must upload and copy the identity disk to the storage. Because the Hyper-V machine cannot read the disk from the Controller, the HCL must first copy the identity disk through the Hyper-V machine as follows.

    1. The HCL uploads the Identity to the Hyper-V machine through the administrator share.
    2. The Hyper-V machine copies the disk to the SMB storage through a PowerShell script running in the PowerShell remote session. A folder is created on the Hyper-V machine and the permissions on that folder are locked for the VMM user only (through the remote PowerShell connection).
    3. The HCL deletes the file from the administrator share.
    4. When the HCL finishes uploading the identity disk to the Hyper-V machine, the remote PowerShell session copies the identity disks to SMB storage. It then deletes it from the Hyper-V machine.

    The identity disk folder is recreated if it is deleted so that it is available for reuse.

  • Download identity disks: As with uploads, the identity disks pass though the Hyper-V machine to the HCL. The following process creates a folder that only has VMM user permissions on the Hyper-V server if it does not exist.

    1. The Hyper-V machine copies the disk from the SMB storage to the local Hyper-V storage through a PowerShell script. This script runs in the PowerShell V3 remote session.
    2. HCL reads the disk from the Hyper-V machine’s administrator share into memory.
    3. HCL deletes the file from the administrator share.

Create catalog with a machine profile

You can use a machine profile to create and update an MCS machine catalog in System Center Virtual Machine Manager (SCVMM) environments. You can enable vTPM. You can also add custom tags of a machine profile VM to the provisioned VMs.

Important considerations

  • Master image can only be a snapshot and not a VM.
  • You can only use VM as the machine profile source.
  • You can configure VTPM from the Hyper-V console and not from the SCVMM console.
  • If the master image has vTPM enabled, then you must enable the vTPM on the machine profile source.
  • vTPM is only supported on Generation 2 machines.
  • The following parameters overwrite the values captured in a machine profile if provided separately:

    • VMCpuCount
    • VMMemoryMB
    • Disk storage
  • The custom tags are inherited only from the machine profile and not from the master image. The CitrixProvisioningSchemeId tag is added by default to the VM. If you do not want to include the CitrixProvisioningSchemeId tag, then add the -NoVmTagging parameter while creating a hosting unit. Example:

     New-Item -HypervisorConnectionName  $ConnectionName `
         -NetworkPath @($NetworkPath) `
         -Path @($HostingUnitPath) `
         -PersonalvDiskStoragePath @() `
         -RootPath $RootPath `
         -StoragePath @($StoragePath) `
         -NoVmTagging
         <!--NeedCopy-->
    
  • You can update an existing catalog using the Set-ProvScheme command.

Create a machine catalog using a machine profile

  1. Create a VM to be a machine profile source. For more information, see Provision virtual machines in the VMM fabric. You cannot change the Generation once selected. You can do the following in SCVMM:

    • To enable vTPM:

      1. After you create the VM, log in to the Hyper-V host and find your VM under the Hyper-V Manager.
      2. Right-click the VM, then go to Settings.
      3. Under Security, select the Enable Trusted Platform Module checkbox.
  2. Open a PowerShell window.
  3. Run asnp citrix* to load the Citrix-specific PowerShell modules.
  4. Create a Broker catalog. This catalog is populated with machines which are about to be created.
  5. Create an identity pool. This becomes a container for AD accounts created for the machines that are to be created.
  6. Create a provisioning scheme with the machine profile. For example:

    New-ProvScheme -HostingUnitName "<hostingunit name>"
    -IdentityPoolName "ID1" -MasterImageVM "XDHyp:\HostingUnits\HU1\<path to the checkpoint/snapshot>"
    -ProvisioningSchemeName "<catalogname>"  -MachineProfile "XDHyp:\<path to the machine profile VM>"
    <!--NeedCopy-->
    
  7. Updates the Broker catalog with the unique Id of the provisioning scheme.
  8. Create and add VMs to the catalog.

Update an existing catalog

You can update an existing catalog using the Set-ProvScheme command. For example:

Set-ProvScheme -ProvisioningSchemeName "<catalogname>" -MachineProfile "XDHyp:\<path to the machine profile VM>"
<!--NeedCopy-->

Remove a VM

You can choose to remove a VM from a catalog but not delete the VM from the SCVMM. In this case, the CitrixProvisioningSchemeId tag is only removed from the VM. The custom tags are not deleted from the VM. You can remove a VM from the Full Configuration interface or use PowerShell commands.

Remove a VM using the Full configuration interface

  1. Select and right-click the VM.
  2. Click Delete.
  3. Select Remove the virtual machines from the catalog but do not delete the virtual machines.

Using PowerShell commands

Remove-ProvVM with ForgetVM parameter. For more information, see:

Where to go next

More information

Create a Microsoft System Center Virtual Machine Manager catalog