--- myst: html_meta: "description lang=en": "Learn how to configure autoscaling for Kasm Workspaces on VMware vSphere. This guide covers prerequisites, vSphere user permissions, VM provider setup, autoscaling testing, and optimization to ensure dynamic resource allocation." "keywords": "Kasm, VMware, vSphere, Pooling, Pool, autoscale, autoscaling, auto, scale, VM" "property=og:locale": "en_US" --- ```{title} VMWare vSphere Autoscaling ``` # VMware vSphere AutoScale ```{contents} Table of Contents :depth: 3 :local: ``` This guide will walk you through configuring autoscaling for Kasm Workspaces on VMware vSphere. Autoscaling in Kasm Workspaces automatically provisions and destroys agents based on user demand, ensuring optimized resource utilization and cost efficiency. ```{raw} html ``` ## Overview ### Prerequisites * Access to VCenter: Ensure you have admin access to your VCenter environment * 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 Vcenter server details; target clusters, datastores, networks, etc. * Create template images for AutoScale to use ### Setup your vSphere environment - **Create an account**: We recommend creating a dedicated VCenter user for use with Kasm AutoScale. - **Create a Kasm AutoScale role**: Create a new role to use with Kasm AutoScale. The following minimum permissions set is required: * **Datastore** * Allocate space * Browse datastore * **Global** * Cancel task * **Network** * Assign network * **Resource** * Assign virtual machine to resource pool * **Virtual machine** * Change Configuration * Change CPU count * Change Memory * Set annotation * Edit Inventory * Create from existing * Create new * Remove * Unregister * Guest operations * Guest operation modifications * Guest operation program execution * Guest operation queries * Interaction * Power off * Power on * Provisioning * Deploy template ```{figure} /images/autoscaling/providers/vmware/vsphere_role_permissions.png :align: center **Create AutoScale role in vSphere** ``` - **Assign Role to User**: Assign the created role to the Kasm AutoScale user account. ```{figure} /images/autoscaling/providers/vmware/vsphere_assign_role_to_user.png :align: center **Assign AutoScale role to user** ``` - **Create a VM template**: Create the appropriate VM template based on whether you are implementing Server AutoScaling or Docker AutoScaling on vSphere. * For Windows AutoScaling, follow the [Windows Templating Guide.](../windows_autoscale_templates.md) * For Docker Agent AutoScaling, create a Linux VM template using Ubuntu Jammy as the base OS. ## Configure VM Provider Details on Kasm ```{eval-rst} * Follow :ref:`autoscale_docker_config` or :ref:`autoscale_server_config` to create to create a new AutoScale config, or select **Create New** in **VM Provider Configs** if you already have one. * Set Provider to VMWare Vsphere * Configure the following settings: ``` ```{include} /guide/compute/vm_providers/vmware.md ``` * Submit the Provider Config ```{note} When configuring VMware vSphere with Kasm Workspaces, one important item to keep in mind is datastore storage. When clones are created VMware will attempt to satisfy the clone operation if the datastore runs out of space, any VMs that are running on that datastore will be paused until space is available. Kasm Workspaces recommends that critical management VMs such as the Vcenter server VM and cluster management VMs are on separate datastores that are not used for Kasm autoscaling. ``` ## Test your VMWare vSphere 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 Proxmox * Check Downscaling * Terminate sessions to reduce resource usage * Confirm that Kasm removes agents after the back-off period