Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,8 @@ private UserVm importVirtualMachineInternal(final UnmanagedInstanceTO unmanagedI
final VirtualMachineTemplate template, final String displayName, final String hostName, final Account caller, final Account owner, final Long userId,
final ServiceOfferingVO serviceOffering, final Map<String, Long> dataDiskOfferingMap,
final Map<String, Long> nicNetworkMap, final Map<String, Network.IpAddresses> callerNicIpAddressMap,
final Map<String, String> details, final boolean migrateAllowed, final boolean forced, final boolean isImportUnmanagedFromSameHypervisor) {
final Map<String, String> details, final boolean migrateAllowed, final boolean forced, final boolean isImportUnmanagedFromSameHypervisor,
final String bootType, final String bootMode) {
logger.debug(LogUtils.logGsonWithoutException("Trying to import VM [%s] with name [%s], in zone [%s], cluster [%s], and host [%s], using template [%s], service offering [%s], disks map [%s], NICs map [%s] and details [%s].",
unmanagedInstance, instanceName, zone, cluster, host, template, serviceOffering, dataDiskOfferingMap, nicNetworkMap, details));
UserVm userVm = null;
Expand Down Expand Up @@ -1188,6 +1189,10 @@ private UserVm importVirtualMachineInternal(final UnmanagedInstanceTO unmanagedI
allDetails.put(VmDetailConstants.KVM_VNC_PASSWORD, unmanagedInstance.getVncPassword());
}

if (StringUtils.isNotBlank(bootType) && bootType.equalsIgnoreCase("uefi") && StringUtils.isNotBlank(bootMode)) {
allDetails.put("UEFI", bootMode);
}

VirtualMachine.PowerState powerState = VirtualMachine.PowerState.PowerOff;
if (unmanagedInstance.getPowerState().equals(UnmanagedInstanceTO.PowerState.PowerOn)) {
powerState = VirtualMachine.PowerState.PowerOn;
Expand Down Expand Up @@ -1564,7 +1569,8 @@ private UserVm importUnmanagedInstanceFromHypervisor(DataCenter zone, Cluster cl
template, displayName, hostName, CallContext.current().getCallingAccount(), owner, userId,
serviceOffering, dataDiskOfferingMap,
nicNetworkMap, nicIpAddressMap,
details, migrateAllowed, forced, true);
details, migrateAllowed, forced, true,
unmanagedInstance.getBootType(), unmanagedInstance.getBootMode());
Copy link
Contributor

Choose a reason for hiding this comment

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

@nvazquez do we need to pass them here as they are already returned by unmanagedInstance and it is already passed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks - fixed

break;
}
if (userVm != null) {
Expand Down Expand Up @@ -1684,7 +1690,8 @@ protected UserVm importUnmanagedInstanceFromVmwareToKvm(DataCenter zone, Cluster
template, displayName, hostName, caller, owner, userId,
serviceOffering, dataDiskOfferingMap,
nicNetworkMap, nicIpAddressMap,
details, false, forced, false);
details, false, forced, false,
sourceVMwareInstance.getBootType(), sourceVMwareInstance.getBootMode());
long timeElapsedInSecs = (System.currentTimeMillis() - importStartTime) / 1000;
logger.debug(String.format("VMware VM %s imported successfully to CloudStack instance %s (%s), Time taken: %d secs, OVF files imported from %s, Source VMware VM details - OS: %s, PowerState: %s, Disks: %s, NICs: %s",
sourceVMName, instanceName, displayName, timeElapsedInSecs, (ovfTemplateOnConvertLocation != null)? "MS" : "KVM Host", sourceVMwareInstance.getOperatingSystem(), sourceVMwareInstance.getPowerState(), sourceVMwareInstance.getDisks(), sourceVMwareInstance.getNics()));
Expand Down
12 changes: 12 additions & 0 deletions ui/src/components/view/InfoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,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">
Expand Down
Loading