-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Improve migration of external VMware VMs into KVM cluster #8815
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
Improve migration of external VMware VMs into KVM cluster #8815
Conversation
|
@blueorangutan package |
|
@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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #8815 +/- ##
============================================
+ Coverage 30.92% 30.97% +0.05%
- Complexity 34290 34372 +82
============================================
Files 5355 5355
Lines 376634 376724 +90
Branches 54808 54823 +15
============================================
+ Hits 116480 116705 +225
+ Misses 244820 244661 -159
- Partials 15334 15358 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8985 |
|
@blueorangutan test matrix |
|
@sureshanaparti a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-9541)
|
|
[SF] Trillian test result (tid-9539)
|
|
[SF] Trillian test result (tid-9540)
|
nvazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9003 |
|
@blueorangutan test matrix |
|
@sureshanaparti a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-9553)
|
|
[SF] Trillian test result (tid-9554)
|
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
…alled in KVM host)
…mfiles', to be generic
…windows guest vms
…om VMware, instead of OVA file - this would further increase the migration performance (as it reduces the time for OVA preparation / archiving of the VM files into a single file)
…g OVF from MS, and other changes below. - Skip clone for powered off VMs - Fixes to support standalone host (with its default datacenter) - Some code improvements
…to import vm files
3cb750d to
26d017c
Compare
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10148 |
|
[SF] Trillian test result (tid-10627)
|
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10167 |
vladimirpetrov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM based on manual testing.
* Create/Export OVA file of the VM on external vCenter host, to temporary conversion location (NFS) * Fixed ova issue on untar/extract ovf from ova file "tar -xf" cmd on ova fails with "ovf: Not found in archive" while extracting ovf file * Updated VMware to KVM instance migration using OVA * Refactoring and cleanup * test fixes * Consider zone wide pools in the destination cluster for instance conversion * Remove local storage pool support as temporary conversion location - OVA export not possible as the pool is not accessible outside host, NFS pools are supported. * cleanup unused code * some improvements, and refactoring * import nic unit tests * vmware guru unit tests * Separate clone VM and create template file for VMware migration - Export OVA (of the cloned VM) to the conversion location takes time. - Do any validations with cloned VM before creating the template (and fail early). - Updated unit tests. * Check conversion support on host before clone vm / create template on vmware (and fail early) * minor code improvements * Auto select the host with instance conversion capability * Skip instance conversion supported response param for non-KVM hosts * Show supported conversion hosts in the UI * Skip persistence map update if network doesn't exist * Added support to export OVA from KVM host, through ovftool (when installed in KVM host) * Updated importvm api param 'usemsforovaexport' to 'forcemstodownloadvmfiles', to be generic * Updated hardcoded UI messages with message labels * Updated UI to support importvm api param - forcemstodownloadvmfiles * Improved instance conversion support checks on ubuntu hosts, and for windows guest vms * Use OVF template (VM disks and spec files) for instance conversion from VMware, instead of OVA file - this would further increase the migration performance (as it reduces the time for OVA preparation / archiving of the VM files into a single file) * OVF export tool parallel threads code improvements * Updated 'convert.vmware.instance.to.kvm.timeout' config default value to 3 hrs * Config values check & code improvements * Updated import log, with time taken and vm details * Support for parallel downloads of VMware VM disk files while exporting OVF from MS, and other changes below. - Skip clone for powered off VMs - Fixes to support standalone host (with its default datacenter) - Some code improvements * rebase fixes * rebase fixes * minor improvement * code improvements - threads configuration, and api parameter changes to import vm files * typo fix in error msg
Description
This PR improves/optimises the migration/import performance of external VMware VMs into KVM cluster.
The improved migration process still uses the 'virt-v2v' for importing the VMware VMs, and uses exported OVF (of the VMware VM) as the source for the conversion to KVM instance, instead of the cloned VM (in earlier migration, accessing vCenter using 'virt-v2v' from KVM host). For this,
Noticed 70-90% decrease in the time taken for the migration with this approach (Some earlier linux VM migrations with 3-5 GB disks which took 30-35 mins, now takes 2-3 mins with this improvement).
There are no changes in the VMs supported on vCenter - Stopped & Running Linux VMs, and Stopped Windows VMs are supported as earlier. Additionally, Stopped VMs on standalone hosts are supported (can be imported by specifying its default datacenter name -
ha-datacenteralong with host and credentails).Note: All 'virt-v2v' limitations are still applicable. CloudStack will not perform any checks about the guest OS compatibility for the virt-v2v library as indicated on: https://access.redhat.com/articles/1351473.
Doc PR: apache/cloudstack-documentation#388
Other improvements in the migration process:
host.instance.conversion').host.instance.conversion' with value 'true' is added to host_details table if the host supports instance conversion (needs agent restart after installing virt-v2v).Also, fixes: #8632
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Host details (Instance Conversion Supported for KVM hosts with virt-v2v):
Import VM from VMware (Supported KVM hosts with virt-v2v):
Flag - to Force MS to import/download VM files (OVF):
Threads config - to import/download VM files
How Has This Been Tested?
Manually tested importing external VMware VMs with single and multiple disks(on different datastore) to KVM cluster in CloudStack.
How did you try to break this feature and the system with this change?