Nutanix AutoScale
Table of Contents
This guide will walk you through configuring autoscaling for Kasm Workspaces on Nutanix. Autoscaling in Kasm Workspaces automatically provisions and destroys agents based on user demand, ensuring optimized resource utilization and cost efficiency.
Overview
Prerequisites
Access to Nutanix:
Ensure you have admin access to your Nutanix environment
Ensure you have a directory service or identity provider configured
Ensure you have two users, one to administer the project and create VMs, one to access the Nutanix APIs.
Kasm Workspaces Installed: A basic setup of Kasm Workspaces must already exist
Understand Key Concepts:
Zones: Logical groupings of Kasm services for geographical or organizational segmentation
Pools: Logical groupings of Kasm Docker Agents and Server Pools for load balancing
Plan Your Configuration:
Understand your deployment zone requirements
Have access to your Nutanix server details; target clusters, projects, storage, networks, etc.
Create VMs in the project you have designated for your autoscale VMs
Setup your Nutanix environment
Create a new Nutanix Role
Log into your Nutanix Prism Central UI as an administrator.
Navigate to the Admin Center dashboard.
Select IAM -> Roles -> Create Role -> New role.
Enter a value for the Role Name field (e.g. kasm-role).
Add all the operations from the list of required permissions corresponding to the Nutanix API version you plan to use, ensure that any related operations are also added.
Click Save.

Create Role
Create a new Nutanix Project
Log into your Nutanix Prism Central UI as an administrator.
Navigate to the Admin Center dashboard.
Select Projects -> Create Project.
Enter a value for the Project Name field (e.g. kasm-autoscale).

Create Project
Select Add Users -> Add/Edit Users & Groups.
Click Add User.
Enter the name of a valid user in the Name field. This user will administer the project, create Virtual Machine templates, upload images, etc.
From the Role drop-down menu, select the default Project Admin role.
Click Add User.
Enter the name of a valid user in the Name field. This user will be configured in the Kasm Provider to access the Nutanix APIs.
From the Role drop-down menu, select the new role created above (e.g. kasm-role).
Ensure Allow Collaboration is enabled.
Click Save Users and Project.

Add Users
Select Add Infrastructure -> Add Infrastructure.
From the drop-down menu, select the Infrastructure Endpoint that will be used to provision Kasm autoscale resources.
Click Configure Resources.
From the drop-down menu, select the Cluster.
Click Select VLANs.
Click the checkbox next to the VLAN that will be used to provide network access for Kasm autoscale resources.

Configure Resources
Click Confirm and Select Default.
Click Confirm.
Click Save.
Configure VM Provider Details on Kasm
Follow AutoScale Settings for Agent Pool or AutoScale Settings for Server Pool to create to create a new AutoScale config, or select Create New in VM Provider Configs if you already have one.
Set Provider to Nutanix
Configure the following settings:
Setting |
Description |
---|---|
Name |
An identifying name for this provider configuration e.g. Nutanix Docker Agent Autoscale Provider |
Max Instances |
The maximum number of autoscale instances to be provisioned, regardless of other settings |
Host |
The IP or FQDN of the Nutanix Prism Central server (e.g. 192.168.100.40 or nutanix.example.com) |
Port |
The listening port to the Nutanix Prism Central server. This is usually 9440 |
Username |
The name of the user that KASM will use to access the Nutanix Prism Central server |
Password |
The Password of the user that KASM will use to authenticate against the Nutanix Prism Central server |
Verify SSL |
Whether to validate SSL certificates. Set to False to enable self-signed certificates. Defaults to True |
API Version |
The API version used to communicate with Prism Central. v3 is recommended, v4 compatibility is currently in Preview |
VM Candidate Name |
The name of the VM used to clone new autoscaled VMs |
VM Cores |
The number of CPU cores to provision on the new autoscaled VMs |
VM Memory |
The amount of memory, in Gibibyte (GiB), to provision on the new autoscaled VMs |
Startup Script |
When VMs are provisioned, this script is executed and is responsible for installing and configuring the Kasm Agent for Docker Agent roles, or the Kasm Desktop Service for Windows VMs if desired. Bash scripts and cloud-config yaml formats are supported on a Linux host and Powershell scripts on Windows hosts Example scripts are available on our GitHub repository |
Submit the Provider Config.
Note
Support for Nutanix API Version 4 is in Preview.
Test your Nutanix Autoscaling setup
If you have configured non-zero Standby/Minimum Available Session values agents should start provisioning immediately. Otherwise, try launching multiple workspaces to increase resource utilization, prompting Kasm to autoscale new agents.
Provision a Workspace
Go to Workspaces > Registry
Make multiple workspaces available
Go to the Workspaces dashboard and launch sufficient workspace sessions to exceed your resource standby thresholds
Monitor the provisioning of new agents by going to “Infrastructure” -> “Agents”
Verify new VM instances in Nutanix
Check Downscaling
Terminate sessions to reduce resource usage
Confirm that Kasm removes agents after the back-off period
How to create an Ubuntu 24LTS VM
Create Nutanix Ubuntu installation image
Log into your Nutanix Prism Central UI as an administrator.
Navigate to the Infrastructure Center dashboard.
Select Images -> Add Image.
From the Image Source options list, select the URL option.
Enter the URL for a valid Ubuntu24 LTS ISO in the Image URL field (e.g. ref).
Click Add URL.

Create image
Enter the name for the ISO in the Name field (e.g. kasm-ubuntu-iso).
Ensure that ISO is selected from the Type drop-down menu.
Click Next.

Select Image
Click Save.

Select Location
Wait for the upload to complete.
Create Nutanix Ubuntu VM
Log into your Nutanix Prism Central UI as an administrator.
Navigate to the Infrastructure Center dashboard.
Select VMs -> Create VM.
Enter a value for the Name field (e.g. kasm-ubuntu-template).
From the Project drop-down menu, select the Nutanix Project that was just created (e.g. kasm-autoscale).
From the Cluster drop-down menu, select the Nutanix Cluster that will be used to provision Kasm autoscale resources.
In the Cores Per CPU section, enter the number of cores to provision for this VM (e.g. 4).
In the Memory section, enter the amount of memory to provision for this VM (e.g. 4).

VM Configure
Click Next.
Click Attach Disk.
Ensure that Disk is selected from the Type drop-down menu.
Ensure that Allocate from Storage Container is selected from the Operation drop-down menu.
From the Storage Container drop-down menu, select the Nutanix Storage Container to use when provisioning this VM.
In the Capacity section, enter the amount of storage to provision for this VM (e.g. 150).
Ensure that SCSI is selected from the Bus Type drop-down menu.
Click Save.
Click Attach Disk.
Ensure that CD-ROM is selected from the Type drop-down menu.
Ensure that Clone from Image is selected from the Operation drop-down menu.
From the Image drop-down, select the Ubuntu installation image you uploaded previously.
Ensure that SATA is selected from the Bus Type drop-down menu.
Click Save.
Click Attach to Subnet.
From the subnet drop-down, select the Nutanix Subnet to use when provisioning this VM.
Ensure that Connected is selected from the Network Connection State drop-down menu.
Click Save.

VM Resources
Click Next.
Click Next.
Click Create VM.
From the list of VMs, right-click the newly created VM, select Power Operations and then select Power On.
Install the OS.
From the list of VMs, right-click the newly created VM, select Update.
Click Next.
In the list of Disks, click the delete icon next to the CD-ROM containing the installation ISO image.
Click Save.
SSH into the newly created VM with the credentials created during OS installation.
Run the following terminal commands:
sudo truncate -s 0 /etc/machine-id
sudo truncate -s 0 /var/lib/dbus/machine-id
How to create a Windows 2025 Server VM
Create Nutanix Windows installation image
Log into your Nutanix Prism Central UI as an administrator.
Navigate to the Infrastructure Center dashboard.
Select Images -> Add Image.
Click Add File.
Select a valid Windows 2025 Server ISO from the File Upload window.
Click Open.

Create image
Enter the name for the ISO in the Name field (e.g. kasm-windows-iso).
Ensure that ISO is selected from the Type drop-down menu.
Click Next.

Select Image
Click Save.

Select Location
Wait for the upload to complete.
Create Nutanix VirtIO driver image
Log into your Nutanix Prism Central UI as an administrator.
Navigate to the Infrastructure Center dashboard.
Select Images -> Add Image.
From the Image Source options list, select the URL option.
Enter the URL for a valid VirtIO Driver ISO in the Image URL field (e.g. ref).
Click Add URL.
Ensure that ISO is selected from the Type drop-down menu.
Click Next.
Click Save.
Wait for the upload to complete.
Create Nutanix Windows VM
Log into your Nutanix Prism Central UI as an administrator.
Navigate to the Infrastructure Center dashboard.
Select VMs -> Create VM.
Enter a value for the Name field (e.g. kasm-windows-template).
From the Project drop-down menu, select the Nutanix Project that was just created (e.g. kasm-autoscale).
From the Cluster drop-down menu, select the Nutanix Cluster that will be used to provision Kasm autoscale resources.
In the Cores Per CPU section, enter the number of cores to provision for this VM (e.g. 4).
In the Memory section, enter the amount of memory to provision for this VM (e.g. 4).

