VMware Cloud Community
IT_SystemAdmin
Contributor
Contributor

What is the best option to run scripts to automate a task on ESXi 5.5 host

The main reason why I want to write a script and automate a task is because my host server is running ESXi 5.5 and its stored on 5 hard drives configured for RAID 5. As we know, hard drives fail and I would like to know when a hard drive takes a dump so I can fix the problem immediately. I would like to receive an alert via email when a hard drive fails on my storage RAID 5.

I've successfully installed hp-esxi5.5uX-bundle-2.4-16.zip and I was able to run a command to display RAID status, perfect! its what I want. Now I would like to write a script, but I know ESXi host sbin file has very limited Linux shell scripting commands.

I wrote a basic script and the output was what I was looking for. With that said, to simply my scripting situation regarding sending an email when a single hard drive fails, would it be better if I install PowerCLI or stick to my plan using BusyBox shell thats provided with ESXi 5.5?

Tags (2)
0 Kudos
1 Reply
LucD
Leadership
Leadership

There aren't really any provisions in PowerCLI to run script inside an ESXi 5.5 host.

But you can use SSH (needs to enabled on the ESXi node) through the plink.exe (from the PuTTY Suite).

There are quite a bit of plink.exe examples available in this community.

Do a search, and if you don't find an example that fits your needs, feel free to ask.


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

0 Kudos