mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Fix VM power sync NPE on system VMs
This commit is contained in:
parent
61e7625d49
commit
a43d0a6085
@ -1666,9 +1666,11 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
}
|
}
|
||||||
|
|
||||||
guru.finalizeStop(profile, answer);
|
guru.finalizeStop(profile, answer);
|
||||||
final UserVmVO userVm = _userVmDao.findById(vm.getId());
|
if (vm.getType() == VirtualMachine.Type.User) {
|
||||||
userVm.setPowerState(PowerState.PowerOff);
|
final UserVmVO userVm = _userVmDao.findById(vm.getId());
|
||||||
_userVmDao.update(userVm.getId(), userVm);
|
userVm.setPowerState(PowerState.PowerOff);
|
||||||
|
_userVmDao.update(userVm.getId(), userVm);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
s_logger.error("Invalid answer received in response to a StopCommand for " + vm.getInstanceName());
|
s_logger.error("Invalid answer received in response to a StopCommand for " + vm.getInstanceName());
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user