Skip to content

Commit ce013d5

Browse files
committed
Address review comments
1 parent 6f68eca commit ce013d5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,7 @@ private UserVm importVirtualMachineInternal(final UnmanagedInstanceTO unmanagedI
11131113
final VirtualMachineTemplate template, final String displayName, final String hostName, final Account caller, final Account owner, final Long userId,
11141114
final ServiceOfferingVO serviceOffering, final Map<String, Long> dataDiskOfferingMap,
11151115
final Map<String, Long> nicNetworkMap, final Map<String, Network.IpAddresses> callerNicIpAddressMap,
1116-
final Map<String, String> details, final boolean migrateAllowed, final boolean forced, final boolean isImportUnmanagedFromSameHypervisor,
1117-
final String bootType, final String bootMode) {
1116+
final Map<String, String> details, final boolean migrateAllowed, final boolean forced, final boolean isImportUnmanagedFromSameHypervisor) {
11181117
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].",
11191118
unmanagedInstance, instanceName, zone, cluster, host, template, serviceOffering, dataDiskOfferingMap, nicNetworkMap, details));
11201119
UserVm userVm = null;
@@ -1189,7 +1188,7 @@ private UserVm importVirtualMachineInternal(final UnmanagedInstanceTO unmanagedI
11891188
allDetails.put(VmDetailConstants.KVM_VNC_PASSWORD, unmanagedInstance.getVncPassword());
11901189
}
11911190

1192-
addImportingVMBootTypeAndModeDetails(bootType, bootMode, allDetails);
1191+
addImportingVMBootTypeAndModeDetails(unmanagedInstance.getBootType(), unmanagedInstance.getBootMode(), allDetails);
11931192

11941193
VirtualMachine.PowerState powerState = VirtualMachine.PowerState.PowerOff;
11951194
if (unmanagedInstance.getPowerState().equals(UnmanagedInstanceTO.PowerState.PowerOn)) {
@@ -1573,8 +1572,7 @@ private UserVm importUnmanagedInstanceFromHypervisor(DataCenter zone, Cluster cl
15731572
template, displayName, hostName, CallContext.current().getCallingAccount(), owner, userId,
15741573
serviceOffering, dataDiskOfferingMap,
15751574
nicNetworkMap, nicIpAddressMap,
1576-
details, migrateAllowed, forced, true,
1577-
unmanagedInstance.getBootType(), unmanagedInstance.getBootMode());
1575+
details, migrateAllowed, forced, true);
15781576
break;
15791577
}
15801578
if (userVm != null) {
@@ -1694,8 +1692,7 @@ protected UserVm importUnmanagedInstanceFromVmwareToKvm(DataCenter zone, Cluster
16941692
template, displayName, hostName, caller, owner, userId,
16951693
serviceOffering, dataDiskOfferingMap,
16961694
nicNetworkMap, nicIpAddressMap,
1697-
details, false, forced, false,
1698-
sourceVMwareInstance.getBootType(), sourceVMwareInstance.getBootMode());
1695+
details, false, forced, false);
16991696
long timeElapsedInSecs = (System.currentTimeMillis() - importStartTime) / 1000;
17001697
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",
17011698
sourceVMName, instanceName, displayName, timeElapsedInSecs, (ovfTemplateOnConvertLocation != null)? "MS" : "KVM Host", sourceVMwareInstance.getOperatingSystem(), sourceVMwareInstance.getPowerState(), sourceVMwareInstance.getDisks(), sourceVMwareInstance.getNics()));

0 commit comments

Comments
 (0)