Skip to content

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

Merged
sureshanaparti merged 5 commits into
apache:mainfrom
storpool:ui-deploy-vm-from-volume-or-snapshot
Jul 31, 2025
Merged

UI support for deploy a VM from volume/snapshot#11164
sureshanaparti merged 5 commits into
apache:mainfrom
storpool:ui-deploy-vm-from-volume-or-snapshot

Conversation

@slavkap

@slavkapslavkap commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

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

@codecov

codecovBot commented Jul 8, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.34%. Comparing base (76cfcb4) to head (d326104).
⚠️ Report is 64 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 
FlagCoverage Δ
uitests3.63% <ø> (-0.13%)⬇️
unittests18.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
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown
Contributor

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@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 CopilotJuly 26, 2025 08:22

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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.

FileDescription
ui/src/views/compute/wizard/OsBasedImageSelection.vueAdded radio buttons for volume and snapshot selection options
ui/src/views/compute/DeployVM.vueCore implementation including form fields, data fetching, validation, and deployment logic for volumes and snapshots
ui/public/locales/en.jsonAdded localization strings for volume and snapshot descriptions

Comment threadui/src/views/compute/DeployVM.vue Outdated
Comment threadui/src/views/compute/DeployVM.vue Outdated
Comment threadui/src/views/compute/DeployVM.vue Outdated
@sureshanaparti

Copy link
Copy Markdown
Contributor

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

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown

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

@slavkap
slavkapforce-pushed the ui-deploy-vm-from-volume-or-snapshot branch from 07c5d50 to 693539dCompareJuly 28, 2025 11:29
@slavkap

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

sureshanaparti commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

@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

@RosiKyuRosiKyu left a comment

Copy link
Copy Markdown
Collaborator

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-40Screenshot from 2025-07-29 11-38-36

@DaanHooglandDaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clgtm

Comment threadui/src/views/compute/DeployVM.vue Outdated
@github-actions

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@slavkap can you check the conflicts

ui support to deploy a virtual machine with existing volume or a disk
snapshot
Removed OS/User options when using volume/snapshot
refactoring
@slavkap
slavkapforce-pushed the ui-deploy-vm-from-volume-or-snapshot branch from 693539d to ca09591CompareJuly 30, 2025 13:03
@slavkap

Copy link
Copy Markdown
ContributorAuthor

@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
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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
Copy Markdown
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:mainJul 31, 2025
24 of 26 checks passed
@github-project-automationgithub-project-automationBot moved this from In Progress to Done in Apache CloudStack 4.21.0Jul 31, 2025
@slavkap
slavkap deleted the ui-deploy-vm-from-volume-or-snapshot branch July 31, 2025 15:23
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 6, 2025
* UI support for deploy a virtual machine with existing volume or a disk snapshot
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants

@slavkap@sureshanaparti@blueorangutan@DaanHoogland@RosiKyu