VMware Cloud Community
Stevester
Contributor
Contributor

Fixed!!!!! Cron Issue with GhettoVCB.sh

Good Day Everyone,

Thanks to the bright thinking of one of our staff members here, the issue with ghettoVCB.sh not working against a CRON job has been fixed. The solution is edit and add these two entries to your respective crontab file at the top:

SHELL=/bin/bash

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

###Then add CRON entries as needed

Upon doing this, ghettoVCB.sh script worked like a charm. In addition you may need to substitute any keywords - vmkfstools- with an absolute path of /usr/sbin/vmkfstools. However, I was told by my peers here that the absolute path to the vmkfstools binary file is irrelevant. The issue is with the CRON environmental variables having the proper setting. Thanks to William Lan and Paul Pomerleau (my co-worker) for their valuable assistance.

Thanks

Stevester

0 Kudos
1 Reply
lamw
Community Manager
Community Manager

Very good to hear!

You should only need to set the path in the crontab itself if you're not specifying the absolute path to any of commands in the script, then this would help. Though with my most recent modification which I believe you haven't seen, the absolute path of vmkfstools will fix the problem. I'll push that update later this evening, but let me know if you're still having any other issues.

Thanks for your patience

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos