Skip to content

Conversation

shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Sep 9, 2025

Description

This PR introduces console access support for instances deployed using Orchestrator Extensions, available via either VNC or a direct URL.

  • CloudStack queries the extension using the getconsole action.
  • For VNC-based access, the extension must return host/port/ticket details. CloudStack then forwards these to the Console Proxy VM (CPVM) in the instance’s zone. It is assumed that the CPVM can reach the specified host and port.
  • For direct URL access, the extension returns a console URL with the protocol set to direct, url, or link. The URL is then provided directly to the user.
  • The built-in Proxmox Orchestrator Extension now supports console access via VNC. The extension calls the Proxmox API to fetch console details and returns them in the required format.

Documentation PR: apache/cloudstack-documentation#560

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

proxmox-console.mp4

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Add console access support for the instances deployed using inbuilt
Proxmox Orchestrator extension.
Underlying CloudStack queries Proxmox API for console and then passes
the ticket and host to the CPVM for the zone.
During the flow it is assumed CPVM will be able to access the instance
(Proxmox) host.

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

shwstppr commented Sep 9, 2025

@blueorangutan package

@shwstppr shwstppr added this to the 4.22.0 milestone Sep 9, 2025
@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 66.25000% with 135 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.46%. Comparing base (0526ec0) to head (19814b0).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...com/cloud/agent/api/GetExternalConsoleCommand.java 0.00% 21 Missing ⚠️
.../com/cloud/consoleproxy/vnc/network/NioSocket.java 0.00% 16 Missing ⚠️
.../com/cloud/agent/api/GetExternalConsoleAnswer.java 48.27% 15 Missing ⚠️
...udstack/consoleproxy/ConsoleAccessManagerImpl.java 92.81% 9 Missing and 4 partials ⚠️
...al/provisioner/ExternalPathPayloadProvisioner.java 82.85% 7 Missing and 5 partials ⚠️
...om/cloud/consoleproxy/ConsoleProxyClientParam.java 0.00% 9 Missing ⚠️
...in/java/com/cloud/servlet/ConsoleProxyServlet.java 0.00% 8 Missing ⚠️
...om/cloud/consoleproxy/ConsoleProxyNoVncClient.java 0.00% 8 Missing ⚠️
...hypervisor/external/resource/ExternalResource.java 0.00% 7 Missing ⚠️
...work/extensions/manager/ExtensionsManagerImpl.java 75.00% 2 Missing and 4 partials ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11601      +/-   ##
============================================
+ Coverage     17.39%   17.46%   +0.07%     
- Complexity    15285    15366      +81     
============================================
  Files          5889     5893       +4     
  Lines        526183   526581     +398     
  Branches      64242    64289      +47     
============================================
+ Hits          91542    91980     +438     
+ Misses       424297   424236      -61     
- Partials      10344    10365      +21     
Flag Coverage Δ
uitests 3.61% <ø> (-0.01%) ⬇️
unittests 18.52% <66.25%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14921

Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr shwstppr requested a review from Copilot September 10, 2025 10:09
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Add console access support for instances deployed using the inbuilt Proxmox Orchestrator extension. CloudStack queries the Proxmox API for console credentials and passes them to the CPVM for the zone.

  • Enables console access for External hypervisor instances by removing restriction
  • Implements console command handling for External/Proxmox instances
  • Adds proper authentication bypass for External hypervisors

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ui/src/components/view/ActionButton.vue Removes External hypervisor restriction from console buttons
server/src/main/java/org/apache/cloudstack/consoleproxy/ConsoleAccessManagerImpl.java Adds console connection details handling for External hypervisors with proper fallback logic
server/src/main/java/com/cloud/servlet/ConsoleProxyServlet.java Adds authentication bypass for External hypervisor instances
server/src/main/java/com/cloud/consoleproxy/AgentHookBase.java Adds authentication bypass for External hypervisor instances
server/src/main/java/com/cloud/server/ManagementServerImpl.java Implements getExternalVmConsole method
extensions/Proxmox/proxmox.sh Adds getconsole action for Proxmox VNC proxy support
Multiple test files Comprehensive test coverage for new console functionality
Multiple API/framework files New command classes and framework integration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14936

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shwstppr LGTM - left only some minor comments.

It would worth documenting what CloudStack expects from external extensions in order to display the console correctly.

shwstppr added a commit to shapeblue/cloudstack-documentation that referenced this pull request Sep 11, 2025
@boring-cyborg boring-cyborg bot added the Python Warning... Python code Ahead! label Sep 11, 2025
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14968

@nvazquez
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-14299)

Copy link
Collaborator

@abh1sar abh1sar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shwstppr
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-14317)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 56445 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11601-t14317-kvm-ol8.zip
Smoke tests completed. 146 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 1.17 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 26.86 test_kubernetes_clusters.py

@apache apache deleted a comment from blueorangutan Sep 18, 2025
@apache apache deleted a comment from blueorangutan Sep 18, 2025
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15080

@shwstppr
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@shwstppr shwstppr closed this Sep 20, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.22.0 Sep 20, 2025
@shwstppr shwstppr reopened this Sep 20, 2025
@blueorangutan
Copy link

[SF] Trillian test result (tid-14403)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 58393 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11601-t14403-kvm-ol8.zip
Smoke tests completed. 146 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 1.17 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 27.94 test_kubernetes_clusters.py

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants