Citrix Virtual Apps and Desktops

Manage machine catalogs

Note:

You can manage your Citrix Virtual Apps and Desktops deployment using two management consoles: Web Studio (web-based) and Citrix Studio (Windows-based). This article covers only Web Studio. For information about Citrix Studio, see the equivalent article in Citrix Virtual Apps and Desktops 7 2212 or earlier.

Introduction

You can add or remove machines from a machine catalog, rename, change the description, or manage a catalog’s Active Directory computer accounts.

Maintaining catalogs can also include making sure that each machine has the latest OS updates. Including antivirus updates, operating system upgrades, or configuration changes.

  • Catalogs containing pooled random machines created using Machine Creation Services (MCS) maintain machines by updating the master image used in the catalog and then updating the machines. This method enables you to efficiently update large numbers of user machines.
  • For catalogs containing static, permanently assigned machines, and for Remote PC Access Machine catalogs, you manage updates to users’ machines outside of Web Studio. Perform this task either individually or collectively using third-party software distribution tools.

For information about creating and managing connections to host hypervisors, see Connections and resources.

Note:

MCS does not support Windows 10 IoT Core and Windows 10 IoT Enterprise. Refer to the Microsoft site for more information.

About persistent instances

When updating an MCS catalog created using persistent, or dedicated instances, any new machines created for the catalog use the updated image. Pre-existing instances continue to use the original instance. The process of updating an image is done the same way for any other type of catalog. Consider the following:

  • With persistent disk catalogs, the pre-existing machines are not updated to the new image, but any new machines added to the catalog use the new image.
  • For non-persistent disk catalogs, the machine image is updated the next time the machine is reset.
  • With persistent machine catalogs, updating the image also updates the catalog instances that use it.
  • For catalogs that do not persist, if you want different images for different machines, the images must reside in separate catalogs.

Manage machine catalogs

You can manage a machine catalog in two ways:

Use Web Studio

This section details how you can manage catalogs using Web Studio:

Add machines to a catalog

Before you start:

  • Make sure that the virtualization host has sufficient processors, memory, and storage to accommodate the additional machines.
  • Make sure that you have enough unused Active Directory computer accounts. If you are using existing accounts, the number of machines you can add is limited by the number of accounts available.
  • If you use Web Studio to create Active Directory computer accounts for the additional machines, you must have appropriate domain administrator permission.

To add machines to a catalog:

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select a machine catalog and then select Add machines in the action bar.
  4. Select the number of virtual machines to add.
  5. If there are insufficient existing Active Directory accounts for the number of VMs you are adding, select the domain and location where the accounts are created. Specify an account naming scheme, using hash marks to indicate where sequential numbers or letters appear. Do not use a forward slash (/) in an OU name. A name cannot begin with a number. For example, a naming scheme of PC-Sales-## (with 0-9 selected) results in computer accounts named PC-Sales-01, PC-Sales-02, PC-Sales-03, and so on.
  6. If you use existing Active Directory accounts, either browse to the accounts or click Import and specify a .csv file containing account names. Make sure that there are enough accounts for all the machines you’re adding. Web Studio manages these accounts. Either allow Web Studio to reset the passwords for all the accounts, or specify the account password, which must be the same for all accounts.

The machines are created as a background process, and can take much time when creating many machines. Machine creation continues even if you close Web Studio.

Delete machines from a catalog

After you delete a machine from a machine catalog, users can no longer access it, so before deleting a machine, ensure that:

  • User data is backed up or no longer required.
  • All users are logged off. Turning on maintenance mode stops new connections from being made to a machine.
  • Machines are powered off.

To delete machines from a catalog:

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select a catalog and then select View Machines in the action bar.
  4. Select one or more machines and then select Delete in the action bar.

Choose whether to delete the machines being removed. If you choose to delete the machines, indicate if the Active Directory accounts for those machines are kept, disabled, or deleted.

Edit a catalog

  1. On the Description page, change the catalog description.
  2. Select Machine Catalogs in the left pane.
  3. Select a catalog and then select Edit Machine Catalog in the action bar.
  4. On the Scopes page, change the scopes.
  5. You might see additional pages depending on the catalog type.

    For catalogs created using an Azure Resource Manager image, the following pages are visible. Keep in mind that changes you make apply only to machines you add to the catalog later. Existing machines remain unchanged.

    • On the Virtual Machines page, change the machine size and availability zones where you want to create machines.

      Note:

      • Only machine sizes that the catalog supports are shown.
      • If necessary, select Show only machine sizes used in other machine catalogs to filter the machine size list.
    • On the Machine Profile page, choose whether to use or change a machine profile.

    • (Visible only when the catalog is configured with a dedicated group host) On the Dedicated host group page, choose whether to change a host group.

    • On the Storage and License Types page, choose whether to change the storage type, license type, and Azure Computer Gallery settings (available only when Place prepared image in Azure Gallery is in use).

    Note:

    If the newly selected setting doesn’t support the current machine size, a warning dialog box appears, informing you that changing the setting will reset the machine size setting. If you choose to continue, a red dot appears next to the Virtual Machines menu, prompting you to select a new machine size.

    • On the License Type page, choose whether to change the Windows license or Linux license setting.

    For Remote PC Access catalogs, the following pages are visible:

    • On the Power Management page, change the power management settings and select a power management connection.
    • On the Organizational Units page, add or remove Active Directory OUs.
  6. Click Apply to apply the changes you made and click Save to exit.

Rename a catalog

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select a catalog and then select Rename Machine Catalog in the action bar.
  4. Enter the new name.

Move a catalog to a different zone

If your deployment has more than one zone, you can move a catalog from one zone to another.

Moving a catalog to a different zone, other than the hypervisor containing the VMs in that catalog, affects performance.

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select a catalog and then select Move in the action bar.
  4. Select the zone where you want to move the catalog.

Delete a catalog

Before deleting a catalog, ensure that:

  • All users are logged off and that no disconnected sessions are running.
  • Maintenance mode is turned on for all machines in the catalog so that new connections cannot be made.
  • All machines in the catalog are powered off.
  • The catalog is not associated a delivery group. In other words, the delivery group does not contain machines from the catalog.

To delete a catalog:

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select a catalog and then select Delete Machine Catalog in the action bar.
  4. Indicate whether the machines in the catalog are deleted. If you choose to delete the machines, indicate whether the Active Directory computer accounts for those machines are retained, disabled, or deleted.

Manage Active Directory computer accounts in a catalog

To manage Active Directory accounts in a machine catalog, you can:

  • Free unused machine accounts by removing Active Directory computer accounts from single-session OS and multi-session OS catalogs. Those accounts can then be used for other machines.
  • Add accounts so that when more machines are added to the catalog, the computer accounts are already in place. Do not use a forward slash (/) in an OU name.

To manage Active Directory accounts:

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select a catalog and then select Manage AD accounts in the action bar.
  4. Choose whether to add or delete computer accounts. If you add accounts, specify what to do with the account passwords: either reset them all or enter a password that applies to all accounts.

    You might reset passwords if you do not know the current account passwords; you must have permission to perform a password reset. When entering a password, the password is changed on the accounts as they are imported. When deleting an account, choose whether the account in Active Directory is kept, disabled, or deleted.

Indicate if Active Directory accounts are retained, disabled, or deleted when you remove machines from a catalog or delete a catalog.

Update a catalog

We recommend that you save copies or snapshots of master images before updating the machines in the catalog. The database keeps a historical record of the master images used with each machine catalog. Roll back, or revert, machines in a catalog to use the previous version of the master image. Perform this task if users encounter problems with updates you deployed to their desktops. This minimizes user downtime. Do not delete, move, or rename master images. You cannot revert a catalog to use them.

After a machine is updated, it restarts automatically.

Update or create a master image

Before you update the machine catalog, either update an existing master image or create one on your host hypervisor.

  1. On your hypervisor, take a snapshot of the current VM and give the snapshot a meaningful name. This snapshot can be used to revert (roll back) machines in the catalog, if needed.
  2. If necessary, power on the master image, and log on.
  3. Install updates or make any required changes to the master image.
  4. Power off the VM.
  5. Take a snapshot of the VM. Give it a meaningful name that is recognized when the catalog is updated in Web Studio. Although Web Studio can create a snapshot, Citrix recommends that you create it using the hypervisor management console. Then select that snapshot in Web Studio. This process enables you to provide a meaningful name and description rather than an automatically generated name. For GPU master images, you can change the master image only through the XenServer console.

