weizhouapache commented on code in PR #11541: URL: https://github.com/apache/cloudstack/pull/11541#discussion_r2344129957
########## engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java: ########## @@ -2041,6 +2047,33 @@ public Boolean doInTransaction(TransactionStatus status) { return BooleanUtils.isTrue(result); } + void persistDomainForKVM(VMInstanceVO vm) { + Long hostId = vm.getHostId(); + UnmanageInstanceCommand unmanageInstanceCommand; + if (State.Stopped.equals(vm.getState())) { + hostId = vm.getLastHostId(); Review Comment: what if last host has been removed ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org