@@ -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