Change the master image

To prepare and roll out the update to all machines in a catalog:

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select a catalog and then select Change Master Image in the action bar.
  4. On the Master Image page, select the host and the image you want to roll out.

    Tip:

    For an MCS-created catalog, you can annotate its image by adding a note for the image. A note can contain up to 500 characters. Each time you change the master image, a note-related entry is created whether you add a note. If you update a catalog without adding a note, the entry appears as null (-). To view note history for the image, select the catalog, click Template Properties in the low pane, and then click View note history.

  5. On the Rollout Strategy page, choose when the machines in the machine catalog are updated with the new master image: on the next shutdown or immediately.

    Note:

    The Rollout Strategy page is not available for persistent VMs because rollout is only applicable to non-persistent VMs.

  6. Verify the information on the Summary page and then click Finish. Each machine restarts automatically after it is updated.

To track the update progress, locate the catalog in Machine Catalogs to view the inline progress bar and the step-by-step progress graph.

When updating a catalog using PowerShell SDK directly, rather than Web Studio, specify a hypervisor template (VMTemplates). Use this as an alternative to an image or a snapshot of an image.

Rollout strategy:

Updating the image on next shutdown will immediately affect any machines not currently in use, that is, machines that do not have an active user session. A system that is in use receives the update when the current active session ends. Consider the following:

  • New sessions cannot be launched until the update has completed on applicable machines.
  • For single-session OS machines, machines are immediately updated when the machine is not in use, or when users are not logged in.
  • For a multi-session OS with child machines, reboots do not occur automatically. They must be manually shut down and restarted.

Tip:

Limit the number of machines being rebooted by using the advanced settings for a host connection. Use these settings to modify the actions taken for a given catalog; advanced settings vary depending on the hypervisor.

If you want to enable one-time restart schedule using PowerShell, see Enable one-time restart schedule.

Roll back the master image

After you roll out an updated or new master image, you can roll it back. This process might be necessary if issues occur with the newly updated machines. When you roll back, machines in the catalog are rolled back to the last working image. Any new features that require the newer image are no longer available. As with the rollout, rolling back a machine includes a restart.

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select the catalog and then select Roll Back Master Image in the action bar.
  4. Specify when to apply the earlier master image to machines, as described in the preceding section for the rollout operation.

The rollback is applied only to machines that need to be reverted. Machines that are not updated with the new or updated master image do not receive notification messages and are not forced to log off.

To track the rollback progress, locate the catalog in Machine Catalogs to view the inline progress bar and the step-by-step progress graph.

Change the functional level or undo the change

Change the functional level for the machine catalog after you upgrade the VDAs on the machines to a newer version. Citrix recommends upgrading all VDAs to the latest version to enable access to all the newest features.

Before changing the functional level for a machine catalog:

  • Start the upgraded machines so that they register with the Controller. This process lets Web Studio determine that the machines in the catalog need upgrading.

To change the functional level for a catalog:

  1. Sign in to Web Studio.
  2. Select Machine Catalogs in the left pane.
  3. Select the catalog. The Details tab in the lower pane displays version information.
  4. Select Change Functional Level. If Web Studio detects that the catalog needs upgrading, it displays a message. Follow the prompts. If one or more machines cannot be upgraded, a message explains why. To ensure that all machines function properly, Citrix recommends you resolve machine issues before clicking Change to proceed.

After the catalog change completes, you can revert the machines to their previous VDA versions by selecting the catalog and then selecting Undo Functional Level Change in the action bar.

Clone a catalog

Before cloning a catalog, be aware of the following considerations:

  • You cannot change settings associated with operating system and machine management. The cloned catalog inherits those settings from the original.
  • Cloning a catalog can take some time to complete. If necessary, select Hide progress to run the cloning in the background.
  • The cloned catalog inherits the name of the original and has a suffix Copy. You can change the name. See Rename a catalog.
  • After cloning completes, be sure to assign the cloned catalog to a delivery group.
  1. Sign in to Web Studio, and then select Machine Catalogs in the left pane.
  2. Select a catalog and then select Clone in the action bar.
  3. In the Clone Selected Machine Catalog window, view the settings for the cloned catalog and configure settings as applicable. Select Next to proceed to the next page.
  4. On the Summary page, view a summary of the settings and select Finish to start cloning.
  5. If necessary, select Hide progress to run the cloning in the background.

