Skip to content

Commit e4ada9f

Browse files
sureshanapartivishesh92
authored andcommitted
Reset the power state update counter before migrate, to allow power state sync to proper state / host
1 parent 2b80a22 commit e4ada9f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,6 +2766,7 @@ protected void migrate(final VMInstanceVO vm, final long srcHostId, final Deploy
27662766
}
27672767

27682768
vm.setLastHostId(srcHostId);
2769+
_vmDao.resetVmPowerStateTracking(vm.getId());
27692770
try {
27702771
if (vm.getHostId() == null || vm.getHostId() != srcHostId || !changeState(vm, Event.MigrationRequested, dstHostId, work, Step.Migrating)) {
27712772
_networkMgr.rollbackNicForMigration(vmSrc, profile);

0 commit comments

Comments
 (0)