Unsolved
This post is more than 5 years old
1 Message
0
4171
July 23rd, 2013 14:00
How to automate emcgrab on multiple esx hosts?
I've got a management workstation and RSA keypairs set up so that authentication isn't an issue but I can't seem to automate the running of emcgrab across a few dozen hosts. I'd rather set it to run and walk away then to have to run it on every host individually. The script I'm running is below along with some output.
for i in `cat /tmp/testlist.txt` ; do scp -r /tmp/emcgrab/ $i:/tmp/ ; ssh $i chmod 777 -R /tmp/emcgrab/* ; ssh $i sh +x '/tmp/emcgrab/emcgrab.sh -legal -autoexec' ; done
Unable to source emcgrab.main
/tmp/emcgrab/emcgrab.sh: line 35: start: command not found
/tmp/emcgrab/emcgrab.sh: line 36: initialise: command not found
/tmp/emcgrab/emcgrab.sh: line 191: confirmation: command not found
awk: fatal: can't open source file `/normalize_clarify.awk' for reading (No such file or directory)
/tmp/emcgrab/emcgrab.sh: line 234: check_esxos: command not found
/tmp/emcgrab/emcgrab.sh: line 236: module: command not found
GrabScript version:
Command line options: -legal -autoexec
Modules to be processed:
/tmp/emcgrab/emcgrab.sh: line 256: check_version: command not found
/tmp/emcgrab/emcgrab.sh: line 303: [: =: unary operator expected
/tmp/emcgrab/emcgrab.sh: line 314: ${RPT}: ambiguous redirect
/tmp/emcgrab/emcgrab.sh: line 315: ${RPT}: ambiguous redirect
/tmp/emcgrab/emcgrab.sh: line 316: ${RPT}: ambiguous redirect
cp: cannot stat `/root/EMC_LEGAL_NOTICE.txt': No such file or directory
Finishing Data Collection, please wait... /tmp/emcgrab/emcgrab.sh: line 341: root_level_index: command not found
Creating and compressing Tar File _2013-07-23-17.27.08_ESX_vSphere_emcgrab_V_full_CC.tartar: CC_ _2307131727/*: Cannot stat: Too many levels of symbolic links
tar: Error exit delayed from previous errors
/tmp/emcgrab/emcgrab.sh: line 357: /root/outputs/ _2013-07-23-17.27.08_ESX_vSphere_emcgrab_V_full_CC.tar: Permission denied
Compressing Tar File is not able to finish properly...
All outputs are located in the outputs directory
Output Filename is :
_2013-07-23-17.27.08_ESX_vSphere_emcgrab_V_full_CC.tar.
Please submit this file to EMC for Analysis
/tmp/emcgrab/emcgrab.sh: line 403: cleanup: command not found
THANK YOU FOR USING EMCGrab.
Any idea about what I'm doing wrong?