@@ -1482,17 +1482,19 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
14821482 volumeMgr .prepare (vmProfile , dest );
14831483 }
14841484
1485- Boolean returnAfterVolumePrepare = (Boolean ) params .get (VirtualMachineProfile .Param .ReturnAfterVolumePrepare );
1486- if (Boolean .TRUE .equals (returnAfterVolumePrepare )) {
1487- logger .info ("Returning from VM start command execution for VM {} as requested. Volumes are prepared and ready." , vm .getUuid ());
1485+ if (params != null ) {
1486+ Boolean returnAfterVolumePrepare = (Boolean ) params .get (VirtualMachineProfile .Param .ReturnAfterVolumePrepare );
1487+ if (Boolean .TRUE .equals (returnAfterVolumePrepare )) {
1488+ logger .info ("Returning from VM start command execution for VM {} as requested. Volumes are prepared and ready." , vm .getUuid ());
14881489
1489- if (!changeState (vm , Event .AgentReportStopped , destHostId , work , Step .Done )) {
1490- logger .error ("Unable to transition to a new state. VM uuid: {}, VM oldstate: {}, Event: {}" , vm , vm .getState (), Event .AgentReportStopped );
1491- throw new ConcurrentOperationException (String .format ("Failed to deploy VM %s" , vm ));
1492- }
1490+ if (!changeState (vm , Event .AgentReportStopped , destHostId , work , Step .Done )) {
1491+ logger .error ("Unable to transition to a new state. VM uuid: {}, VM oldstate: {}, Event: {}" , vm , vm .getState (), Event .AgentReportStopped );
1492+ throw new ConcurrentOperationException (String .format ("Failed to deploy VM %s" , vm ));
1493+ }
14931494
1494- logger .debug ("Volume and preparation completed for VM {} (VM state set to Stopped)" , vm );
1495- return ;
1495+ logger .debug ("Volume preparation completed for VM {} (VM state set to Stopped)" , vm );
1496+ return ;
1497+ }
14961498 }
14971499
14981500 if (!reuseVolume ) {
0 commit comments