We have an intermittant problem in our environment with our SAN and timeouts. While our storage group is working on this issue it has side effects that involve a lot of manual work that I find unappealing and think could be automated.
Our LUNs time out. This time out is sometimes long enough to actually cause the guest OS (various flavors of windows) to lose access to their disks and do a crash reboot. A small percentage of these do not gracefully recover and instead end up with 'Unable to find system disk' error on the console. Currenlty we manually check the console of each one. I'd like to script it to more quickly identify posible problem systems.
I have thought of checking for vmtools version on all powered on vms. No vmtools, system is probably is dead.
Any other thoughts/ideas out there on a better approach?
Thanks,
Steven Peck
I'm not sure how you check for the VMware Tools, but this could give some false positives for powered off guests, I think.
Perhaps you can try the check this way
Get-VM | where {$_.PowerState -eq "PoweredOn"} | Get-VMGuest | select VmName, State
If the State shows "NotRunning" it could mean that the VMware Tools are not installed or that the OS is not started.
The powered off guests are filtered out by the Where-Object cmdlet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I guess I should have been more clear. I have code that will check for the vmtools version, I was more wondering if anyone had other ideas that might be better for this.
This code actually looks like it will work for it. I will have to wait for the next unfortunate event to happen but this will certainly bet better then checking all the guests manually through the viclient.
Thanks,
Steven
So.... the chance to test it happened. Code works great for rapdily identifying systems that need to be followed up on.