We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d5b7b7 commit c78f14cCopy full SHA for c78f14c
server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -2101,7 +2101,7 @@ private boolean doCancelMaintenance(long hostId) {
2101
_haMgr.cancelScheduledMigrations(host);
2102
List<VMInstanceVO> vms = _haMgr.findTakenMigrationWork();
2103
for (VMInstanceVO vm : vms) {
2104
- if (vm.getHostId() != null && vm.getHostId() == hostId) {
+ if (vm != null && vm.getHostId() != null && vm.getHostId() == hostId) {
2105
s_logger.info("Unable to cancel migration because the vm is being migrated: " + vm);
2106
return false;
2107
}
0 commit comments