Updating vDisks

It is often necessary to update an existing vDisk so that the image contains the most current software and patches. Each time the vDisk is updated, a new version of that vDisk is created (VHDX file). This new version is used to capture the changes without updating the base vDisk image.

Updating a vDisk involves the following:

  • Create a version of the vDisk, manually or automatically.
  • Boot the newly created version from a device (Maintenance device or Update device), make and save any changes to the vDisk, then shut down the device.
  • Promote the new version to Production.

The following illustrates the general promotion of a vDisk update:

Image of the vDisk update

The availability of the updated version depends on the current promotion of that version. For example Maintenance, Test, or Production. Availability also depends on the type of device attempting to access it, for example, Maintenance Device, Update Device, Test Device, or Production Device.

If you are updating a device that uses a personal vDisk image, ensure compatibility in your production environment using this procedure:

Note: If you are updating images for devices that use a personal vDisk, it must be done on a virtual machine without a personal vDisk. Otherwise, updates are saved to the personal vDisk image rather than the virtual machine image.

  1. Create a maintenance version of the vDisk.
  2. Make any necessary updates to the maintenance version.
  3. Promote the new maintenance version to test.
  4. Boot the PvD test device, and verify updates.
  5. Promote the test version to production.

Update Scenarios

The following vDisk update scenarios are supported:

  • Manual Update – Manually update a vDisk by creating a version; use a Maintenance device to capture updates to that version. On the vDisk Versions dialog, initiate a manual update by clicking New. The Access column on the vDisk Versioning dialog indicates that the newly created version is in maintenance. While under maintenance, this version is updated by a single Maintenance device. Multiple Maintenance devices can be assigned to a vDisk. However, only one device can boot and access that version of the vDisk at any given time. During that time that Maintenance device has exclusive read/write access.
  • Automated Update – Creating automated updates saves administration time and physical resources. Updates are initiated on-demand or from a schedule and are configured using vDisk Update Management. If updating automatically, the Access column on the vDisk Versioning dialog indicates that the newly created version is in maintenance. In maintenance mode, this version is updated by the device to which it is assigned (only one Update Device exists per vDisk).

    Note:

    vDisk Update Management is intended for use with Standard Image Mode vDisks only. Private Image Mode vDisks can be updated using normal software distribution tool procedures. Attempting to register a vDisk in Private Image Mode for update management, or switching a vdisk that is already registered, generates errors.

  • Merge – Merging VHDX differencing disk files can save disk space and increase performance, depending on the merge option selected. A merge update is initiated manually by selecting the Merge button on the vDisk Versions dialog, or automatically when the maximum vDisk versions count is reached.

VHDX chain of differencing disks

Versioning simplifies vDisk update and management tasks, providing a more flexible and robust approach to managing vDisks.

A vDisk consists of a VHDX base image file, any associated side-car files, and if applicable, a chain of referenced VHDX differencing disks. Differencing disks are created to capture the changes made to the base disk image, leaving the original base disk unchanged. Each differencing disk that is associated with a base disk represents a different version.

The following illustrates the file naming convention used and the relationship between a base disk and all versions referencing it.

VHDX Chain

Note:

vDisk versions are created and managed using the vDisk Versions dialog and by performing common vDisk versioning tasks.

Each time a vDisk is put into Maintenance Mode a new version of the VHDX differencing disk is created. The file name is numerically incremented. The table below illustrates these chain sequences:

  VHDX Filename Properties Filename Lock File Filename
Base Image win7dev.vhdx win7dev.pvp win7dev.lok
Version 1 win7dev.1.vhdx win7dev.1.pvp win7dev.1.lok
Version 2 win7dev.2.vhdx win7dev.2.pvp win7dev.2.lok
Version N win7dev.N.vhdx win7dev.N.pvp win7dev.N.lok

Manually updating a vDisk image

Use the vDisk Versions dialog to create a version of the vDisk’s base image.

Note:

To automate an update process, configure for vDisk Update Management. Refer to Automating vDisk Updates.

This procedure requires that:

  • A maintenance device has been assigned to the vDisk being updated.
  • No version of this vDisk is under maintenance.

Note:

