Repository navigation
Description
Existing Resources
- Please search the existing issues for related problems
- Consult the product documentation : Docs
- Consult the FAQ : FAQ
- Consult the Troubleshooting Guide : Guide
- Reviewed existing training videos: Youtube
Describe the bug
When an autoscaled VM fails to become ready (no IP within the timeout, or no check-in), the manager destroys it and
provisions a replacement right away. There's no backoff, no retry limit and no "provisioning keeps failing" alert,
so the loop continues for as long as the cause lasts.
On a bridged network with LAN DHCP, every replacement VM boots with a new random MAC and takes a new DHCP lease.
Destroyed VMs don't give their lease back (Windows doesn't send DHCPRELEASE on shutdown), so each cycle permanently
uses an address until the gateway's lease expires. In our lab this filled the whole /24 pool of the LAN gateway:
- The gateway's device table held 69 leases named
kasm<server_id prefix>. 65 of them belong to servers that never
hosted a session (no row inaccounting); they were standby VMs that were replaced. - Once the pool was full, new VMs got no DHCP offer (169.254.x), so the manager logged
Failed to obtain IP address,
destroyed the VM and created the next one, which made the outage self-sustaining. It also affected every other
device on that LAN that needed a new lease.
Manager log, one cycle (repeats every ~11 minutes; 5 VMs provisioned in one hour):
04:42:31 [INFO] Provisioning VM for Server (281ea95b-...)
04:42:31 [INFO] Creating VM (kasm-dynamic-agent-281ea9-vm)
04:52:48 [ERROR] Failed to obtain IP address
04:52:48 [INFO] Destroying Server! (281ea95b-...)!
04:53:08 [INFO] PVC: (kasm-dynamic-agent-281ea9-pvc) destroyed
04:53:08 [ERROR] Failed to provision server_id (281ea95b...) with provider (harvester)
04:53:25 [INFO] Provisioning VM for Server (46412c...) <- immediately, same failure follows
To Reproduce
- Harvester VM Provider with a bridged (multus/bridge) network on a LAN that uses DHCP, and an autoscale config with
minimum_pool_standby_sessions: 1(we use a Server Pool / RDP config, Windows Server 2025,reusable: false). - Make provisioning fail after the VM has a lease, for example a startup script that can't reach the Kasm API, or
(simplest) shrink the DHCP pool so a VM gets no IP. - Watch the manager: it destroys and re-creates the VM in a loop. Count the new leases on the DHCP server.
Expected behavior
- Exponential backoff (or a configurable retry limit) for repeated provisioning failures of the same autoscale
config, plus a clear error in the UI/alerts ("provisioning failed N times in a row"). - Optionally, let the Harvester/KubeVirt provider reuse MAC addresses (a small MAC pool per autoscale config), or
document that providers on DHCP networks should use short leases or an overlay network with its own IPAM.
Workspaces Version
1.19.0 (kasmweb/*:1.19.0-rolling)
Workspaces Installation Method
Single Server, plus autoscaled Docker Agents and an RDP Server Pool (Harvester VM Provider)
Workspace Server Information
uname -a: Linux kasm 6.8.0-142-generic x86_64/etc/os-release: Ubuntu 24.04.5 LTS- Docker 29.8.2
- Harvester v1.9.0 (KubeVirt), VMs on a bridge network to the LAN; gateway lease time was 7 days
Additional context
- Our workaround: moved the autoscaled VMs to a Kube-OVN overlay subnet with its own DHCP (natOutgoing), gave the Kasm
host a second NIC on it, and shortened the gateway's lease time to 4 h. - Related, from the same setup: [Bug] - Harvester VM provider hardcodes storageClassName "longhorn-<image>"; agent PVCs stay Pending on Harvester v1.9 (lh-<uuid>) and with CDI-backed images #914 (Harvester StorageClass name), [Feature Request] - Validate VM provider startup script placeholders; provisioning only logs a bare KeyError (e.g. 'var') #917 (startup-script placeholder errors).
Activity