This is an automated email from the ASF dual-hosted git repository.
sureshanaparti pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new a51a04efc2b [Vmware to KVM Migration] Preserve boot type and boot mode
of instances to be migrated (#10975)
a51a04efc2b is described below
commit a51a04efc2bff6e6842efd3e46e60cd7abb95ab9
Author: Nicolas Vazquez <[email protected]>
AuthorDate: Fri Jul 25 04:00:42 2025 -0300
[Vmware to KVM Migration] Preserve boot type and boot mode of instances to
be migrated (#10975)
* [Vmware to KVM Migration] Preserve boot type and boot mode of instances
to be migrated
* Restore end of line
* Extract lines to new method
* Address review comments
---
.../org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java | 8 ++++++++
ui/src/components/view/InfoCard.vue | 12 ++++++++++++
2 files changed, 20 insertions(+)
diff --git
a/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
b/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
index 03c0ad06dc9..4de494bb554 100644
--- a/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
+++ b/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
@@ -1188,6 +1188,8 @@ public class UnmanagedVMsManagerImpl implements
UnmanagedVMsManager {
allDetails.put(VmDetailConstants.KVM_VNC_PASSWORD,
unmanagedInstance.getVncPassword());
}
+ addImportingVMBootTypeAndModeDetails(unmanagedInstance.getBootType(),
unmanagedInstance.getBootMode(), allDetails);
+
VirtualMachine.PowerState powerState =
VirtualMachine.PowerState.PowerOff;
if
(unmanagedInstance.getPowerState().equals(UnmanagedInstanceTO.PowerState.PowerOn))
{
powerState = VirtualMachine.PowerState.PowerOn;
@@ -1259,6 +1261,12 @@ public class UnmanagedVMsManagerImpl implements
UnmanagedVMsManager {
return userVm;
}
+ private void addImportingVMBootTypeAndModeDetails(String bootType, String
bootMode, Map<String, String> allDetails) {
+ if (StringUtils.isNotBlank(bootType) &&
bootType.equalsIgnoreCase("uefi") && StringUtils.isNotBlank(bootMode)) {
+ allDetails.put("UEFI", bootMode);
+ }
+ }
+
private HashMap<String, UnmanagedInstanceTO>
getUnmanagedInstancesForHost(HostVO host, String instanceName, List<String>
managedVms) {
HashMap<String, UnmanagedInstanceTO> unmanagedInstances = new
HashMap<>();
if (host.isInMaintenanceStates()) {
diff --git a/ui/src/components/view/InfoCard.vue
b/ui/src/components/view/InfoCard.vue
index 1769d1329bb..fc8f59f71a3 100644
--- a/ui/src/components/view/InfoCard.vue
+++ b/ui/src/components/view/InfoCard.vue
@@ -732,6 +732,18 @@
<span v-else>{{ resource.webhookname || resource.webhookid
}}</span>
</div>
</div>
+ <div class="resource-detail-item" v-if="resource.boottype">
+ <div class="resource-detail-item__label">{{ $t('label.boottype')
}}</div>
+ <div class="resource-detail-item__details">
+ <span>{{ resource.boottype }}</span>
+ </div>
+ </div>
+ <div class="resource-detail-item" v-if="resource.bootmode">
+ <div class="resource-detail-item__label">{{ $t('label.bootmode')
}}</div>
+ <div class="resource-detail-item__details">
+ <span>{{ resource.bootmode }}</span>
+ </div>
+ </div>
<div class="resource-detail-item"
v-if="resource.managementserverid">
<div class="resource-detail-item__label">{{
$t('label.management.servers') }}</div>
<div class="resource-detail-item__details">