Skip to content

Added vddk support in vmware to kvm migrations - #12970

Merged
sureshanaparti merged 21 commits into
apache:4.22from
shapeblue:Introduce-vddk-in-vmware-to-kvm-migrations-422
Apr 14, 2026
Merged

Added vddk support in vmware to kvm migrations#12970
sureshanaparti merged 21 commits into
apache:4.22from
shapeblue:Introduce-vddk-in-vmware-to-kvm-migrations-422

Conversation

@harikrishna-patnala

@harikrishna-patnalaharikrishna-patnala commented Apr 7, 2026

Copy link
Copy Markdown
Member

Description

This PR introduces the VDDK implementation as part of VMware to KVM migration which reduces the migration time by half when compared to the existing implementation with exportOVF

Solution: Introduce VDDK configuration at both the host agent level and per-API-call level, wired through the migration execution pipeline on the KVM host.


Key Capabilities

CapabilityDetail
Host-level configFour new agent.properties keys configure VDDK defaults per KVM host
API-level overridesCallers can pass VDDK settings via importVmdetails, overriding host defaults
Secure password handlingvCenter password written to a temp file, passed via -ip or --password-file based on virt-v2v version, and deleted immediately after use
Auto-thumbprint fetchIf no thumbprint is configured, it is automatically retrieved from vCenter via openssl s_client

Configuration Keys

libguestfs.backend # LIBGUESTFS backend (default: direct)
vddk.lib.dir # Path to VDDK library directory
vddk.transports # Transport preference, e.g. nbd:nbdssl
vddk.thumbprint # vCenter SHA1 thumbprint (auto-fetched if unset)

Precedence

API details > agent.properties

Doc PR: apache/cloudstack-documentation#640

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?

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@harikrishna-patnalaharikrishna-patnala added this to the 4.22.1 milestone Apr 7, 2026
@codecov

codecovBot commented Apr 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 32.74725% with 306 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.62%. Comparing base (ae455ee) to head (e88c652).
⚠️ Report is 34 commits behind head on 4.22.

Files with missing linesPatch %Lines
...ervisor/kvm/resource/LibvirtComputingResource.java4.67%102 Missing ⚠️
.../wrapper/LibvirtConvertInstanceCommandWrapper.java47.72%82 Missing and 10 partials ⚠️
.../apache/cloudstack/vm/UnmanagedVMsManagerImpl.java47.05%24 Missing and 21 partials ⚠️
...va/com/cloud/agent/api/ConvertInstanceCommand.java0.00%24 Missing ⚠️
...java/com/cloud/agent/manager/AgentManagerImpl.java0.00%17 Missing ⚠️
...m/cloud/agent/api/CheckConvertInstanceCommand.java29.41%12 Missing ⚠️
.../java/com/cloud/agent/api/to/RemoteInstanceTO.java23.07%10 Missing ⚠️
...e/cloudstack/api/command/admin/vm/ImportVmCmd.java0.00%3 Missing ⚠️
...per/LibvirtCheckConvertInstanceCommandWrapper.java85.71%0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## 4.22 #12970 +/- ##
============================================
+ Coverage 17.60% 17.62% +0.01% - Complexity 15688 15711 +23 
============================================
Files 5919 5919 Lines 532005 532451 +446 Branches 65060 65138 +78 ============================================
+ Hits 93683 93822 +139 - Misses 427755 428038 +283 - Partials 10567 10591 +24 
FlagCoverage Δ
uitests3.69% <ø> (-0.01%)⬇️
unittests18.69% <32.74%> (+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.

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala 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
Copy Markdown

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

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

Comment threadagent/conf/agent.properties
Comment threadagent/conf/agent.properties Outdated
Comment threadserver/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java Outdated
Comment threadserver/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java Outdated
@harikrishna-patnala
harikrishna-patnalaforce-pushed the Introduce-vddk-in-vmware-to-kvm-migrations-422 branch from aa710bd to 782f8feCompareApril 14, 2026 04:52
@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@sureshanaparti thanks for all the reviews, I've addressed them

@harikrishna-patnala

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala 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
Copy Markdown

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

@sureshanapartisureshanaparti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code lgtm

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@kiranchavalakiranchavala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Tested manually on rocky 9 host and a Ubuntu 24 host

Installed the vddk packages on the kvm host

The tool was able to import vmware instances (Guest os windows, linux ) at a faster rate with the help of vddk support

Logs

2026-04-13 06:01:24,677 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) (i-2-14-VM) Attempting to convert the instance i-2-14-VM from VMware to KVM
2026-04-13 06:01:24,677 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) (i-2-14-VM) Using VDDK-based conversion (direct from VMware)
2026-04-13 06:01:24,677 DEBUG [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) (i-2-14-VM) Written vCenter password to /tmp/v2v.pass.cloud.10.1.34.210.37e8f4d8-2083-4bf2-9917-abdba6fcf3d9
2026-04-13 06:01:24,677 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) (i-2-14-VM) Using VPX URL: vpx://administrator%40vsphere.local@10.1.34.210/Trillian/p1-c1/10.1.33.172?no_verify=1
2026-04-13 06:01:24,677 DEBUG [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) Executing command [/bin/bash -c openssl s_client -connect '10.1.34.210:443' </dev/null 2>/dev/null | openssl x509 -fingerprint -sha1 -noout ].
2026-04-13 06:01:24,706 DEBUG [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) Successfully executed process [142874] for command [/bin/bash -c openssl s_client -connect '10.1.34.210:443' </dev/null 2>/dev/null | openssl x509 -fingerprint -sha1 -noout ].
2026-04-13 06:01:24,706 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) (i-2-14-VM) Starting virt-v2v VDDK conversion
2026-04-13 06:01:24,706 DEBUG [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (AgentRequest-Handler-1:[]) (logid:34cab3ef) Executing command [/bin/bash -c export LIBGUESTFS_BACKEND=direct && virt-v2v --root first -ic 'vpx://administrator%40vsphere.local@10.1.34.210/Trillian/p1-c1/10.1.33.172?no_verify=1' -ip /tmp/v2v.pass.cloud.10.1.34.210.37e8f4d8-2083-4bf2-9917-abdba6fcf3d9 -it vddk -io vddk-libdir=/opt/vmware-vddk/vmware-vix-disklib-distrib -io vddk-thumbprint=28:19:A6:1C:90:ED:46:D7:1C:86:BC:F6:13:52:F0:B9:19:81:0D:81 i-2-14-VM -o local -os /mnt/6f0e9b83-ab0d-3cc5-8ac6-189c672fe035 -of qcow2 -on 61c54ba1-df16-4be3-badb-4916f14ba5ed -v ].
ImageImage
Test Case ExecutionResult
Admin should be able to migrate a stopped vm from vmware via vddk libraryPass
Admin should be able to migrate a running vm from vmware via vddk libraryPass
Admin should be able to migrate stopped VMs which has many data disks from vmware to kvm via via vddk libraryPass
Admin should be able to migrate running VMs which has many data disks from vmware to kvm via vddk libraryPass
Admin should be able to list the vddk details on the import instance formPass
Import Ubuntu24 vm to Rocky 9 kvm hostPass
Import Windows 2022 server vm to Rocky 9 kvm hostPass
Import Centos 7 vm to Rocky 9 kvm hostPass
Import Ubuntu24 vm to Ubuntu 24 kvm hostPass
Import Windows 2022 server vm to ubuntu24 kvm hostPass
Import Centos 7 vm to Ubuntu 9 kvm hostPass

@harikrishna-patnala
harikrishna-patnala marked this pull request as ready for review April 14, 2026 13:34
@sureshanaparti
sureshanaparti merged commit 0c86899 into apache:4.22Apr 14, 2026
23 of 26 checks passed
@github-project-automationgithub-project-automationBot moved this from In Progress to Done in Apache CloudStack 4.22.1Apr 14, 2026
@sureshanaparti
sureshanaparti deleted the Introduce-vddk-in-vmware-to-kvm-migrations-422 branch April 14, 2026 17:03
@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File

dhslove pushed a commit to dhslove/ablestack-cloud that referenced this pull request Apr 21, 2026
Sign up for freeto 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.

6 participants

@harikrishna-patnala@blueorangutan@sureshanaparti@kiranchavala@nvazquez