apache / apache/cloudstack

Allow multiple simultaneous console viewers for KVM user VMs

Open
#13,869 4 comments 1 reaction 0 assignees View on GitHub
component:console-proxy component:kvm type:enhancement
Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
6d 19h
Merged PRs (30d)
32

Description

### The required feature described as a wish

##### ISSUE TYPE

* Feature Idea

##### COMPONENT NAME

~~~text
KVM / Console Proxy
~~~

##### CLOUDSTACK VERSION

~~~text
Behavior reproduced on 4.22.1.0.
Feature implementation targets current main (4.23.0.0-SNAPSHOT).
~~~

##### CONFIGURATION

KVM user VMs using the standard CloudStack Console Proxy / noVNC console.

##### OS / ENVIRONMENT

KVM-based CloudStack environment.

##### SUMMARY

Currently, when two users attempt to access the console of the same KVM user VM,
opening the second console disconnects the first viewer.

The Console Proxy already supports using a unique console session UUID as the
viewer key when `sessionRequiresNewViewer` is enabled. This capability can be
used to allow multiple simultaneous console viewers for KVM user VMs.

The proposed change adds a global setting:

`consoleproxy.kvm.multiple.viewers.enabled`

The setting defaults to `false` to preserve the existing single-viewer behavior.

When enabled, each console request for a KVM user VM receives a unique viewer
session so multiple users can remain connected to the same VM console
simultaneously.

The change is restricted to KVM user VMs and does not alter console behavior for
system VMs or other hypervisors.

##### STEPS TO REPRODUCE

~~~text
1. Start a KVM user VM.
2. Log in to CloudStack as User A and open the VM console.
3. Log in separately as User B and open the console of the same VM.
4. Observe User A's console session.
~~~

##### EXPECTED RESULTS

~~~text
Both users should be able to remain connected to the same VM console when
multiple console viewers are enabled.
~~~

##### ACTUAL RESULTS

~~~text
Opening the console as User B disconnects the existing console session for
User A.
~~~

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing Console Proxy handling for KVM user VM console requests and the sessionRequiresNewViewer behavior. Verify how the new consoleproxy.kvm.multiple.viewers.enabled setting should affect viewer sessions, while preserving current behavior when disabled and for system VMs or other hypervisors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.