Hello,
here is that what you need (you can change the 5.0 script, to get working on 5.1):
I went to roll out a new VMware server, grabbing the fresh ESXi 5.1 build. When implementing ghettoVCB I observed that the /bin/busybox location is no longer valid, and that rc.local is no longer editable. Not only that, but because William Lam hasn’t yet updated ghettoVCB to include the 5.1 version, the script won’t even run on 5.1. Turns out the rc.local injection needs to happen in “/etc/rc.local.d/local.sh”. Also, because busybox has moved you need to change the injection script as follows:
/bin/kill $(cat /var/run/crond.pid)
/bin/echo "0 6 * * 0 /vmfs/volumes/backups/ghettoVCB/ghettoVCB.sh -a > /vmfs/volumes/backups/Logs/backup.log" >> /var/spool/cron/crontabs/root
/usr/lib/vmware/busybox/bin/busybox crond
And you need to place the script above in “/etc/rc.local.d/local.sh“ versus the old “/etc/rc.local” file.
Additionally you’ll need to modify the version check part of ghettoVCB.sh as follows (see bold portion):
ESX_VERSION=$(vmware -v | awk '{print $3}')
if [[ "${ESX_VERSION}" == "5.0.0" ]] || [[ "${ESX_VERSION}" == "5.1.0" ]]; then
VER=5
elif [[ "${ESX_VERSION}" == "4.0.0" ]] || [[ "${ESX_VERSION}" == "4.1.0" ]]; then
VER=4
else
ESX_VERSION=$(vmware -v | awk '{print $4}')
if [[ "${ESX_VERSION}" == "3.5.0" ]] || [[ "${ESX_VERSION}" == "3i" ]]; then
VER=3
else
echo "You're not running ESX(i) 3.5, 4.x, 5.x!"
exit 1
fi
fi
The above steps got ghettoVCB running for me on 5.1.
Link to this: http://blog.waldrondigital.com/2012/09/14/modifying-ghettovcb-to-run-on-vmware-5-1/
many greets markus