mirror of https://github.com/apache/cloudstack.git
Merge pull request #1997 from Accelerite/vmpoweroff
CLOUDSTACK-9208: Assertion Error in VM_POWER_STATE handler- Fixed
This commit is contained in:
commit
0ca2841b5e
|
|
@ -1283,7 +1283,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||
final VirtualMachine vm = profile.getVirtualMachine();
|
||||
final StopCommand stop = new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()), checkBeforeCleanup);
|
||||
try {
|
||||
final Answer answer = _agentMgr.send(vm.getHostId(), stop);
|
||||
Answer answer = null;
|
||||
if(vm.getHostId() != null) {
|
||||
answer = _agentMgr.send(vm.getHostId(), stop);
|
||||
}
|
||||
if (answer != null && answer instanceof StopAnswer) {
|
||||
final StopAnswer stopAns = (StopAnswer)answer;
|
||||
if (vm.getType() == VirtualMachine.Type.User) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue