cloudstack
cloudstack copied to clipboard
[KVM] Skip volumes on shared storage when live migrating VM with local volumes (root / datadisk)
Description
The new release Libvirt-Java v0.5.3 now supports virDomainMigrate3
[1],[2], a powerful and flexible domain migrate command in Libvirt. This command allows pointing just the Root volume to be migrated, saving a lot of compute resources, network bandwidth, and time.
Likely, data disks hold TBs of data, while Root volumes hundreds of GBs. This allows saving crucial time, bandwidth, and processing.
It can easily save several hours to offload a KVM machine depending on the amount of VMs to be migrated and data disks attached to the respective VMs.
[1] Libvirt-Java
[2] commit that added virtDomainMigrate3
into the Libvirt-Java
Fore reference, PR https://github.com/apache/cloudstack/pull/6472 added libvirt-java v0.5.3
into CloudStack.
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)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [X] Major
- [ ] Minor
Screenshots (if appropriate):
How Has This Been Tested?
Tested migration of VM with local Root (50GB) + data-disk (100GB)
- As an example, this is a scenario without this PR:
~# virsh domjobinfo i-2-345-VM
Job type: Unbounded
Operation: Outgoing migration
Time elapsed: 17063 ms
Data processed: 2.938 GiB
Data remaining: 147.065 GiB
Data total: 150.004 GiB
File processed: 2.938 MiB
File remaining: 147.065 GiB
File total: 150.004 GiB
Data total 150.004 GiB
- When testing the same migration but with the changes of the PR:
~# virsh domjobinfo i-2-345-VM
Job type: Unbounded
Operation: Outgoing migration
Time elapsed: 10300 ms
Data processed: 952.000 MiB
Data remaining: 49.070 GiB
Data total: 50.000 GiB
File processed: 952.000 MiB
File remaining: 49.070 GiB
File total: 50.000 GiB
Data total 50.000 GiB
@blueorangutan package
@DaanHoogland a 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.
Packaging result: :heavy_check_mark: el7 :heavy_multiplication_x: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3654
@GabrielBrascher can you have a look on the conflicts
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@DaanHoogland I was going to fix the branch conflict but then realise that it happens on main but not on 4.17.
Do you guys feel like this would be fine to be added in 4.17.1? @harikrishna-patnala @rohityadavcloud @DaanHoogland @wido @nvazquez others Or should I target it to the main?
It could be placed as bugfix (since cloudstack migrates disks that are not desired due to Libvirt-Java 0.5.2 limitations). Could also be argued as an enhancement PR as migrations were working (but taking waaay too long).
I see some work recently done that allows multiple volumes on local storage. I will double-check these new PRs and see potential risks as I've considered 1 local volume (root) to be mapped in the new Libvirt migration flow.
I see some work recently done that allows multiple volumes on local storage. I will double-check these new PRs and see potential risks as I've considered 1 local volume (root) to be mapped in the new Libvirt migration flow.
so should we move this to draft, @GabrielBrascher ?
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6509 (SL-JID-1949)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6509 (SL-JID-1950)
@blueorangutan package
@sureshanaparti a 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.
Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 3760
@GabrielBrascher Can you the fix these audit errors.
[ERROR] /jenkins/workspace/acs-centos7-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.18.0.0-SNAPSHOT/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java:27:8: Unused import - java.util.Collections. [UnusedImports]
[ERROR] /jenkins/workspace/acs-centos7-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.18.0.0-SNAPSHOT/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java:38:8: Unused import - java.util.stream.Collectors. [UnusedImports]
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6509 (SL-JID-1958)
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
Hi @GabrielBrascher, should we consider this for 4.17.1.0? Currently, it has conflicts, can you please check