GabrielBrascher commented on a change in pull request #4212:
URL: https://github.com/apache/cloudstack/pull/4212#discussion_r456011835



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -5619,7 +5619,7 @@ public VirtualMachine migrateVirtualMachine(Long vmId, 
Host destinationHost) thr
             throw new InvalidParameterValueException("Unsupported Hypervisor 
Type for User VM migration, we support XenServer/VMware/KVM/Ovm/Hyperv/Ovm3 
only");
         }
 
-        if (isVMUsingLocalStorage(vm)) {
+        if (isVMUsingLocalStorage(vm.getId())) {
             if (s_logger.isDebugEnabled()) {
                 s_logger.debug(vm + " is using Local Storage, cannot migrate 
this VM.");

Review comment:
       @wido I did check it again and noticed that the log message as it is 
makes sense.
   
   The `migrateVirtualMachine` method does not work with volume migration. When 
a VM with volumes, e.g. when migrating VMs with local storage, is migrated it 
is used `migrateWithStorage` method. Therefore, we need to keep it that way.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to