A "vSphere HA initiated a failover action for a virtual machine" message is detected after power off a virtual machine. This could occur after a virtual machine is powered on and then powered off in rapid succession (less than 1 minute) from guest OS operation.
vSphere 8.0
vSphere 7.0
The primary cause of the vSphere HA failover is the rapid power-on and subsequent power-off of the virtual machine from guest OS operation.
vSphere HA detects that VMware Tools stopped responding before it registered the power-off event, leading to a failover action.
This behavior is expected by design. And virtual machine will be migrated to source host after determined the power-off was a user-initiated operation.
To prevent unnecessary failovers, avoid power-on and power-off operations of virtual machines in short time.