VM Configure
Click Next.
Click Attach Disk.
Ensure that Disk is selected from the Type drop-down menu.
Ensure that Allocate from Storage Container is selected from the Operation drop-down menu.
From the Storage Container drop-down menu, select the Nutanix Storage Container to use when provisioning this VM.
In the Capacity section, enter the amount of storage to provision for this VM (e.g. 150).
Ensure that SCSI is selected from the Bus Type drop-down menu.
Click Save.
Click Attach Disk.
Ensure that CD-ROM is selected from the Type drop-down menu.
Ensure that Clone from Image is selected from the Operation drop-down menu.
From the Image drop-down, select the Windows installation image you uploaded previously.
Ensure that SATA is selected from the Bus Type drop-down menu.
Click Save.
Click Attach Disk.
Ensure that CD-ROM is selected from the Type drop-down menu.
Ensure that Clone from Image is selected from the Operation drop-down menu.
From the Image drop-down, select the VirtIO driver image you uploaded previously.
Ensure that SATA is selected from the Bus Type drop-down menu.
Click Save.
Click Attach to Subnet.
From the subnet drop-down, select the Nutanix Subnet to use when provisioning this VM.
Ensure that Connected is selected from the Network Connection State drop-down menu.
Click Save.
Ensure that Secure Boot is enabled.
Ensure that Attach vTPM is enabled.

VM Resources
Click Next.
Click Next.
Click Create VM.
From the list of VMs, right-click the newly created VM, select Power Operations and then select Power On.
From the list of VMs, right-click the newly created VM, select Launch Console.
Click a button to Press any key to boot from CD or DVD.
Click Next.
Click Next.
Click the checkbox that starts with I agree.
Click Next.
Select Window Server 2025 Standard Evaluation (Desktop Experience).
Click Next.
Click Accept to agree to the Applicable notices and license terms.
Click Load Driver.
Click Browse.
Expand the CD Drive containing the VirtIO drivers.
Navigate to the vioscsi/2k25/amd64 folder.
Click Ok.
Select Red Hat VirtIO SCSI pass-through controller.
Click Install.
Click Load Driver.
Click Accept to agree to the Applicable notices and license terms.
Click Browse.
Expand the CD Drive containing the VirtIO drivers.
Navigate to the NetKVM/2k25/amd64 folder.
Click Ok.
Select Red Hat VirtIO Ethernet Adapter.
Click Install.
Click Load Driver.
Click Accept to agree to the Applicable notices and license terms.
Click Browse.
Expand the CD Drive containing the VirtIO drivers.
Navigate to the Balloon/2k25/amd64 folder.
Click Ok.
Select VirtIO Balloon Driver.
Click Install.
Click Next.
Click Install.
Enter a valid password for the built-in Administrator.
Confirm the password.
Click Finish.
Click the Ctrl-Alt-Del icon in the console menu to send Ctrl-Alt-Del.
Enter the Administrator password.
Click Accept.
Launch File Explorer.
Navigate to the CD Drive containing the VirtIO drivers.
Launch the virtio-win-gt-x64 installer.
Click Next.
Click the checkbox starting with I accept.
Click Next.
Click Next.
Click Install.
Click Finish.
Download a valid Windows Cloudinit installer (ref).
Launch the installer.
Click Next.
Click the checkbox starting with I accept.
Click Next.
Click Next.
Ensure that Run Cloudbase-init service as LocalSystem is enabled.
Click Next.
Click Install
Allow any Windows User Account Control pop-ups that request changes to the system.
Click Finish.
Select Local Server from the Server Manager.
Click on the Disabled link next to Remote Desktop.
Click Allow remote connections to this computer.
Click Ok.
Click Apply.
Open the Start Menu
Enter the value powershell into the search field.
Click Run as administrator from the Windows PowerShell application menu.
Execute the following command in the PowerShell console:
Set-ExecutionPolicy Unrestricted
Shut down Windows.
From the list of VMs, right-click the newly created VM, select Update.
Click Next.
In the list of Disks, click the delete icon next to the CD-ROM containing the Windows installation image.
In the list of Disks, click the delete icon next to the CD-ROM containing the VirtIO driver image.
Click Save.
Required Permissions
API v3
AHV VM
Clone Virtual Machine
Delete Virtual Machine
Update Virtual Machine Categories
Update Virtual Machine Power State
View Virtual Machine
Category
Create Or Update Name Category
Create Or Update Value Category
Delete Name Category
Delete Value Category
View Name Category
View Value Category
Cluster
View Cluster
Image
View Image
Marketplace Item
View Marketplace Item
Project
View Project
Subnet
View Subnet
VPC
View VPC
API v4
AHV VM
Associate Virtual Machine Categories
Clone Existing Virtual Machine
Delete Existing Virtual Machine
Power On Virtual Machine
View Existing Virtual Machine
View Virtual Machine Disk
Category
Create Category
Delete Category
View Category
Cluster
View Cluster
Image
View Image
Marketplace Item
View Marketplace Item
Project
View Project
Subnet
View Subnet
Storage Container
View Storage Container
Volume Group
Attach Volume Group To AHV VM
Detach Volume Group From AHV VM
VPC
View VPC