Skip to content

Conversation

nvazquez
Copy link
Contributor

@nvazquez nvazquez commented Apr 24, 2025

Description

This PR improves the listing of Vmware VMs for KVM migration tool to reduce the timeout observed while listing VMs on a datacenter. The improvement is performed in two stages:

  • First stage: Datacenter VMs listing -> use thin listing of VMs instead of obtaining all its disks and NICs (Invoke the listVmwareDcVms API setting the datacentername parameter only)
  • Second stage: When selecting a VM to import -> perform the full information retrieval of the selected VM including its disks and NICs information (Invoke the listVmwareDcVms API setting the datacentername, hostname and virtualmachinename parameter)

It was originally added by PR: #9925 but reverted as it caused unintended regression affecting the VM console access (#10634).

Fixes: #9782

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested against Vmware vCenter datacenter with 200+ VMs, listing times reduced significantly from 30 seconds to <1 second for the entire datacenter VMs

Same command time difference against the same vCenter: (time cmk list vmwaredcvms vcenter=XXXX datacentername=XXXX username=XXXX password=XXXX page=1 pagesize=10 filter=name)

Before:

real	0m35.755s
user	0m0.087s
sys	0m0.016s

After:

real	0m0.468s
user	0m0.076s
sys	0m0.013s

@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@nvazquez 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 Apr 24, 2025

Codecov Report

Attention: Patch coverage is 4.14201% with 162 lines in your changes missing coverage. Please review.

Project coverage is 15.17%. Comparing base (55c8138) to head (76604e9).
Report is 22 commits behind head on 4.19.

Files with missing lines Patch % Lines
...in/java/com/cloud/hypervisor/vmware/mo/BaseMO.java 1.40% 70 Missing ⚠️
...d/hypervisor/vmware/manager/VmwareManagerImpl.java 0.00% 51 Missing ⚠️
.../org/apache/cloudstack/vm/UnmanagedInstanceTO.java 0.00% 12 Missing ⚠️
...ack/api/command/admin/zone/ListVmwareDcVmsCmd.java 0.00% 9 Missing ⚠️
...com/cloud/hypervisor/vmware/util/VmwareHelper.java 0.00% 9 Missing ⚠️
...dstack/api/response/UnmanagedInstanceResponse.java 33.33% 8 Missing ⚠️
...a/com/cloud/hypervisor/vmware/mo/DatacenterMO.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               4.19   #10770    +/-   ##
==========================================
  Coverage     15.16%   15.17%            
- Complexity    11332    11344    +12     
==========================================
  Files          5412     5415     +3     
  Lines        475033   475564   +531     
  Branches      57963    58033    +70     
==========================================
+ Hits          72048    72146    +98     
- Misses       394930   395353   +423     
- Partials       8055     8065    +10     
Flag Coverage Δ
uitests 4.28% <ø> (-0.02%) ⬇️
unittests 15.89% <4.14%> (+<0.01%) ⬆️

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.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@blueorangutan
Copy link

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

@nvazquez
Copy link
Contributor Author

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests

@Pearl1594 Pearl1594 moved this to In Progress in ACS 4.20.1 Apr 24, 2025
@blueorangutan
Copy link

[SF] Trillian test result (tid-13127)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 79615 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10770-t13127-vmware-70u3.zip
Smoke tests completed. 127 look OK, 6 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_role_account_acls Failure 3.97 test_dynamicroles.py
test_role_account_acls_multiple_mgmt_servers Failure 3.33 test_dynamicroles.py
test_01_events_resource Error 355.18 test_events_resource.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Error 122.44 test_network_permissions.py
test_01_restore_vm Error 3607.45 test_restore_vm.py
test_02_restore_vm_allocated_root Error 10.30 test_restore_vm.py
test_12_destroy_cpvm Error 6.36 test_ssvm.py
test_01_deploy_vm_on_specific_host Error 19.06 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 3607.06 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 2.57 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 4.56 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 15.80 test_vm_deployment_planner.py

@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@nvazquez 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 13352

@nvazquez
Copy link
Contributor Author

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests

@github-project-automation github-project-automation bot moved this from In Progress to Done in ACS 4.20.1 May 13, 2025
@DaanHoogland DaanHoogland reopened this May 13, 2025
@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@nvazquez 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 13363

@DaanHoogland
Copy link
Contributor

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

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

@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@nvazquez 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 13366

Copy link
Contributor

@NuxRo NuxRo left a comment

Choose a reason for hiding this comment

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

tested latest changes, lgtm

@blueorangutan
Copy link

[SF] Trillian test result (tid-13279)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 76286 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10770-t13279-vmware-70u3.zip
Smoke tests completed. 130 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestClusterDRS>:setup Error 0.00 test_cluster_drs.py
test_01_restore_vm Error 3604.61 test_restore_vm.py
test_02_restore_vm_allocated_root Error 23.27 test_restore_vm.py
ContextSuite context=TestRestoreVM>:teardown Error 31.73 test_restore_vm.py
test_01_deploy_vm_on_specific_host Error 22.12 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 3603.82 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 4.58 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 22.20 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 3603.94 test_vm_deployment_planner.py

@nvazquez
Copy link
Contributor Author

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@DaanHoogland DaanHoogland merged commit 8d3ae3e into apache:4.19 May 14, 2025
45 of 49 checks passed
@DaanHoogland DaanHoogland deleted the 419-vmware-improve-afterrevert branch May 14, 2025 06:12
@blueorangutan
Copy link

[SF] Trillian test result (tid-13298)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 75725 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10770-t13298-vmware-70u3.zip
Smoke tests completed. 130 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_restore_vm Error 3607.98 test_restore_vm.py
test_02_restore_vm_allocated_root Error 8.99 test_restore_vm.py
test_01_deploy_vm_on_specific_host Error 20.05 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 3603.42 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 2.47 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 2.52 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 4.71 test_vm_deployment_planner.py
test_09_expunge_vm Failure 424.82 test_vm_life_cycle.py

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
apache#10770)

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[UI] Timeout listing Vmware Datacenter VMs for migration to KVM
8 participants