Create a VM Template for Nutanix Host Pools

Create a VM Template for Nutanix Host Pools

This article describes the two supported methods for creating and managing VM templates for use with Nutanix host pools in Nerdio Manager. Review both methods before proceeding to determine which approach best fits your environment.

Overview

       How VM templates are used in Nutanix host pools

When creating a Nutanix host pool in Nerdio Manager, a VM template stored in Nutanix Prism Central serves as the source image for session host provisioning. The template must be generalized and contain all required drivers and software before it is used to deploy session hosts.

       Choosing a method

Two methods are available for creating and managing VM templates for Nutanix host pools:

  • Method 1 — Create a VM template in Nutanix Prism Central: The VM template is created and managed directly in Nutanix Prism Central. This method is suitable for environments where image lifecycle management is handled outside of Nerdio Manager.

  • Method 2 — Create and sync a desktop image from Nerdio Manager: Desktop images are managed within Nerdio Manager and synchronized to the Nutanix cluster as a VM template via the Azure Compute Gallery. This method is suitable for environments where image lifecycle management is centralized within Nerdio Manager.

To proceed, select the method that applies to your environment:

Method 1: Create a VM template directly in Nutanix Prism Central

Use this method to build and manage your VM template entirely within Nutanix Prism Central, independent of Nerdio Manager's Desktop Images feature.

       Prerequisites

            System and environment requirements

The following are required before carrying out this procedure:

  • OS image — one of the following:

    • An ISO downloaded manually

    • An image exported from Azure Marketplace:

      1. Open the Azure Portal and create a VM from the desired Marketplace image.

      2. Navigate to the VM's OS disk resource.

      3. Select Export Disk under the disk blade to generate a time-limited SAS URL and download the VHD.

  • Nutanix VirtIO drivers

Important:

  • Azure Marketplace images ship with drivers tuned for the Azure hypervisor. These drivers are incompatible with Nutanix AHV — the VM does not boot if you use a SCSI bus that requires Nutanix VirtIO. Use SATA as the disk bus type when creating the VM in Prism Central. This allows the image to boot without the Nutanix VirtIO drivers pre-installed, after which you can install them inside the VM.

  • Do not enable BitLocker (Secure Boot/vTPM) on the source VM. Sysprep cannot generalize a volume protected by BitLocker, and Trusted Launch VMs cannot be used to create images.

       Procedure

            Sign in to Prism Central

Sign in to Prism Central and switch to the Infrastructure application using the application switcher.

            Upload the image

If the OS image is not already present in Prism Central, upload it as follows:

  1. Navigate to Compute & Storage > Images.

  2. Select Add Image.

  3. Upload your OS image (ISO or VHD).

            Create a VM from the image

  1. Navigate to Compute & Storage > VMs.

  2. Select Create VM and configure the desired hardware (CPU, memory, etc.).

  3. In the Disks section, add a disk with the following settings:

    • Bus type: SATA

    • Operation: Clone from Image

    • Image: select your uploaded image

  4. Add a CD-ROM device (required to mount the VirtIO driver or system ISO during installation).

  5. Power on the VM and connect to it.

            Install VirtIO drivers and software

  1. Mount the Nutanix VirtIO ISO to the CD-ROM and install the drivers.

  2. Install any additional required software.

  3. Verify all drivers are working correctly via Device Manager. There should be no unknown or error devices.

  4. Once VirtIO drivers are installed and verified, change the disk bus type from SATA to SCSI for optimal performance.

            Generalize the VM with Sysprep

  1. Open CMD or PowerShell as Administrator and run:

    %WINDIR%\System32\Sysprep\sysprep.exe /generalize /shutdown /oobe /mode:vm
  2. Wait for Sysprep to complete. The VM shuts down automatically.

  3. If Sysprep fails, check the logs at:

    %WINDIR%\System32\Sysprep\Panther\

Warning: Do not power on the VM after Sysprep has generalized it. Booting a generalized VM corrupts its state — if this happens, you must run Sysprep /generalize again before creating the template.

            Create the VM template

  1. In Prism Central, navigate to Compute & Storage > VMs and locate the VM you wish to work with.

  2. Right-select the VM and select Create VM Template.

  3. Follow the prompts in the wizard, entering a name and optionally a description.

  4. Select Save.

            Clean up

Once the VM template is successfully created, the source VM can be deleted.

Method 2: Create and sync a desktop image from Nerdio Manager

Use this method to stage an image in Azure — either a public image from Azure Marketplace or your own custom image — and synchronize it to your Nutanix cluster as a VM template. Nerdio Manager supports four entry points for this workflow. Select the one that applies to your environment and follow the corresponding procedure:

       Nutanix-specific configuration

When configuring the image in Nerdio Manager the following settings are required to enable synchronization to Nutanix:

  • Geographic Distribution & Azure Compute Gallery: Toggle this option on.

  • Azure Compute Gallery: From the drop-down list, select an Azure Compute Gallery.

  • Nutanix Cluster: From the drop-down list, select the Nutanix cluster where the image should be synchronized.

Select Now to synchronize immediately, or Save & Close to schedule the synchronization. Job progress is available in the logs.

       How synchronization works

Only managed image versions with a status of Active or Staged are synchronized to Nutanix. Unmanaged (backup) versions are not synchronized.

On initial synchronization, Nerdio Manager copies the disk from Azure, creates a Nutanix image and VM, converts the VM to a template, and removes the temporary resources. The resulting Nutanix template becomes the synchronization target for all future updates.

On subsequent synchronizations, the existing template is updated in place rather than replaced. A temporary VM is created from the existing template, its disk is swapped for the new image, the template update is completed, and all temporary resources are removed. The existing template is updated with a new template version.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Please sign in to leave a comment.