Skip to content

[VMware to KVM] Add guest OS for importing VM based on the source VM OS#12802

Open
nvazquez wants to merge 3 commits intoapache:4.22from
shapeblue:422-vmware-to-kvm-guestos
Open

[VMware to KVM] Add guest OS for importing VM based on the source VM OS#12802
nvazquez wants to merge 3 commits intoapache:4.22from
shapeblue:422-vmware-to-kvm-guestos

Conversation

@nvazquez
Copy link
Contributor

Description

This PR allows identifying and passing the guest OS for VMware VMs to be migrated to KVM

  • The guestOsIdenfier is retrieved from the source VM along with the host hypervisor version
  • CloudStack checks existing guest OS mappings for VMware matching the hypervisor version and the OS identifier
    • If no entries are retrieved: then the guest OS of the default import template will be used
    • If entries are retrieved: a list of matching guest OS mappings are displayed for users to select one.
Screenshot 2026-03-12 at 2 45 26 PM

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?

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

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

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 14.11765% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.60%. Comparing base (27bce46) to head (1db51ba).
⚠️ Report is 2 commits behind head on 4.22.

Files with missing lines Patch % Lines
...in/java/com/cloud/hypervisor/vmware/mo/BaseMO.java 7.14% 13 Missing ⚠️
...dstack/api/response/UnmanagedInstanceResponse.java 0.00% 12 Missing ⚠️
.../org/apache/cloudstack/vm/UnmanagedInstanceTO.java 16.66% 10 Missing ⚠️
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 6 Missing and 3 partials ⚠️
.../apache/cloudstack/vm/UnmanagedVMsManagerImpl.java 10.00% 6 Missing and 3 partials ⚠️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% 4 Missing ⚠️
...e/cloudstack/api/command/admin/vm/ImportVmCmd.java 0.00% 3 Missing ⚠️
...udstack/api/command/user/guest/ListGuestOsCmd.java 0.00% 3 Missing ⚠️
...ain/java/com/cloud/storage/dao/GuestOSDaoImpl.java 0.00% 3 Missing ⚠️
...in/java/com/cloud/server/ManagementServerImpl.java 0.00% 2 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #12802      +/-   ##
============================================
- Coverage     17.61%   17.60%   -0.01%     
+ Complexity    15662    15660       -2     
============================================
  Files          5917     5917              
  Lines        531415   531498      +83     
  Branches      64973    64986      +13     
============================================
- Hits          93588    93577      -11     
- Misses       427271   427361      +90     
- Partials      10556    10560       +4     
Flag Coverage Δ
uitests 3.70% <ø> (-0.01%) ⬇️
unittests 18.67% <14.11%> (-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.

@blueorangutan
Copy link

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

@nvazquez
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@nvazquez 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-15637)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 59357 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12802-t15637-kvm-ol8.zip
Smoke tests completed. 146 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=TestListIdsParams>:teardown Error 1.17 test_list_ids_parameter.py
test_01_snapshot_root_disk Error 5.04 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 49.59 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 49.60 test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:teardown Error 32.77 test_snapshots.py
test_01_snapshot_usage Error 29.00 test_usage.py
test_01_vpn_usage Error 1.10 test_usage.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.

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

@blueorangutan
Copy link

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

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

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants