You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "Tonitzpp (via GitHub)" <gi...@apache.org> on 2026/05/11 12:29:50 UTC
[PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Tonitzpp opened a new pull request, #13144:
URL: https://github.com/apache/cloudstack/pull/13144
### Description
Currently, Apache CloudStack's graphical interface does not allow migrating system VMs alongside their volumes.
This PR adds graphical interface support for this operation.
### 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)
- [X] 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
- [X] Minor
### Screenshots (if appropriate):
### How Has This Been Tested?
I went to the system VMs page and migrated a system VM with its volume to another host and primary storage. Through the browser's developer tools, I observed that the `migrateVirtualMachineWithVolume` API was correctly called, and that the migration operation succeeded without any errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "Tonitzpp (via GitHub)" <gi...@apache.org>.
Tonitzpp commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4602647016
@weizhouapache, when I was porting the changes, some modifications were missing from the PR. I have added the missing modifications in the https://github.com/apache/cloudstack/pull/13144/changes/24e01e594d0a32e40d36b30ac50655b86f56491e commit.
I have also changed the description with the screenshot of the tests that I made.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4444261598
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13144?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 3.69%. Comparing base ([`be89e6f`](https://app.codecov.io/gh/apache/cloudstack/commit/be89e6f7c3784672cd0a9f8d0a0101c670162dd2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`24e01e5`](https://app.codecov.io/gh/apache/cloudstack/commit/24e01e594d0a32e40d36b30ac50655b86f56491e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 15 commits behind head on 4.22.
> :exclamation: There is a different number of reports uploaded between BASE (be89e6f) and HEAD (24e01e5). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (be89e6f) | HEAD (24e01e5) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.22 #13144 +/- ##
=============================================
- Coverage 17.68% 3.69% -13.99%
=============================================
Files 5922 448 -5474
Lines 533096 38105 -494991
Branches 65209 7059 -58150
=============================================
- Hits 94275 1409 -92866
+ Misses 428181 36509 -391672
+ Partials 10640 187 -10453
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13144/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/13144/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.69% <ø> (-0.01%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13144/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/13144?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4596081588
@winterhazel a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4497291819
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4476033910
@kiranchavala a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "bernardodemarco (via GitHub)" <gi...@apache.org>.
bernardodemarco commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-5208056673
@GeanJair, thanks for testing!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4596255144
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/13144 (QA-JID-944)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#discussion_r3409957755
##########
ui/src/components/view/InstanceVolumesStoragePoolSelectListView.vue:
##########
@@ -170,7 +170,8 @@ export default {
this.volumes = []
getAPI('listVolumes', {
listAll: true,
- virtualmachineid: this.resource.id
+ virtualmachineid: this.resource.id,
+ listsystemvms: true
}).then(response => {
Review Comment:
`listVolumes` is called with `listsystemvms: true` unconditionally. This component is also used for User VM workflows, and passing `listsystemvms=true` can cause permission/visibility issues for non-admin users. Make `listsystemvms` conditional so it’s only enabled for non-UserVm resource types (SystemVm/VirtualRouter/InternalLbVm/etc.).
##########
ui/src/views/compute/MigrateWizard.vue:
##########
@@ -338,11 +339,11 @@ export default {
submitForm () {
if (this.loading) return
this.loading = true
- const migrateApi = this.isUserVm
- ? this.requiresStorageMigration()
- ? 'migrateVirtualMachineWithVolume'
- : 'migrateVirtualMachine'
- : 'migrateSystemVm'
+ const migrateApi = !this.requiresStorageMigration()
+ ? this.isUserVm
+ ? 'migrateVirtualMachine'
+ : 'migrateSystemVm'
+ : 'migrateVirtualMachineWithVolume'
Review Comment:
The new `migrateApi` selection adds a System VM path that uses `migrateVirtualMachineWithVolume` when storage migration is required. There are existing unit tests for `submitForm()` but they don't cover this new branch (SystemVm + `requiresStorageMigration() === true`), so regressions here may go unnoticed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4507243018
@Tonitzpp
have you tested it ?
it does not work in my testing, the checkbox `Migrate with storage` is not visible in the dialog
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4497488297
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/13144 (QA-JID-929)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "bernardodemarco (via GitHub)" <gi...@apache.org>.
bernardodemarco commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-5178847946
@GeanJair, could you test this one, please?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "winterhazel (via GitHub)" <gi...@apache.org>.
winterhazel commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4444197287
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4444351944
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/13144 (QA-JID-918)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4476027619
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "winterhazel (via GitHub)" <gi...@apache.org>.
winterhazel commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4596077331
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4444211111
@winterhazel a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#discussion_r3273204068
##########
ui/src/views/compute/MigrateWizard.vue:
##########
@@ -338,11 +338,11 @@ export default {
submitForm () {
if (this.loading) return
this.loading = true
- const migrateApi = this.isUserVm
- ? this.requiresStorageMigration()
- ? 'migrateVirtualMachineWithVolume'
- : 'migrateVirtualMachine'
- : 'migrateSystemVm'
+ const migrateApi = !this.requiresStorageMigration()
+ ? this.isUserVm
+ ? 'migrateVirtualMachine'
+ : 'migrateSystemVm'
+ : 'migrateVirtualMachineWithVolume'
Review Comment:
`migrateApi` selection now routes system-VM migrations that require storage motion to `migrateVirtualMachineWithVolume`, but `requiresStorageMigration()` relies on `this.volumes` (local-storage check) and `fetchVolumes()` currently calls `listVolumes` without `listsystemvms=true`. For system VMs this likely returns no volumes, so `requiresStorageMigration()` can incorrectly return false (e.g., auto-select with local volumes), causing `migrateSystemVm` to be used and potentially skipping/failed volume migration. Consider requesting system-VM volumes in `fetchVolumes()` (pass `listsystemvms=true` when migrating non-UserVm) so storage-motion detection and mapping behave correctly for system VMs.
##########
ui/src/components/view/InstanceVolumesStoragePoolSelectListView.vue:
##########
@@ -170,7 +170,8 @@ export default {
this.volumes = []
getAPI('listVolumes', {
listAll: true,
- virtualmachineid: this.resource.id
+ virtualmachineid: this.resource.id,
+ listsystemvms: true
}).then(response => {
Review Comment:
`listsystemvms` is an admin-only parameter on the `listVolumes` API (ListVolumesCmd declares it as `authorized = {RoleType.Admin}`); passing `listsystemvms: true` unconditionally here can cause the volumes fetch to fail for non-root-admin users if this component is ever rendered outside root-admin-only flows. Consider only adding `listsystemvms` when the current user is Admin (or when explicitly needed for system-VM volume listing).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support for migration of system VMs with volumes in the GUI [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13144:
URL: https://github.com/apache/cloudstack/pull/13144#issuecomment-4497286961
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org