weizhouapache commented on issue #11941:
URL: https://github.com/apache/cloudstack/issues/11941#issuecomment-3989846065

   I face the same issue when restore a backup
   
   it works after I applied the workaround as below
   ```
    server/src/main/java/com/cloud/vm/UserVmManagerImpl.java | 3 +++
    1 file changed, 3 insertions(+)
   
   diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
   index 2308fbc8784..2292094869c 100644
   --- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
   +++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
   @@ -5847,6 +5847,9 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Vir
            String reservationId = vmEntity.reserve(planner, plan, new 
ExcludeList(), Long.toString(callerUser.getId()));
            vmEntity.deploy(reservationId, Long.toString(callerUser.getId()), 
params, deployOnGivenHost);
   
   +        if (params == null) {
   +            params = new HashMap<>();
   +        }
            Pair<UserVmVO, Map<VirtualMachineProfile.Param, Object>> 
vmParamPair = new Pair(vm, params);
            if (vm != null && vm.isUpdateParameters()) {
                // this value is not being sent to the backend; need only for 
api
   ```
   
   cc @abh1sar @shwstppr 


-- 
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: [email protected]

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

Reply via email to