mlsorensen commented on code in PR #7878:
URL: https://github.com/apache/cloudstack/pull/7878#discussion_r1304606685


##########
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachinePowerStateSyncImpl.java:
##########
@@ -162,6 +177,8 @@ private void processReport(long hostId, Map<Long, 
VirtualMachine.PowerState> tra
                         }
 
                         _messageBus.publish(null, 
VirtualMachineManager.Topics.VM_POWER_STATE, PublishScope.GLOBAL, 
instance.getId());
+                        ActionEventUtils.onActionEvent(User.UID_SYSTEM, 
Account.ACCOUNT_ID_SYSTEM,instance.getDomainId(),
+                                EventTypes.EVENT_VM_STOP, "Out of band VM 
power off", instance.getId(), ApiCommandResourceType.VirtualMachine.toString());

Review Comment:
   This may get is what you're looking for @DaanHoogland - in testing this 
didn't trigger any event at all during out of band migration on KVM. However it 
still responded to OOB stop, and even OOB start, publishing an event in both 
situations.
   
   I still don't have the means to test how the VMware side reacts to this, or 
if further changes would be necessary there.
   
   <img width="1247" alt="Screenshot 2023-08-24 at 10 32 46 AM" 
src="https://github.com/apache/cloudstack/assets/1047709/aeaa8d39-2161-4d4f-9864-f7c179e2309a";>
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to