Updating images for devices that use a personal vDisk, must be done on a virtual machine that does not have a personal vDisk attached. Otherwise, updates are saved to the personal vDisk image rather than the virtual machine image.

Create a version

  1. In the Console, right-click on a vDisk to version within a device collection or vDisk pool, then select Versions from the context menu. The vDisk Versions dialog appears.

    Note:

    Verify that the vDisk is not in Private Image mode.

  2. Click New. The new version displays in the dialog with Access set to Maintenance and the update Type method set to Manual.
  3. Boot the vDisk from a Maintenance device, install or remove applications, add patches, and complete any other necessary updates, then shut down the Maintenance device. Optionally, test that changes were made successfully.

    Note:

    When booting a Test or Maintenance device, use the boot menu to select from the vDisk, or version of that vDisk, from which to boot. This process does not work if the device is a PvD Test device.

  4. Select the vDisk, then right-click. Select the Promote… menu option from the context menu that appears (for more details on promoting versions refer to Promoting Updated Versions.
  5. Select to promote this maintenance version into test or directly into production. If Production is selected, set the availability of this version in production to be either immediate or scheduled.
  6. Click OK to promote this version and end maintenance.

Merging VHDX differencing disks

Merging VHDX differencing disk files can save disk space and increase performance, depending on the merge method selected.

Once a virtual disk reaches five versions, Citrix recommends merging the versions either to a new base image or to a consolidated differencing disk.

Merge methods include:

  • Merging to a new base image
  • Merging to a consolidated differencing disk

Note:

A merged virtual disk only occurs when a Maintenance version is not defined, or when it is in Private Image mode. A merged virtual disk starts from the top of the chain down to the base disk image. A starting disk cannot be specified for the merged virtual disk.

Merging to a New Base Image

A full merge to a new base image combines a chain of differencing disks and base image disks into a new single base disk. This new disk is the next version in the chain, with the file extension VHDX. This method allows for the fastest disk access to the base image. Citrix recommends this process when performance is more important than disk space (a new base disk is created for every merge performed).

Tip:

After merging the base operation on a vDisk utilizing the VHDX file format, the merged base VHDX file may be smaller than the original base VHDX file. This behavior occurs when files are deleted in a particular vDisk version. These files are no longer available in the merged base VHDX. For more information, refer to the Citrix Knowledge Center.

Merging to a Consolidated Differencing Disk

A partial merge combines a chain of VHDX differencing disks up to, but not including, the base disk into a new differencing disk. The new differencing disk has the same parent base disk image. It is given the extension avhdx. This method consumes less disk space than the full merge and the merge process is quicker than performing a full merge.

Configure an automatic consolidation of differencing disks in the Farm Properties dialog’s virtual disk Version tab. On this tab, select a maximum virtual disk number. When that number is reached, a merge is automatically performed. The availability of that virtual disk depends on the mode selected on the tab (Production, Maintenance, or Test).

Note:

Citrix recommends consolidating a merged differencing disk when storage is limited or when the bandwidth between remote locations is limited. These scenarios make copying large images impractical.

Merging Differencing Disks

  1. Right-click on a virtual disk in the Console, then select the Versions menu option. The virtual disk Versions dialog appears.
  2. Click the Merge button. The Merge dialog appears.
  3. Select to perform a Merged Updates or Merged Base merge.
    • To merge all differencing disks to a single differencing disk (not to the base disk image), select the Merged Updates option.
    • To merge all differencing disks into a new base disk, select the Merged Base option.
  4. Select the access mode (Production, Maintenance, or Test) for this version after the merge completes. If an access mode is not selected, the virtual disk mode defaults to automatic range, specified in the Farm Properties virtual disk Version tab.
  5. Click OK to begin the merge process.

The time it takes to complete the merge process varies based on the merge method selected and the number of differencing disks to merge. After the merge successfully completes, the new version displays in the virtual disk Versions dialog. If you selected a full merge, the Type column displays either Merge Base, or Merge if a partial merge was selected.

Promoting updated versions

An updated version of the vDisk is not available to Production devices until it is promoted to Production. The update promotion stages include:

  • Maintenance
  • Test
  • Production

Each time a new version is created, the Access setting is automatically set to Maintenance to allow maintenance devices to make updates (read/write). After you finish update, this version can be promoted from Maintenance to Test (read-only). This permits testing by test devices, or promotion directly to Production, for use by all target devices.

After you complete an update using the manual method, the new version can be promoted to Test or Production from the vDisk Version dialog’s Promote button. If you selected Production, a release date and time can be set, or accept the default (Immediate).

After you complete an update using the automated update method, the new version is promoted according to the Post Update setting. After completing the automatic update, promote the version using the vDisk Version dialog’s Promote button.

If issues exist in the new version, revert from Test to Maintenance (if no active sessions exist). You can alternately revert from Production to either Test or Maintenance. Shut down any booted device before reverting to another version.

In order for Production devices to access the new version after it is promoted to Production, the following also applies:

  • Access setting must be either Default or Override.
  • If the update was scheduled for release, the date and time must be reached.
  • The updated version must be available to all servers in the site.
  • Boot production devices from a version set to Newest released on the vDisk Versions dialog.

Note:

If Access displays as blank, this version is considered released to production but is not the version currently selected from which devices should boot.

Updating vDisks on target devices

This document describes how to change a vDisk on multiple target devices without having to manually reconfigure them. It provides some general information about the process, then sets out a step-by-step procedure.

Setting vDisk Class and Type Properties

For an automatic update to take place, the Class of the target device and vDisk must match. For a newer vDisk to replace an older vDisk within a target device, the vDisk Class and Type of both vDisks must match. Multiple, duplicate vDisk instances can exist within your implementation. vDisks can be assigned to one or more target devices. For example, for the Provisioning Server, Least Busy and First Available boot behaviors. Further qualify the old vDisk that replaced by the new vDisk.

Tip:

Never assign more than one vDisk with the same type from the same Provisioning Server to the same target device. This process applies to environments using the Automatic Disk Image Update feature.

Scheduling vDisk updates

Use the Apply vDisk updates to schedule updates. These updates should be applied when detected by the server. You can alternately select Schedule the next vDisk update on the Auto Update tab of the vDisk. If you select Schedule the next vDisk update, you must specify the current date or a later date. Failing to do so prevents an update to the vDisk.

Timed update of vDisks

You can set a timer to update vDisks. The vDisk are assigned to all the devices with a matching Class at a specified time, for example when devices are less active.

To set a timer, create a Windows timer on one of the servers from each site. This process calls the PowerShell Mcli-Run ApplyAutoUpdate command or the Mcli Run ApplyAutoUpdate command. The command scans the site and updates all eligible vDisks. The timer may execute every day. These updates are automatically made whenever you add new vDisk versions.

Automatically adding a replacement vDisk

To add a replacement vDisk to a site automatically, place it in the store directory of the vDisk it replaces. When the update process is done, each store for the site is scanned for vDisks that are not defined in the site. A vDisk is automatically added to a site and assigned to a target device with a matching class:

  • if a vDisk is found with the same Class and Type as an existing vDisk in the store directory.
  • if a vDisk is labeled as major or minor, and the build number is higher than the existing vDisk.

The replacement vDisk must include all versions since and including the last merged base, or if no merged base exists, the base. All the VHDX, AVHDX, and the PVP files for the included versions must be in the store directory.

If the replacement vDisk has multiple versions, the manifest (XML) file must be included with the vDisk. To create the manifest file, perform a vDisk Export. To reduce the number of delivered files, delete obsolete versions in the vDisk Versions dialog before performing exporting the vDisk.

Automatically update a vDisk

  1. For the original vDisk, select the Auto Update tab, then set the following vDisk properties:

    a. Enable automatic updates.

    b. Determine if the update is immediately applied, or on a scheduled date when checking for updates by running the ApplyAutoUpdate.

    c. Enter a Class and Type for the vDisk.

    d. Enter a Major, Minor, and Build number for the vDisk.

    Note:

    The Serial Number field is set to a random Globally Unique Identifier (GUID) when the vDisk is created. It is for information only and you can edit it. It is not used for processing the Automatic Update.

  2. For target devices using the updated vDisk, select the General tab. In Target Devices Properties set the Class equal to the value of the original vDisk.

  3. Ensure that the replacement vDisk is in the same store as the original vDisk.

  4. For the replacement disk, select the Auto Update tab, then set the following vDisk properties:

    a. Only enable automatic updates if this vDisk may later be replaced with another vDisk.

    b. If automatic updates are enabled, determine if the update is immediately applied. You can alternately schedule when to check for updates by running ApplyAutoUpdate.

    c. Enter the same Class and Type that you entered for the original vDisk.

    d. Enter a Major, Minor, and Build number for the vDisk that is higher than the original vDisk.

  5. If the vDisk update is required for other farm sites, deliver the replacement vDisk to them. Follow the information described in step 4. This updated vDisk is required in the same store as the original vDisk of the other farm site. Refer to ‘Automatically adding a replacement vDisk’ earlier in this article.

  6. Configure the update check. Updated vDisks contain a higher Major, Minor, and Build number that are eligible using one of the following ways:

    • Right-click on the vDisk Pool, select the Check for Automatic Updates menu option, then click OK on the confirmation dialog.

      Or

    • Set a timer as described earlier in this article.

Automating vDisk updates

vDisk update management is intended for use with Standard Image Mode vDisks only. Private Image Mode vDisks are updated using normal software distribution tool procedures. Attempting to register a Private Image Mode vDisk for vDisk update management, or switching a vdisk that is already registered, causes errors. In the Console, the vDisk Update Management feature is used to configure the automation of vDisk updates using virtual machines (VMs). Automated vDisk updates occur on a scheduled basis, or at any time that the administrator invokes the update directly from the Console. This feature supports updates detected and delivered from WSUS and SCCM Electronic Software Delivery (ESD) servers.

When the Site node is expanded in the Console tree, the vDisk Update Management feature appears. When expanded, the vDisk Update Management feature includes the following managed components:

  • Hosts
  • vDisks
  • Tasks

Configuring a site for vDisk Update Management requires the following:

  1. Designate a Provisioning Server within the site to process updates. Refer to Enabling Automatic vDisk Updates.
  2. Configuring a Virtual Host Pool for Automated vDisk updates. Refer to Using the Virtual Host Connection Wizard. Note: Supported hypervisor types include; Citrix XenServer, Microsoft SCVMM/Hyper-V, and VMWare vSphere/ESX.
  3. Create and configure an ESD VM that used to update the vDisk. Refer to Creating and Configuring ESD Update VMs.
  4. Configuring vDisks for Automated updates. Refer to the Using the Managed vDisk Setup Wizard.
  5. Creating and managing update tasks. Refer to Using the Update Task Wizard. Note: The user that configures vDisk Update Management tasks must have permissions to create, modify, and delete Active Directory accounts.
  6. Run the update task by right-clicking on the task object in the Console, and then selecting the Run update now menu option. The Update VM will boot, install updates, and reboot as necessary. After the update task successfully completes, the virtual machine is automatically shut down. The update status can be checked from the Console tree under vDisk Update Management>vDisks>(vDisk name)> Completed Update Status. The status can also be checked using the event viewer or in WSUS.

After configuring the site to use vDisk Update Management, managed vDisks are updated using the following methods:

  • Scheduled – the Image Update Service automatically updates a vDisk, on a scheduled basis as defined in the Update Task.
  • User Invoked – select a managed vDisk from the Console’s Run update now menu option. This option requires you to manually start, then stop the Update Device after the update is complete.

Consider the following when automating vDisk updates:

  • The vDisk update process starts either automatically (scheduled), or when an administrator right-clicks on a managed vDisk, then selects the Run update now menu option.
  • Citrix Provisioning creates a version (VHDX) and places that version in Maintenance mode (read/write).
  • The virtual machine boots the assigned vDisk. If Scheduled update is configured, vDisk Update Management performs the boot automatically. For a User invoked update, the administrator invokes the update.
  • All updates are automatically made and captured in the new version of the VHDX file.
  • After you update the vDisk, the virtual machine is shut down automatically.
  • The vDisk is promoted from Maintenance to either Test or Production. The availability of the new vDisk version depends on the Access mode that was selected when the Update Task Wizard was run. Or, when the mode is selected on the Update Task Properties’ Finish tab (Maintenance, Test, or Production). After this version is made available in production, target devices will be able to access it the next time they boot that vDisk.

Enabling automatic vDisk updates

To enable automatic vDisk updates:

  1. Right-click on the Site in the Console, then select the Properties menu option. The Site Properties dialog appears.
  2. On the vDisk Update tab, check the box next to Enable automatic vDisk updates on this site.
  3. Select the server to run vDisk updates for this site, then click OK.

Managed vDisks can now be automatically updated on this site. Next, virtual host connections must be configured to allow for automatic updates to be made. Refer to Configuring Virtual Host Connections for Automated vDisk Updates.

Configuring Virtual Host Connections for Automated vDisk Updates

When you use vDisk Update Management, a designated hypervisor server is selected from within a virtual pool that is then used to communicate with Citrix Provisioning. Create the designated hypervisor by running the Virtual Host Connection Wizard. If you are running a vCenter server on alternate ports, the following registry modifications must be made to connect to it from Citrix Provisioning:

  • Create a registry key named PlatformEsx under HKLM\Software\Citrix\ProvisioningServices
  • Create a string value in the PlatformEsx key named ServerConnectionString and set it to http://{0}:PORT#/sdk (If you are using port 300, ServerConnectionString= http://{0}:300/sdk)

To configure virtual host connections:

  1. Under the vDisk Update Management node in the Console tree, right-click on Hosts, then select the Add host… option. The Virtual Host Connection Wizard appears.
  2. Click Next to begin. The Hypervisor page appears.
  3. Click the radio button next to the type of hypervisor used by this pool, then click Next. Options include Citrix XenServer Microsoft, SCVMM/Hyper-V, or vSphere/ESX. The Name/Description page appears.
  4. Enter the name, and optionally a description, for the Virtual Host Connection then click Next.
  5. Enter the hostname or the IP address of the server to contact. If an ESX hypervisor was selected, optionally specify the datacenter to use when connecting to the host. Note: It can take several minutes before a hostname/IP address can be reentered, if that hostname/IP was previously entered and then deleted.
  6. Click Next. The Credentials page appears.
  7. Enter the appropriate credentials required to connect to this host, then click Next: Username – the account name with appropriate permissions to access the virtual host pool server. Password – password used with this account name. The password must be a maximum of 32 characters. The Confirmation page appears.
  8. Review the settings to ensure accuracy, then click Finish. Virtual Host Pool properties can be viewed or modified on the Virtual Host Connection Properties dialog.

General tab

Field Description
Type The type of virtual host connection that was selected when the Virtual Host Connection Wizard was run. This field cannot be modified.
Name The name to use when referencing this virtual host connection by Citrix Provisioning.
Description A brief description of this virtual host connection.
Host The hostname or IP address of the virtual host connection server used by Citrix Provisioning. To use a different port for the ESX server connection, in the server address field, enter the full connection string and include the correct port number. The format for the connection string is http://server_name:port/sdk. Note: If you are running a vCenter server on alternate ports, the following registry modifications must be made to connect to it from Citrix Provisioning: Create a new key HKLM\Software\Citrix\ProvisioningServices\PlatformEsx. Or, create a string in the PlatformEsx key named ‘ServerConnectionString’ and set it to http://{0}:PORT#/sdk (If you are using port 300, ServerConnectionString= http://{0}:300/sdk)
Datacenter Optional. If an ESX hypervisor was selected, optionally specify the datacenter to use when connecting to the host.

Credentials tab

Field Description
Update limit The account user name required to connect to the virtual host server.
Password The account password that is associated with the username. The password must be a maximum of 32 characters.
Verify Connection Button Click this button to verify that the username and password entered are valid and allow communications to the virtual host pool server.

Advanced tab

Field Description
Update limit Controls the number of virtual machines that can concurrently process updates. Any additional updates are queued and start as virtual machines complete processing.
Update timeout The maximum amount of time allowed to perform an update to an image. If the update has not completed before the timeout period, the update is canceled.
Shutdown timeout The maximum amount of time to wait for the virtual machine to shut down. If the virtual machine has not shut-down before the time-out period, the virtual machine forces a shutdown by the server.
Port Sets the IP port number. This field is not available with VMWare vSphere/ESX.