With a data disk, you can provide data, applications, or extra storage for your end users. You can use data disks both with image VMs automatically created by the Import Virtual Machine from Marketplace wizard or image VMs that you have manually created and paired with your Horizon Cloud environment. The system supports using data disks with session-based desktops and remote applications from RDSH farms, floating VDI desktop assignments, and dedicated VDI desktop assignments. However, because of the different nature of the assignment types, the use cases vary for each type.

Data Disks and Dedicated VDI Desktop Assignments

The dedicated VDI desktop assignment is the most common use case for data disks. Initially, each desktop VM in the assignment's pool of VMs has the same data disk configuration and contents as for the original image VM on which the assignment is based. You might provide data and applications on the initial data disk that you want to give to all of the entitled end users. Each end user in a dedicated VDI desktop assignment is assigned a specific virtual desktop. The assigned end user returns to the same virtual desktop each time they launch the desktop and log in. Because the data disk persists with that virtual desktop, the assigned end user can make changes to the data on the data disk and all of the user's changes are preserved between sessions.

Data Disks and Floating VDI Desktop Assignments

In a floating VDI desktop assignment, each virtual desktop VM is reverted to the initial state of the original image VM when an end user logs out of the desktop. Like in the dedicated case, initially each desktop VM in the assignment's pool of VMs has the same data disk configuration and contents as for the original image VM on which the assignment is based. Also as in the dedicated case, you might provide data and applications on the initial data disk that you want to give to all of the entitled end users. Each time an end user connects to a desktop from the pool, that end user is connected to a desktop with any data disks in their initial state.

Unlike the dedicated case, when the end user logs out of the desktop, the virtual desktop's data disks are reverted to the initial data disk configuration and contents. Any files the end user might have saved to those disks are lost when the user logs out.

Data Disks and RDSH-Based Desktop and Application Assignments

The main use case for using data disks with RDSH VMs is to provide shared, read-only data or applications to all of the end users that you will entitle to use session-based desktops and remote applications provisioned from the RDSH farm. Any data disk that is attached to an RDSH VM is available to all end users that connect to that VM for their session-based desktops and remote applications. Also, because an end user might get connected to different VM instances each time the end user logs in to use their entitled desktop or application, there is no guarantee a particular end user would be able to access data they saved to the data disk during previous sessions. As a result, using data disks for personal data in this scenario is typically avoided.

Getting Started

To have data disks available to the pod-provisioned virtual desktops and remote applications, you use the Microsoft Azure portal to create the disks and attach them to a golden image VM before publishing the image. At a high level, you:

  1. Attach the created data disks to the VM.
  2. Initialize those data disks according to the steps in the Microsoft Azure documentation topic Attach a managed data disk to a Windows VM by using the Azure portal. Those steps include initializing the disks, defining volumes, and formatting partitions as appropriate for your needs.
  3. Add any initial contents you want on the data disks.

You must perform those steps before you convert the golden image to a published image. The system's image publishing process captures that initial state of the data disks as it seals the image. After publishing the image, you cannot add data disks to that sealed image. To update a sealed image for any reason, including adding a data disk, you update the image according to the information inManaging Published Images for Horizon Cloud Pods in Microsoft Azure and its subtopics.

For the detailed steps of preparing a data disk for a image VM used in Horizon Cloud, see Setting Up a Data Disk for an Image VM in Horizon Cloud.

Number of Data Disks per VM

The current recommendation on the number of data disks supported in Horizon Cloud on an image VM is up to five (5) data disks. Additional factors might restrict the number of data disks you can attach to a VM, such as Microsoft Azure policies about how many data disks can be attached to a particular VM size and the Microsoft Azure region into which your pod is deployed. See the Microsoft Azure documentation topic Sizes for Windows virtual machines in Azure and the pages for the various VM types for the charts that show the maximum numbers for each Microsoft Azure VM size.

Life Cycle of Data Disks

When you use the Horizon Cloud administrative console to delete a VM, the system looks for all of the resources associated with the VM and deletes those resources. Even though you manually created the data disks in the Microsoft Azure portal, when the data disks are attached to a VM in Horizon Cloud, the system will delete those data disks when it deletes the VM.

When farm RDSH instances and VDI desktop instances are created from images with attached data disks, the data disks for those instances are created and deleted automatically when the RDSH and desktop VMs are created and deleted, according to the system's standard behavior.

Setting Up a Data Disk for an Image VM in Horizon Cloud

To provide a data disk in your pod-provisioned virtual desktops and remote applications, you create a managed data disk using the Microsoft Azure portal and add that data disk to the image VM. Then you initialize the data disk and format it. After formatting the disk, you can optionally load it with any content you want in the disk's initial configuration. You must perform those steps before you convert the image to a published image.

In Horizon Cloud, you can use data disks both with image VMs automatically created by the Import Virtual Machine from Marketplace wizard or image VMs that you have manually created and paired with your environment. For information about using data disks in your Horizon Cloud environment, see Using Data Disks with Virtual Desktops from a Horizon Cloud Pod in Microsoft Azure.

This topic describes the best practice workflow in the context of your Horizon Cloud pod, when the VM already exists in a state where it is paired with Horizon Cloud and the VM does not already have a data disk attached to it. The system's automated Import wizard creates a VM without a data disk. If you manually created a base VM and attached a data disk at creation time, you must log in to the VM and initialize the data disk before publishing the image. To initialize a VM's data disk, follow the steps described in the Microsoft Azure documentation topic Initialize a new data disk.

The general steps for adding a data disk to a VM and initializing it are available in the Microsoft Azure documentation topic Attach a managed data disk to a Windows VM by using the Azure portal. An overview of the process is:

  • In the Microsoft Azure portal, you locate the image VM and add a data disk to it.
  • You log in to the VM and initialize that data disk.

Prerequisites

Verify the Imported VMs page indicates the agent-related status is active for the VM. To get that status, use the Imported VMs page's Reset Agent Pairing action on the VM. That action is located in the More drop-down list.

Obtain the VM's name and IP address as displayed on the Imported VMs page. You use the name to locate the VM in the pod's resource groups in the Microsoft Azure portal so you can attach the data disk to the VM. You use the IP address to log in to the VM to initialize the data disk after it is attached.

Note: When using the Microsoft Remote Desktop Client as your RDP software to connect to the VM, ensure it is the most up-to-date version. For example, the default RDP software in the Windows 7 operating system is not at a high enough version. The version must be version 8 or higher.
Verify you have at least one of the following credentials (user name and password) to log in to the VM's guest Windows operating system, according to how the VM was created.
How the VM was created Credentials to use to log in

Import Virtual Machine wizard, from the Imported VMs page.

Starting with the December 2019 service release date, the Import Virtual Machine wizard provides the option of either having the wizard-created VM joined to a specified Active Directory domain or not having the VM joined to the domain at the end of the creation process.

  • If the VM was created with the wizard's Domain Join toggle enabled, you can use either the credentials for a domain account in the specified Active Directory domain or use the local administrator account that was specified in the wizard.
  • If the VM was created with the wizard's Domain Join toggle turned off, you must use the local administrator account that was specified in the wizard. In this case, because the VM is not joined to the domain, the local administrator account is the only account that has access to log in.

Manual preparation steps.

Typically you do not need to join the VM to your Active Directory domain when you manually build the VM. To log in to that VM, use one of the following:

  • The credentials for the local administrator account that was specified when the manually built VM was created in the Microsoft Azure portal.
  • If you manually joined that VM to an Active Directory domain, the credentials for a domain account in that domain.
Important: Starting with pod manifest 1230 and later, domain accounts can direct connect to domain-joined image VMs that have the agent software installed. Prior to pod manifest 1230, the agent software installed in a domain-joined VM prevented domain accounts from directly connecting to that VM. Please note that such manifests that are earlier than 2298 are out of support and must be updated, as described in KB 86476.

Procedure

  1. In the Microsoft Azure portal, locate the image VM and display the VM's details page.
    One method to locate the VM is to use the portal's search bar to search for the VM by name.
  2. Make note of the VM's resource group to use it in the portal's Create Managed Disk page .
    Image VMs used in Horizon Cloud are located in a resource group with a name in the pattern vmw-hcs-podID-base-vms where podID is the pod's identifier. In the Horizon Cloud administrative console, the pod ID is listed in the pod's details page from the Capacity page.
  3. Add a new data disk to the VM.
    1. Displays the VM's Disks page.
    2. Take the displayed action for creating and attaching a new disk.
      As of this writing, the Microsoft Azure portal labels this choice Create and attach a new disk.
    3. Follow the on-screen fields, make the selections you want and give the disk a name.
    4. At the top of the VM's Disks page, click Save to complete creating and attaching the new data disk to the VM.
    At this point, the data disk is attached but uninitialized.
  4. Log in to the VM.
    1. Use the VM's IP address in your RDP software to connect to the Windows operating system.
      • If the VM was created with a public IP address, you can use that IP address in your RDP software
      • If the VM has a private IP address, you must RDP into it by one of these two methods:
        • Using another VM in your Microsoft Azure subscription that does have a public IP address and doing an outbound RDP into the image VM.
        • Use your VPN and RDP into the image VM over your corporate network
      Note: To access a VM that is running the agent-related software components, the version of the Remote Desktop Client must be version 8 or later. Otherwise, the connection fails. Using the most up-to-date Remote Desktop Client is recommended.
    2. Log in to the Windows operating system using credentials (user name and password) as described in the prerequisites here.
      When using the local administrator account credentials that were specified in the Import Image wizard when the VM was created, enter the username as \username.
      Note: When the VM is a domain-joined VM, as described in the prerequisites here, and you want to use a domain account instead of the local administrator account, enter the user name as domain\username where domain is the name of the domain.
  5. In the VM, perform the steps to initialize and format the data disk, as described in the Microsoft Azure documentation topic Initialize a new data disk.

Results

At this point, the image VM has a formatted, empty data disk. If you want to load the data disk with any content you want to provide to your end users in the disk's initial configuration, you can add the content at any time until you publish the image.