Skip to content

Commit 4af9c76

Browse files
committed
Partially address reviews
1 parent 9da01e3 commit 4af9c76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,12 +1560,12 @@ private UserVm importUnmanagedInstanceFromHypervisor(DataCenter zone, Cluster cl
15601560
}
15611561

15621562
private void checkVmResourceLimitsForUnmanagedInstanceImport(Account owner, UnmanagedInstanceTO unmanagedInstance, ServiceOfferingVO serviceOffering, VMTemplateVO template, List<Reserver> reservations) throws ResourceAllocationException {
1563-
// When importing a unmanaged instance, the amount of CPUs and memory is obtained from the hypervisor unless powered off
1563+
// When importing an unmanaged instance, the amount of CPUs and memory is obtained from the hypervisor unless powered off
15641564
// and not using a dynamic offering, unlike the external VM import that always obtains it from the compute offering
15651565
Integer cpu = serviceOffering.getCpu();
15661566
Integer memory = serviceOffering.getRamSize();
15671567

1568-
if (serviceOffering.isDynamic() || !unmanagedInstance.getPowerState().equals(UnmanagedInstanceTO.PowerState.PowerOff)) {
1568+
if (serviceOffering.isDynamic() || !UnmanagedInstanceTO.PowerState.PowerOff.equals(unmanagedInstance.getPowerState())) {
15691569
cpu = unmanagedInstance.getCpuCores();
15701570
memory = unmanagedInstance.getMemory();
15711571
}
@@ -1671,7 +1671,7 @@ protected UserVm importUnmanagedInstanceFromVmwareToKvm(DataCenter zone, Cluster
16711671
sourceVMwareInstance = sourceInstanceDetails.first();
16721672
isClonedInstance = sourceInstanceDetails.second();
16731673

1674-
// Ensure that the configured resource limits will not be exceeded before beggining the conversion process
1674+
// Ensure that the configured resource limits will not be exceeded before beginning the conversion process
16751675
checkVmResourceLimitsForUnmanagedInstanceImport(owner, sourceVMwareInstance, serviceOffering, template, reservations);
16761676

16771677
boolean isWindowsVm = sourceVMwareInstance.getOperatingSystem().toLowerCase().contains("windows");

0 commit comments

Comments
 (0)