VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
3 Replies Last post: Apr 1, 2009 3:20 PM by eziskind  

Tracking VM's after an HA event posted: Apr 1, 2009 9:28 AM

Click to view jbsengineer's profile Hot Shot 347 posts since
May 16, 2005

Without me re-inventing the wheel. Is there an easy way to generate an ouput that would highlight everything VM that was repowered on because of an HA event? We had a problem with a dense ESX server last week and it was a real headache to track 80 VM's across the cluster to verify they are good and log the outages.

Thanks.

Re: Tracking VM's after an HA event

1. Apr 1, 2009 2:45 PM in response to: jbsengineer
Click to view paul_xtravirt's profile Expert 215 posts since
Feb 16, 2007

Good question.

Well you could check the logs on the ESX hosts that are up: /var/log/vmware/vpx/vpxa*.log. You will see details when a VM has been powered on, something like: powerOn on vim.VirtualMachine:64

64 is the ID of the VirtualMachine. You could resolve that with some scripting to get the VirtualMachine name. Seems like a lot of work to me, but using the perl toolkit the process would be something like: read in the AAM, build an array of the ID for the powered on VM's, connect to VC and then resolve the ID to the friendly\displayname that you see in the inventory pane in the VI Client.

Would be a good scripting project, but I haven't got time at the moment :)

If you found this helpful, please consider awarding points

Re: Tracking VM's after an HA event

2. Apr 1, 2009 3:15 PM in response to: jbsengineer
Click to view vmmeup's profile Expert 454 posts since
May 3, 2006

Here is a nice powershell script that I built for a similiar purpose. It will tell you the hosts the vm's are on and the state.

http://www.dailyhypervisor.com/2009/04/01/vi-toolkit-powershell-simple-script-4-dvm-change-info/


Sid Smith-----
VCP, VTSP, CCNA, CCA(Xen Server), MCTS Hyper-V & SCVMM08
http://www.dailyhypervisor.com

  • Don't forget to award points for correct and helpful answers.;-)

Re: Tracking VM's after an HA event

3. Apr 1, 2009 3:20 PM in response to: jbsengineer
Click to view eziskind's profile Expert VMware Employees 335 posts since
Feb 21, 2006

You can go the cluster's "Tasks & Events" tab click on the "events" button. You can look for events like "virtual machine <vm1> was restarted on <host1> since <host2> failed".

If you're writing an sdk script you can look for the VmRestartedOnAlternateHostEvent events.

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities