Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.4k
Added vddk support in vmware to kvm migrations#12970
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
552eddf74811bc5a543c6c15ba91e3c4a930bfd7a733ff93e72be93a785de9d6f5f7e34baa59be7b2ed428f33415188529ba9d0a1a46fe5610a7f11a117d67782f8fe6ae755de88c652File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -179,6 +179,14 @@ public class ImportVmCmd extends ImportUnmanagedInstanceCmd { | ||
| description = "(only for importing VMs from VMware to KVM) optional - the ID of the guest OS for the imported VM.") | ||
| private Long guestOsId; | ||
| @Parameter(name = ApiConstants.USE_VDDK, | ||
| type = CommandType.BOOLEAN, | ||
| since = "4.22.1", | ||
| description = "(only for importing VMs from VMware to KVM) optional - if true, uses VDDK on the KVM conversion host for converting the VM. " + | ||
| "This parameter is mutually exclusive with " + ApiConstants.FORCE_MS_TO_IMPORT_VM_FILES + ".") | ||
sureshanaparti marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| private Boolean useVddk; | ||
| ///////////////////////////////////////////////////// | ||
| /////////////////// Accessors /////////////////////// | ||
| ///////////////////////////////////////////////////// | ||
| @@ -255,6 +263,10 @@ public Long getStoragePoolId() { | ||
| return storagePoolId; | ||
| } | ||
| public boolean getUseVddk() { | ||
| return BooleanUtils.toBooleanDefaultIfNull(useVddk, true); | ||
nvazquez marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| public String getTmpPath() { | ||
| return tmpPath; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -805,8 +805,11 @@ protected AgentAttache notifyMonitorsOfConnection(final AgentAttache attache, fi | ||
| String uefiEnabled = detailsMap.get(Host.HOST_UEFI_ENABLE); | ||
| String virtv2vVersion = detailsMap.get(Host.HOST_VIRTV2V_VERSION); | ||
| String ovftoolVersion = detailsMap.get(Host.HOST_OVFTOOL_VERSION); | ||
| String vddkSupport = detailsMap.get(Host.HOST_VDDK_SUPPORT); | ||
| String vddkLibDir = detailsMap.get(Host.HOST_VDDK_LIB_DIR); | ||
| String vddkVersion = detailsMap.get(Host.HOST_VDDK_VERSION); | ||
| logger.debug("Got HOST_UEFI_ENABLE [{}] for host [{}]:", uefiEnabled, host); | ||
| if (ObjectUtils.anyNotNull(uefiEnabled, virtv2vVersion, ovftoolVersion)) { | ||
| if (ObjectUtils.anyNotNull(uefiEnabled, virtv2vVersion, ovftoolVersion, vddkSupport, vddkLibDir, vddkVersion)) { | ||
| _hostDao.loadDetails(host); | ||
| boolean updateNeeded = false; | ||
| if (StringUtils.isNotBlank(uefiEnabled) && !uefiEnabled.equals(host.getDetails().get(Host.HOST_UEFI_ENABLE))) { | ||
| @@ -821,6 +824,26 @@ protected AgentAttache notifyMonitorsOfConnection(final AgentAttache attache, fi | ||
| host.getDetails().put(Host.HOST_OVFTOOL_VERSION, ovftoolVersion); | ||
| updateNeeded = true; | ||
| } | ||
| if (StringUtils.isNotBlank(vddkSupport) && !vddkSupport.equals(host.getDetails().get(Host.HOST_VDDK_SUPPORT))) { | ||
| host.getDetails().put(Host.HOST_VDDK_SUPPORT, vddkSupport); | ||
| updateNeeded = true; | ||
| } | ||
| if (!StringUtils.defaultString(vddkLibDir).equals(StringUtils.defaultString(host.getDetails().get(Host.HOST_VDDK_LIB_DIR)))) { | ||
| if (StringUtils.isBlank(vddkLibDir)) { | ||
| host.getDetails().remove(Host.HOST_VDDK_LIB_DIR); | ||
| } else { | ||
| host.getDetails().put(Host.HOST_VDDK_LIB_DIR, vddkLibDir); | ||
| } | ||
| updateNeeded = true; | ||
| } | ||
| if (!StringUtils.defaultString(vddkVersion).equals(StringUtils.defaultString(host.getDetails().get(Host.HOST_VDDK_VERSION)))) { | ||
| if (StringUtils.isBlank(vddkVersion)) { | ||
| host.getDetails().remove(Host.HOST_VDDK_VERSION); | ||
| } else { | ||
| host.getDetails().put(Host.HOST_VDDK_VERSION, vddkVersion); | ||
| } | ||
| updateNeeded = true; | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. | ||
| } | ||
| if (updateNeeded) { | ||
| _hostDao.saveDetails(host); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.