Skip to content
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

Allow VMWare import via another host #9787

Draft
wants to merge 15 commits into
base: 4.19
Choose a base branch
from

Conversation

vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Oct 14, 2024

Description

This PR allows importing of a VM on VMWare via another host. This is useful in cases when import in the current cluster is not possible due to different versions of virt-v2v.

Docs PR: apache/cloudstack-documentation#453

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 or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@vishesh92 vishesh92 force-pushed the allow-import-via-another-host branch from ea54ade to e881ee7 Compare October 14, 2024 06:11
@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 57.79817% with 138 lines in your changes missing coverage. Please review.

Project coverage is 4.30%. Comparing base (0602f46) to head (86c61ca).
Report is 28 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../LibvirtImportConvertedInstanceCommandWrapper.java 57.06% 66 Missing and 16 partials ⚠️
...loud/agent/api/ImportConvertedInstanceCommand.java 25.00% 18 Missing ⚠️
.../apache/cloudstack/vm/UnmanagedVMsManagerImpl.java 79.76% 14 Missing and 3 partials ⚠️
...cloud/agent/api/ImportConvertedInstanceAnswer.java 18.18% 9 Missing ⚠️
.../wrapper/LibvirtConvertInstanceCommandWrapper.java 45.45% 5 Missing and 1 partial ⚠️
...e/cloudstack/api/command/admin/vm/ImportVmCmd.java 0.00% 3 Missing ⚠️
...ava/com/cloud/agent/api/ConvertInstanceAnswer.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #9787       +/-   ##
============================================
- Coverage     15.80%   4.30%   -11.50%     
============================================
  Files          5038     366     -4672     
  Lines        443852   29558   -414294     
  Branches      52578    5177    -47401     
============================================
- Hits          70137    1272    -68865     
+ Misses       365912   28142   -337770     
+ Partials       7803     144     -7659     
Flag Coverage Δ
uitests 4.30% <ø> (?)
unittests 15.85% <57.79%> (+0.04%) ⬆️

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.

@blueorangutan
Copy link

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

@vishesh92
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

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

@vishesh92 vishesh92 force-pushed the allow-import-via-another-host branch from a443ef2 to 8a824de Compare October 14, 2024 18:25
@vishesh92
Copy link
Member Author

@blueorangutan package

@apache apache deleted a comment from blueorangutan Oct 14, 2024
@apache apache deleted a comment from blueorangutan Oct 14, 2024
@blueorangutan
Copy link

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

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_03_secured_to_nonsecured_vm_migration Error 393.89 test_vm_life_cycle.py

@vishesh92 vishesh92 force-pushed the allow-import-via-another-host branch from 8a824de to 7c05af8 Compare October 15, 2024 06:52
@vishesh92 vishesh92 force-pushed the allow-import-via-another-host branch from 7c05af8 to 1bdc357 Compare October 15, 2024 06:54
@apache apache deleted a comment from blueorangutan Oct 15, 2024
@apache apache deleted a comment from blueorangutan Oct 15, 2024
@vishesh92 vishesh92 force-pushed the allow-import-via-another-host branch from 3054efe to 3a1cefd Compare October 15, 2024 07:31
@vishesh92 vishesh92 added this to the 4.19.2.0 milestone Oct 15, 2024
@apache apache deleted a comment from blueorangutan Oct 15, 2024
@apache apache deleted a comment from blueorangutan Oct 15, 2024
@vishesh92 vishesh92 force-pushed the allow-import-via-another-host branch from 3a1cefd to 892c045 Compare October 15, 2024 08:25
@apache apache deleted a comment from blueorangutan Oct 15, 2024
@vishesh92
Copy link
Member Author

@blueorangutan package

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

clgtm

@kiranchavala
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

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

@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

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

@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

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

@vishesh92
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

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

@kiranchavala
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

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

@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

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

@kiranchavala
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_04_create_template_with_checksum_md5 Error 65.80 test_templates.py
test_05_create_template_with_no_checksum Error 65.80 test_templates.py

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM

Tested the improvement to the vmware to kvm import which allows a different kvm in a zone with a different virt-v2v version to import the vm

Test Case Execution Result
The import vm api should work with the both parameters importinstancehostid" and "convertinstancehostid"" Pass
All the Storage pools associated with the destination cluster should be displayed Pass
Hosts which are in disabled state should work for convertinstancehostid"" Pass
Hosts which are in disabled state should fail for importinstancehostid"" Pass
Hosts which are in Maintainence state should fail for importinstancehostid" and "convertinstancehostid"" Pass
Correct Exception message should be shown if the virt-v2v tool fails Pass
zone wide storage pools should be displayed if the convert instance host and import host are different Pass
Disabled clusters should not be shownallowed for destination cluster Pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants