Added vddk support in vmware to kvm migrations#12970
Added vddk support in vmware to kvm migrations#12970harikrishna-patnala wants to merge 18 commits intoapache:4.22from
Conversation
b95cfb7 to
7dc5d50
Compare
|
@blueorangutan package |
|
@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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12970 +/- ##
============================================
+ Coverage 17.60% 17.62% +0.01%
- Complexity 15677 15703 +26
============================================
Files 5918 5918
Lines 531681 532250 +569
Branches 65005 65107 +102
============================================
+ Hits 93623 93792 +169
- Misses 427498 427867 +369
- Partials 10560 10591 +31
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@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 package |
|
@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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17380 |
|
@blueorangutan package |
agent/conf/agent.properties
Outdated
| # Instance conversion VIRT_V2V_TMPDIR env var | ||
| #convert.instance.env.virtv2v.tmpdir= | ||
|
|
||
| # LIBGUESTFS backend to use for VMware to KVM conversion via VDDK (default: direct) |
There was a problem hiding this comment.
should keep other possible options in the comment (other than direct) ?
There was a problem hiding this comment.
if direct is the only option supported for vddk, can remove this config?
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ImportVmCmd.java
Outdated
Show resolved
Hide resolved
...ain/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConvertInstanceCommandWrapper.java
Outdated
Show resolved
Hide resolved
...ain/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConvertInstanceCommandWrapper.java
Outdated
Show resolved
Hide resolved
...ain/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConvertInstanceCommandWrapper.java
Outdated
Show resolved
Hide resolved
...ain/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConvertInstanceCommandWrapper.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17411 |
...ain/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConvertInstanceCommandWrapper.java
Outdated
Show resolved
Hide resolved
...ain/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConvertInstanceCommandWrapper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
Outdated
Show resolved
Hide resolved
| } | ||
| if (!volumeApiService.doesStoragePoolSupportDiskOffering(selectedStoragePool, rootDiskOffering)) { | ||
| throw new InvalidParameterValueException(String.format("The root disk offering '%s' is not supported by the selected conversion storage pool '%s'. " + | ||
| "When using VDDK, all selected disk offerings must be compatible with the conversion storage pool, as it will become the primary storage for the imported volumes.", |
There was a problem hiding this comment.
conversion storage pool is option parameter, and for ovf export scenario, secondary storage is used as the default conversion storage. ensure conversion storage pool is set in case of vddk (and update the update the importVm API parameter convertinstancepoolid description that it is the primary storage for vddk enabled conversion).
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
Outdated
Show resolved
Hide resolved
| } else { | ||
| host.getDetails().put(Host.HOST_VDDK_VERSION, vddkVersion); | ||
| } | ||
| updateNeeded = true; |
There was a problem hiding this comment.
do we need all these params in host_details? Persisting Host.HOST_VDDK_VERSION should be enough when vddk lib is properly set, to indicate vddk support.
There was a problem hiding this comment.
Version identification is not just enough to claim the support but we will also need the directory where it is located as we need to pass that in the virt-v2v command with vddk.
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 17420 |
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17421 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17446 |
| * Data type: String.<br> | ||
| * Default value: <code>direct</code> | ||
| */ | ||
| public static final Property<String> LIBGUESTFS_BACKEND = new Property<>("libguestfs.backend", "direct", String.class); |
There was a problem hiding this comment.
| public static final Property<String> LIBGUESTFS_BACKEND = new Property<>("libguestfs.backend", "direct", String.class); |
| private int threadsCountToExportOvf = 0; | ||
| private String extraParams; | ||
| private boolean useVddk; | ||
| private String libguestfsBackend; |
There was a problem hiding this comment.
| private String libguestfsBackend; |
| LOGGER.info("Detected nbdkit VDDK plugin version: {}", vddkVersion); | ||
| } | ||
|
|
||
| libguestfsBackend = StringUtils.defaultIfBlank( |
There was a problem hiding this comment.
| libguestfsBackend = StringUtils.defaultIfBlank( |
| } | ||
|
|
||
| libguestfsBackend = StringUtils.defaultIfBlank( | ||
| AgentPropertiesFileHandler.getPropertyValue(AgentProperties.LIBGUESTFS_BACKEND), "direct"); |
There was a problem hiding this comment.
| AgentPropertiesFileHandler.getPropertyValue(AgentProperties.LIBGUESTFS_BACKEND), "direct"); |
| private boolean convertInstanceVerboseMode = false; | ||
| private Map<String, String> convertInstanceEnv = null; | ||
| private String vddkLibDir = null; | ||
| private String libguestfsBackend = "direct"; |
There was a problem hiding this comment.
| private String libguestfsBackend = "direct"; | |
| private static final String libguestfsBackend = "direct"; |
libguestfs has two main backends:
- libvirt (default)
- direct (QEMU directly)
The libvirt backend adds an extra virtualization layer and restricts device access and networking paths. This conflicts with how Virtual Disk Development Kit (VDDK) works, which needs direct disk/NBD access. So, need to keep 'direct' for VDDK conversion. No need of any detail/property for this.
| private static final List<Storage.StoragePoolType> forceConvertToPoolAllowedTypes = | ||
| Arrays.asList(Storage.StoragePoolType.NetworkFilesystem, Storage.StoragePoolType.Filesystem, | ||
| Storage.StoragePoolType.SharedMountPoint); | ||
| private static final String DETAIL_LIBGUESTFS_BACKEND = "libguestfs.backend"; |
There was a problem hiding this comment.
| private static final String DETAIL_LIBGUESTFS_BACKEND = "libguestfs.backend"; |
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
agent.propertieskeys configure VDDK defaults per KVM hostimportVmdetails, overriding host defaults-ipor--password-filebased on virt-v2v version, and deleted immediately after useopenssl s_clientConfiguration Keys
Precedence
Doc PR: apache/cloudstack-documentation#640
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?