Organize catalogs using folders

You can create folders to organize catalogs for easy access. For example, you can organize catalogs by image type or by organization structure.

Create a catalog folder

Before you start, first plan how to organize your catalogs. Consider the following:

  • You can nest folders up to five levels deep (excluding the default root folder).
  • A catalog folder can contain catalogs and subfolders.
  • All nodes in Web Studio (such as the Machine Catalogs and the Applications nodes) share a folder tree in the backend. To avoid name conflicts with other nodes when renaming or moving folders, we recommend you give different names to first-level folders in different nodes.

To create a catalog folder, follow these steps:

  1. Select Machine Catalogs in the left pane.
  2. In the folder hierarchy, select a folder and then select Create Folder in the Action bar.
  3. Enter a name for the new folder, and then click Done.

Tip:

If you create a folder in an unintended location, you can drag it to the correct location.

Move a catalog

You can move a catalog between folders. Detailed steps are as follows:

  1. Select Machine Catalogs in the left pane.
  2. View catalogs by folder. You can also turn on View all above the folder hierarchy to view all catalogs at a time.
  3. Right-click a catalog and then select Move Machine Catalog.
  4. Select the folder to which you want to move the catalog, and then click Done.

Tip:

You can drag a catalog to a folder.

Manage catalog folders

You can delete, rename, and move catalog folders.

You can delete a folder only if it and its subfolders don’t contain catalogs.

To manage a folder, follow these steps:

  1. Select Machine Catalogs in the left pane.
  2. In the folder hierarchy, select a folder, and then select an action in the Action bar as needed:

    • To rename the folder, select Rename Folder.
    • To delete the folder, select Delete Folder.
    • To move the folder, select Move Folder.
  3. Follow onscreen instructions to complete the remaining steps.

Use PowerShell

This section details how you can manage catalogs using PowerShell:

Retrieve warnings and errors associated with a catalog

You can get historical errors and warnings to understand issues with your MCS machine catalog and fix those issues.

Using PowerShell commands, you can:

  • Get a list of errors or warnings
  • Change the warning state from New to Acknowledged
  • Delete the errors or warnings

To run the PowerShell commands:

  1. Open a PowerShell window.
  2. Run asnp citrix* to load the Citrix-specific PowerShell modules.

To get a list of errors and warnings:

Run Get-ProvOperationEvent command.

  • With no parameters: Gets all errors and warnings
  • With LinkedObjectType and LinkedObjectUid parameter: Gets all errors and warnings associated with a specific provisioning scheme
  • With EventId parameter: Gets a specific error or warning that matches this event ID
  • With Filter parameter: Gets errors or warnings by customized filter

To change the state of errors or warnings from New to Acknowledged:

Run Confirm-ProvOperationEvent command.

  • With EventId parameter: Sets the state of a specific error or warning that matches this event ID. You can get the EventId of a specific error or warning as an output from Get-ProvOperationEvent command
  • With LinkedObjectType and LinkedObjectUid parameters: Sets the state of all the errors and warnings associated with a specific provisioning scheme
  • With All parameter: Sets the state of all errors and warnings as Acknowledged

To delete the errors or warnings:

Run Remove-ProvOperationEvent command.

  • With EventId parameter: Removes a specific error or warning that matches this event ID. You can get the EventId of a specific error or warning as an output from Get-ProvOperationEvent command
  • With LinkedObjectType and LinkedObjectUid parameters: Removes all errors and warnings associated with a specific provisioning scheme
  • With All parameter: Removes all errors and warnings

For more information, see Citrix PowerShell SDK.

Enable one-time restart schedule

If you want to enable one-time restart schedule using PowerShell, use the following BrokerCatalogRebootSchedule PowerShell commands to create, modify, and delete a restart schedule:

  • Get-BrokerCatalogRebootSchedule
  • New-BrokerCatalogRebootSchedule
  • Set-BrokerCatalogRebootSchedule
  • Remove-BrokerCatalogRebootSchedule
  • Rename-BrokerCatalogRebootSchedule

For example,

  • To create a restart schedule of the VMs in the catalog named BankTellers to begin on Feb 3, 2022, between 2 AM and 4 AM.

     C:\PS> New-BrokerCatalogRebootSchedule -Name BankTellers -CatalogName BankTellers  -StartDate "2022-02-03" -StartTime "02:00" -Enabled $true -RebootDuration 120
     <!--NeedCopy-->
    
  • To create a restart schedule of the VMs in the catalog having UID 17 to begin on Feb 3, 2022, between 1 AM and 5 AM. Ten minutes before the restart, each VM is set to display a message box with the title, WARNING: Reboot pending, and the message, Save your work, in every user session.

     C:\PS> New-BrokerCatalogRebootSchedule -Name 'Update reboot' -CatalogUid 17 -StartDate "2022-02-03" -StartTime "01:00" -Enabled $true -RebootDuration 240 -WarningTitle "WARNING: Reboot pending" -WarningMessage "Save your work" -WarningDuration 10
     <!--NeedCopy-->
    
  • To rename the catalog restart schedule named Old Name to New Name.

    C:\PS> Rename-BrokerCatalogRebootSchedule -Name "Old Name" -NewName "New Name"
    <!--NeedCopy-->
    
  • To display all catalog restart schedules with UID 1, and then rename the catalog reboot schedule with the UID 1 to New Name.

    C:\PS> Get-BrokerCatalogRebootSchedule -Uid 1 | Rename-BrokerCatalogRebootSchedule -NewName "New Name" -PassThru
    <!--NeedCopy-->
    
  • To set the catalog restart schedule named Accounting to display a message with the title, WARNING: Reboot pending, and the message, Save your work, ten minutes before the restart of each VM. The message appears in every user session on that VM.

    ``` C:\PS> Set-BrokerCatalogRebootSchedule -Name Accounting -WarningMessage “Save your work” -WarningDuration 10 -WarningTitle “WARNING: Reboot pending”

  • To display all restart schedules that are disabled, and then enable all disabled restart schedules.

     C:\PS> Get-BrokerCatalogRebootSchedule -Enabled $false | Set-BrokerCatalogRebootSchedule -Enabled $true
    
  • To set the catalog restart schedule with UID 17 to display the message Rebooting in %m% minutes fifteen, ten, and five minutes before the restart of each VM.

     C:\PS> Set-BrokerCatalogRebootSchedule 17 -WarningMessage "Rebooting in %m% minutes." -WarningDuration 15 -WarningRepeatInterval 5
    
  • To configure the time zone for the catalog named MyCatalog.

     C:\PS> Set-BrokerCatalog -Name "MyCatalog" -TimeZone <TimeZone>
    

Add descriptions to an image

You can add informative descriptions about changes related to image updates for machine catalogs. Use this feature to add a description when creating a catalog, or when you update an existing master image for a catalog. You can also display information for each master image in the catalog. Use the following commands to add or view image descriptions:

  • To add a note while creating a machine catalog with a master image, use the parameter MasterImageNote in the NewProvScheme command. For example:

     C:\PS>New-ProvScheme -ProvisioningSchemeName <name> -HostingUnitName <name> -IdentityPoolName <name> -MasterImageVM
     XDHyp:\HostingUnits\<hosting unit name>\<vm name>.vm\Base.snapshot -MasterImageNote "Note"
    
  • To update the master image associated with a machine catalog, use the parameter MasterImageNote in the Publish-ProvMasterVMImage command. For example:

     C:\PS>Publish-ProvMasterVMImage -ProvisioningSchemeName <name> -MasterImageVM XDHyp:\HostingUnits\<hosting unit name>\<vm name>.vm\base.snapshot -MasterImageNote "Note"
    
  • To display the information for each image, use the Get-ProvSchemeMasterVMImageHistory command. For example:

     C:\PS>Get-ProvSchemeMasterVMImageHistory -ProvisioningSchemeName MyScheme -Showall
    

To track the rollback progress, locate the catalog in Machine Catalogs to view the inline progress bar and the step-by-step progress graph.

You cannot roll back in certain scenarios, including the following. (The Roll Back Master Image option is not visible).

  • You do not have permission to roll back.
  • The catalog was not created using MCS.
  • The catalog was created using an image of the OS disk.
  • The snapshot used to create the catalog has become corrupted.
  • User changes to the machines in the catalog do not persist.
  • Machines in the catalog are running.

Reset OS disk

Use the PowerShell command Reset-ProvVMDisk to reset the OS disk of a persistent VM in an MCS created machine catalog. Currently, this feature is applicable to AWS, Azure, XenServer, Google Cloud. SCVMM, and VMware virtualization environments.

To successfully run the PowerShell command, make sure that:

  • The target VMs are in a persistent MCS catalog.
  • The MCS machine catalog is functioning properly.
  • This implies that the provisioning scheme and host exist, and the provisioning scheme has correct entries.
  • Hypervisor is not in maintenance mode.
  • Target VMs are powered-off and in maintenance mode.

Perform the following steps to reset the OS disk:

  1. Open a PowerShell window.
  2. Run asnp citrix* to load the Citrix-specific PowerShell modules.
  3. Run the PowerShell command Reset-ProvVMDisk in any one of the following ways:

    • Specify the list of VMs as a comma-separated list, and perform the reset on each VM:

       Reset-ProvVMDisk -ProvisioningSchemeName "xxx" -VMName ("abc","def") -OS
      
    • Specify the list of VMs as an output from Get-ProvVM command, and perform the reset on each VM:

       \(Get-ProvVM -ProvisioningSchemeName \"xxx\") | Reset-ProvVMDisk \"abc\" -OS
      
    • Specify a single VM by name:

       Reset-ProvVMDisk -ProvisioningSchemeName "xxx" -VMName "abc" -OS
      
    • Create separate reset tasks for each of the VMs returned by the Get-ProvVM command. This is less efficient because each task will perform the same redundant checks, such as hypervisor capability check, connection check for each VM.

       Get-ProvVM -ProvisioningSchemeName \"xxx\" | Reset-ProvVMDisk -ProvisioningSchemeName \"xxx\" -OS
      
  4. A confirmation prompt appears that lists the VMs to be reset along with a warning message that it is an unrecoverable operation. If you do not provide an answer and press Enter, no further action takes place.

    Note:

    Do not take VMs out the of the maintenance mode or power them on until the completion of the reset process.

    You can run the PowerShell command -WhatIf to print the action it would take and exit without performing the action.

    You can also bypass the confirmation prompt using one of the following methods:

    • Provide the -Force parameter:

       Reset-ProvVMDisk -ProvisioningSchemeName "xxx" -VMName "abc" -OS -Force
      
    • Provide the -Confirm:$false parameter:

       Reset-ProvVMDisk -ProvisioningSchemeName "xxx" -VMName "abc" -OS -Confirm:$false
      
    • Before running the Reset-ProvVMDisk, change $ConfirmPreference to None:

       PS C:\Windows\system32> $ConfirmPreference='None'
       PS C:\Windows\system32> $ConfirmPreference
       None
       PS C:\Windows\system32> Reset-ProvVMDisk -ProvisioningSchemeName "xxx" -VMName "abc" -OS
      
  5. Run Get-ProvTask to get the status of the tasks returned by Reset-ProvVMDisk command.

Change the network setting for an existing provisioning scheme

You can change the network setting for an existing provisioning scheme so that the new VMs are created on the new subnetwork. Use the parameter -NetworkMapping in the Set-ProvScheme command to change the network setting.

Note:

This feature is supported on Citrix Virtual Apps and Desktops 2203 LTSR CU3 and later versions.

To change the network setting for an existing provisioning scheme, do the following:

  1. In the PowerShell window, run the command asnp citrix* to load the PowerShell modules.
  2. Run (Get-Provscheme -ProvisioningSchemeName "name").NetworkMaps to get to the network path that you want to change.
  3. Assign a variable to the new network setting. For example:

    $NewNetworkMap = @{"0"= "XDHYP:\HostingUnits\MyNetworks\Network 0.network"}
    
  4. Run Set-ProvScheme -ProvisioningSchemeName "name" -NetworkMapping $NewNetworkMap.
  5. Run (Get-Provscheme -ProvisioningSchemeName "name").NetworkMaps to verify the new network setting for the existing provisioning scheme.

Manage versions of a machine catalog

When an MCS machine catalog is updated with the Set-ProvScheme command, the current configuration is saved as a version. You can then manage the various versions of the machine catalog using PowerShell commands. You can:

  • See the list of versions of a machine catalog
  • Use any previous version to update the machine catalog
  • Manually delete a version if it is not used by a VM of that machine catalog
  • Change the maximum number of versions to be retained by the machine catalog (default is 99)

A version includes the following information of a machine catalog:

  • VMCpuCount
  • VMMemoryMB
  • CustomProperties
  • ServiceOffering
  • MachineProfile
  • NetworkMapping
  • SecurityGroup

Run the following commands (provided as examples) to manage the various versions of a machine catalog.

  • To see the configuration details of the various versions of a machine catalog:

     Get-ProvSchemeVersion -ProvisioningSchemeName AzureCatalog
    
  • To see the configuration details of a particular version of a machine catalog:

     Get-ProvSchemeVersion -ProvisioningSchemeName AzureCatalog -Version 2
    
  • To see the total number of versions associated with a machine catalog:

    ``` (Get-ProvSchemeVersion -ProvisioningSchemeName AzureCatalog).Count

  • To use any previous version to update the machine catalog:

     Set-ProvScheme -ProvisioningSchemeName AzureCatalog -Version 2
     <!--NeedCopy-->
    
  • To manually delete a version if it is not used by a VM of that machine catalog:

     Remove-ProvSchemeVersion -ProvisioningSchemeName AzureCatalog -Version 3
     <!--NeedCopy-->
    
  • To set the maximum number of versions to be retained by the machine catalog (default is 99). This setting is applied across all the catalogs. For example, in this case, a maximum of 15 versions will be retained for all the MCS provisioned catalogs.

     Set-ProvServiceConfigurationData -Name "MaxProvSchemeVersions" -Value 15
     <!--NeedCopy-->
    

If the number of versions reaches the maximum number of versions, then a new version cannot be created if older versions are in use by any of the VMs in the machine catalog. In that case, do one of the following:

  • Increase the limit of the maximum number of versions to be retained by the machine catalog.
  • Update some VMs that are on older versions so that those older versions are no longer referenced by any VMs, and can be deleted.

Convert a non-machine profile-based machine catalog to machine profile-based machine catalog

You can use a VM, template spec (in case of Azure), or launch template (in case of AWS) as a machine profile input to convert a non-machine profile-based machine catalog to machine profile-based machine catalog. New VMs added to the catalog take property values from the machine profile unless overwritten by explicit custom property.

Note:

An existing machine profile-based machine catalog cannot be changed to a non-machine profile-based machine catalog.

To do this:

  1. Create a persistent or non-persistent machine catalog with VMs and without a machine profile.
  2. Open the PowerShell window.
  3. Run the Set-ProvScheme command to apply the property values from the machine profile to the new VMs added to the machine catalog. For example:

    • In the case of Azure:

       Set-ProvScheme = Set-ProvScheme -ProvisioningSchemeName xxxx -MachineProfile XDHyp:\HostingUnits\<HostingUnitName>\machineprofile.folder\<ResourceGroupName>\<TemplateSpecName>\<VersionName>
       <!--NeedCopy-->
      
    • In the case of AWS:

       Set-ProvScheme = Set-ProvScheme -ProvisioningSchemeName xxxx -MachineProfile "XDHyp:\HostingUnits\<hosting-unit>\<launch-template>.launchtemplate\<launch-template-version>.launchtemplateversion"
       <!--NeedCopy-->
      

Repair the identity information of active computer accounts

You can reset the identity information of active computer accounts that have identity-related problems. You can choose to reset only the machine password and trust keys, or reset all configuration of the identity disk. This implementation is applicable to both persistent and non-persistent MCS machine catalogs.

Note:

Currently, the feature is supported only for Azure and VMware virtualization environments.

Conditions

Ensure the following to successfully reset the identity disk:

  • Turn off and set the VM to maintenance mode
  • Do not include the parameter -OS in the PowerShell command

Reset identity disk

To reset identity disk:

  1. Open the PowerShell window.
  2. Run asnp citrix* to load the Citrix-specific PowerShell modules.
  3. Reset the identity information.

    • To reset only the machine password and trust keys, run the following commands in the following order:

       Repair-AcctIdentity -IdentityAccountName TEST\VM1 -PrivilegedUserName TEST\admin1 -PrivilegedUserPassword $password -Target IdentityInfo
       <!--NeedCopy-->
      

      The description of the parameters used in the command are as follows:

      • IdentityAccountName: The name of the identity account that must be repaired.
      • PrivilegedUserName: User account that has write permission on identity provider (AD or AzureAD).
      • PrivilegedUserPassword: Password for PrivilegedUserName.
      • Target: Target for the repair action. It can be IdentityInfo to repair account password/trust key, and UserCertificate to repair user certificate attributes of Hybrid AzureAD joined machine identities.
       Reset-ProvVMDisk -ProvisioningSchemeName <name> -VMname <name> -Identity -ResetIdentityInfo
       <!--NeedCopy-->
      

      ResetIdentityInfo parameter resets the following:

      • Password and trust keys: If the VM is AD domain joined (for DaaS doc only)
      • Trust keys only: If the VM is not AD domain joined (for DaaS doc only)
      • Password only: If the VM is AD domain joined (for CVAD on-prem doc only)
    • To reset all configuration of the identity disk, run the following commands in the following order:

       Repair-AcctIdentity -IdentityAccountName TEST\VM1 -PrivilegedUserName TEST\admin1 -PrivilegedUserPassword $password -Target IdentityInfo
       <!--NeedCopy-->
      
       Reset-ProvVMDisk ProvisioningSchemeName <name> -VMName <name>  -Identity
       <!--NeedCopy-->
      
  4. Type y to confirm the action. You can also skip the confirmation prompt using the -Force parameter. For example:

    Reset-ProvVMDisk -ProvisioningSchemeName <name> -VMName <name> -Identity -Force
    <!--NeedCopy-->
    
  5. Run Get-ProvVM -ProvisioningSchemeName <name -VMName <name> to check the updated identity disk setting. The attributes of the identity disk (for example, IdentityDiskId) must be updated. The StorageId and IdentityDiskIndex must not change.

Change cache configuration on an existing machine catalog

After creating a non-persistent catalog with MCSIO enabled, you can use the Set-ProvScheme command to modify the following parameters:

  • WriteBackCacheMemorySize
  • WriteBackCacheDiskSize

This feature is currently applicable to:

  • GCP and Microsoft Azure environments, and
  • a non-persistent catalog with MCSIO enabled

Requirements

The requirements to modify the cache configuration are:

  • Update to the latest version of VDA (2308 or later).
  • Enable the parameter UseWriteBackCache for the existing machine catalog. Use New-ProvScheme to create a machine catalog with UseWriteBackCache enabled. For example:

     New-ProvScheme -ProvisioningSchemeName $CatalogName -HostingUnitUid $HostingUnitUid `
     -IdentityPoolUid $acctPool.IdentityPoolUid -CleanOnBoot `
     -MasterImageVM $MasterImage `
     -ServiceOffering $ServiceOffering `
     -NetworkMap $NetworkMap `
     -SecurityGroup $SecurityGroup `
     -UseWriteBackCache -WriteBackCacheDiskSize 8
     <!--NeedCopy-->
    

Change the cache configuration

Run the Set-ProvScheme command. For example:

Set-ProvScheme -ProvisioningSchemeName $provScheme.ProvisioningSchemeName -WriteBackCacheDisk32 -WriteBackCacheMemorySize 128
<!--NeedCopy-->

Note:

  • The value of WriteBackCacheDiskSize must be more than zero because at least 1 GB of cache disk storage is required.
  • The value of WriteBackCacheMemorySize must be less than the machine catalog memory size.
  • These changes only affect new VMs added to the catalog after the change is made. Existing VMs are not affected by these changes.

Troubleshoot

Where to go next

For information on managing specific cloud services catalogs, see: