FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

KVM: Option to deploy a VM with existing volume/snapshot by slavkap · Pull Request #10503 · apache/cloudstack · GitHub

Repository navigation

KVM: Option to deploy a VM with existing volume/snapshot - #10503

Merged
sureshanaparti merged 8 commits into
apache:mainfrom
storpool:deploy-vm-with-existing-volume-or-snapshot
Jul 14, 2025
Merged

sureshanaparti merged 8 commits into
apache:mainfrom
storpool:deploy-vm-with-existing-volume-or-snapshot

Conversation

slavkap commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

Description

This PR allows the users to deploy virtual machines with an existing volume or a snapshot.
For now it is limited only for KVM hypervisors and Zone-wide storage pools

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

How Has This Been Tested?

Environment
OS - Rocky Linux 8.9
2 Zones with one agent host on each
hypervisor KVM

Tested manually and with smoke tests with StorPool and NFS as a primary storage

codecov Bot commented Mar 5, 2025 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.90%. Comparing base (16c60c7) to head (b36e05b).
⚠️ Report is 186 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (16c60c7) and HEAD (b36e05b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (16c60c7) HEAD (b36e05b)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #10503       +/-   ##
=============================================
- Coverage     16.57%    3.90%   -12.68%     
=============================================
  Files          5743      414     -5329     
  Lines        510494    33746   -476748     
  Branches      62075     6075    -56000     
=============================================
- Hits          84617     1317    -83300     
+ Misses       416415    32273   -384142     
+ Partials       9462      156     -9306     
Flag Coverage Δ
uitests 3.90% <ø> (ø)
unittests ?

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.

bernardodemarco added this to the 4.21.0 milestone Mar 5, 2025

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Test Result Time (s) Test File
ContextSuite context=TestSharedNetworkWithConfigDrive>:setup Error 1520.36 test_network.py
test_01_deploy_vm_with_existing_volume Error 7.34 test_vm_lifecycle_with_snapshot_or_volume.py
test_02_deploy_vm_with_existing_snapshot Error 0.06 test_vm_lifecycle_with_snapshot_or_volume.py
test_03_deploy_vm_with_existing_volume_deleted_template Failure 861.05 test_vm_lifecycle_with_snapshot_or_volume.py
test_04_deploy_vm_with_existing_snapshot_deleted_template Failure 862.76 test_vm_lifecycle_with_snapshot_or_volume.py
test_05_deploy_vm_with_existing_snapshot_deleted_volume Failure 847.20 test_vm_lifecycle_with_snapshot_or_volume.py

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Test Result Time (s) Test File
ContextSuite context=TestSharedNetworkWithConfigDrive>:setup Error 1520.50 test_network.py
test_01_deploy_vm_with_existing_volume Error 0.00 test_vm_lifecycle_with_snapshot_or_volume.py
test_02_deploy_vm_with_existing_snapshot Error 0.00 test_vm_lifecycle_with_snapshot_or_volume.py
test_03_deploy_vm_with_existing_volume_deleted_template Error 0.00 test_vm_lifecycle_with_snapshot_or_volume.py
test_04_deploy_vm_with_existing_snapshot_deleted_template Error 0.00 test_vm_lifecycle_with_snapshot_or_volume.py
test_05_deploy_vm_with_existing_snapshot_deleted_volume Error 0.00 test_vm_lifecycle_with_snapshot_or_volume.py

Copy link
Copy Markdown
Contributor

@slavkap the tests fail because the self doesn't have a snapshot that was supposed to be created in the class setup method. Is this a timing issue?

slavkap commented Mar 12, 2025

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

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.

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_01_deployVMInSharedNetwork Failure 472.97 test_network.py

slavkap commented Jun 27, 2025

Copy link
Copy Markdown
Contributor Author

Hi all,
I believe that the test failure is not related to the changes in the PR. It fails while trying to list the mount path with the error:

AssertionError: False is not true : After umount directory should be empty but contains: ['sudo: unable to resolve host VM-5cc1cc35-742a-46bc-ae8c-6785a06829bf: Temporary failure in name resolution']

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code LGTM - haven't tested it. Only one minor non-blocking comment left

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Test Result Time (s) Test File

DaanHoogland linked an issue Jul 6, 2025 that may be closed by this pull request
sureshanaparti moved this from Done to In Progress in Apache CloudStack 4.21.0 Jul 14, 2025
sureshanaparti merged commit 54b44cc into apache:main Jul 14, 2025
github-project-automation Bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 14, 2025
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jul 16, 2025
* Option to deploy a VM with existing volume/snapshot

* smoke test changes

check if the hypervisor is KVM
check if the primary storage's scope is ZONE wide

* skip all tests if the storage isn't Zone-Wide and the hypervisor isn't KVM

* support StorPool tags

add StorPool tags to a volume created from snapshot or to a volume which
will be attached as a ROOT to a new VM

* Add StorPool tags on the new ROOT volume

* Add the StorPool's tags when volume is created from a snapshot or a
volume is attached as a ROOT to a VM

* Addressed review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

Streamlined Instance Cloning Deploy VM from Snapshot

9 participants


Back | FazBrowse Home | New Git URL