VMware Cloud Community
gmitch64
Enthusiast
Enthusiast

Detecting vmotion (manual or DRS)

Is there any way to detect (and fire off a script) when a guest starts to vmotion?

We have an Exchange DAG, and a couple of times in the past month DRS has started a vMotion on them both at the same time, and as a result we've had issues with Exchange. Is there any way to detect when a vMotion starts, so that I can fire a script off to lock the other guest to it's current host until the vmotion has completed?

I've looked through the alarms in vCenter, and I can't find anything there that would trigger when a vMotion starts or completes.

Graham

0 Kudos
2 Replies
LucD
Leadership
Leadership

You can define an alarm based on a specific event that is fired.

See my Alarm expressions – Part 2 : Event alarms post.

I would look at the VmBeingMigratedEvent and the VmBeingRelocatedEvent events to start with.

With Get-VIEvent you should be able to check which events are fired in the situation where VMs are being migrated


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
markdjones82
Expert
Expert

Unrelated to the powercli question, but why don't you set your DAG's to manual or partially automated for their DRS setting to keep them from migrating?  From what I understand exchange has built in HA for the application.

http://www.twitter.com/markdjones82 | http://nutzandbolts.wordpress.com
0 Kudos