You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/10/11 16:50:05 UTC

[GitHub] [cloudstack] BryanMLima commented on a diff in pull request #6491: Add live migration of system VMs (KVM)

BryanMLima commented on code in PR #6491:
URL: https://github.com/apache/cloudstack/pull/6491#discussion_r992566585


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##########
@@ -195,4 +192,16 @@ public void execute() {
             throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
         }
     }
+
+    private void setResponseBasedOnVmType(VirtualMachine userVm, VirtualMachine migratedVm) {
+        if (VirtualMachine.Type.User.equals(userVm.getType())) {
+            UserVmResponse userVmResponse = _responseGenerator.createUserVmResponse(ResponseView.Full, "virtualmachine", (UserVm) migratedVm).get(0);
+            userVmResponse.setResponseName(getCommandName());
+            setResponseObject(userVmResponse);
+            return;
+        }
+        SystemVmResponse systemVmResponse = _responseGenerator.createSystemVmResponse(migratedVm);
+        systemVmResponse.setResponseName(getCommandName());
+        setResponseObject(systemVmResponse);

Review Comment:
   While testing in my local lab, I did not find any problems, but more testing is always better.



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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org