Skip to content

UI support for deploy a VM from volume/snapshot #11164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

slavkap
Copy link
Contributor

@slavkap slavkap commented Jul 8, 2025

Description

This PR adds a UI option to deploy a virtual machine with an existing volume or a disk snapshot

These changes depend on #10503

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

  • Major
  • Minor

Screenshots (if appropriate):

The users will have the option to choose how to deploy a new virtual machine - Template/ISO/Volume/Snapshot
image
image

How Has This Been Tested?

manual tests

Copy link

codecov bot commented Jul 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.34%. Comparing base (76cfcb4) to head (d326104).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11164      +/-   ##
============================================
+ Coverage     17.17%   17.34%   +0.17%     
- Complexity    14993    15186     +193     
============================================
  Files          5869     5883      +14     
  Lines        521728   524501    +2773     
  Branches      63506    64003     +497     
============================================
+ Hits          89604    90999    +1395     
- Misses       422053   423219    +1166     
- Partials      10071    10283     +212     
Flag Coverage Δ
uitests 3.63% <ø> (-0.13%) ⬇️
unittests 18.38% <ø> (+0.23%) ⬆️

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.

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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 ✔️ debian ✔️ suse15. SL-JID 14162

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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.

@sureshanaparti
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@vishesh92 vishesh92 requested a review from Copilot July 26, 2025 08:22
Copy link

@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

This PR adds UI functionality to deploy virtual machines from existing volumes and disk snapshots, expanding beyond the existing template and ISO options.

Key changes:

  • Added volume and snapshot radio button options in the image selection UI
  • Implemented volume and snapshot fetching logic with filtering for unattached volumes and root snapshots
  • Added form handling and validation for volume and snapshot deployment parameters

Reviewed Changes

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

File Description
ui/src/views/compute/wizard/OsBasedImageSelection.vue Added radio buttons for volume and snapshot selection options
ui/src/views/compute/DeployVM.vue Core implementation including form fields, data fetching, validation, and deployment logic for volumes and snapshots
ui/public/locales/en.json Added localization strings for volume and snapshot descriptions

@sureshanaparti
Copy link
Contributor

@slavkap can you check the Copilot comments, are they relevant?

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11164 (QA-JID-691)

@blueorangutan
Copy link

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

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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 ✔️ debian ✔️ suse15. SL-JID 14396

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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 ✖️ debian ✖️ suse15. SL-JID 14416

@slavkap slavkap force-pushed the ui-deploy-vm-from-volume-or-snapshot branch from 07c5d50 to 693539d Compare July 28, 2025 11:29
@slavkap
Copy link
Contributor Author

slavkap commented Jul 28, 2025

@blueorangutan package

@blueorangutan
Copy link

@slavkap 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 ✔️ debian ✔️ suse15. SL-JID 14421

@sureshanaparti
Copy link
Contributor

sureshanaparti commented Jul 29, 2025

@slavkap The volume & snapshots shown in deployment form are not relevant to the category. Volumes are not listed, checked in env with some ROOT & DATA volumes, also uploaded volumes. Can you please check.

  • Instance from Volume
InstanceFromVolume-DeployInstanceForm
  • Instance from Snapshot
InstanceFromSnapshot-DeployInstanceForm

Copy link
Collaborator

@rosi-shapeblue rosi-shapeblue left a comment

Choose a reason for hiding this comment

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

LGTM. I have tested both FE and BE functionalities. It is possible to deploy an Instance from volume as well as from snapshot. The volumes/snapshots are displayed in the Instance creation form.

Screenshot from 2025-07-29 11-38-40 Screenshot from 2025-07-29 11-38-36

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@sureshanaparti
Copy link
Contributor

@slavkap can you check the conflicts

slavkap added 3 commits July 30, 2025 08:57
ui support to deploy a virtual machine with existing volume or a disk
snapshot
Removed OS/User options when using volume/snapshot
refactoring
@slavkap slavkap force-pushed the ui-deploy-vm-from-volume-or-snapshot branch from 693539d to ca09591 Compare July 30, 2025 13:03
@slavkap
Copy link
Contributor Author

slavkap commented Jul 30, 2025

@slavkap The volume & snapshots shown in deployment form are not relevant to the category. Volumes are not listed, checked in env with some ROOT & DATA volumes, also uploaded volumes. Can you please check.

* Instance from Volume
InstanceFromVolume-DeployInstanceForm
* Instance from Snapshot
InstanceFromSnapshot-DeployInstanceForm

@sureshanaparti, I have removed the option to choose OS/user because those aren't used with the snapshot/volume option
image

@slavkap
Copy link
Contributor Author

slavkap commented Jul 30, 2025

@blueorangutan package

@blueorangutan
Copy link

@slavkap 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 ✔️ debian ✔️ suse15. SL-JID 14473

@sureshanaparti
Copy link
Contributor

LGTM, able to create instance

  • from a detached volume (a ROOT volume, or a volume created from ROOT volume's snapshot in Zone-wide pool and having valid template details. Otherwise, it fails with "The provided volume/snapshot doesn't have a template to deploy a VM").
  • from snapshot (of a ROOT volume).

UI listed only detached volumes in Ready state, and snapshots of ROOT volumes. Volumes in Zone-wide pools are only supported for instance creation. Otherwise, it fails with "Deployment of virtual machine is supported only for Zone-wide storage pools".

@slavkap The parameters - oscategoryid, volumefilter, details, isvnf, showicon are not applicable while listing volumes, and oscategoryid, snapshotfilter, details, isvnf, showicon are not applicable while listing snapshots. Also, listOsCategories is called before listVolumes and listSnapshots, which is not required. Can you check this.

removed unnecessary API params
@sureshanaparti
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11164 (QA-JID-711)

removed invoking of listOsCategories when listing volumes or snapshots
@sureshanaparti
Copy link
Contributor

Verified the list volumes and snapshots calls locally, these parameters are removed. Also, listOsCategories is not called. Thanks @slavkap

@sureshanaparti sureshanaparti merged commit adccdf2 into apache:main Jul 31, 2025
23 of 26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 31, 2025
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.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy