It is still amazing to see that the number of contributions and suggestions from the community continues to grow for my free and simple VM backup solution called ghettoVCB. I created ghettoVCB almost 8 years ago which now has over 1.2 million views, pretty insane if you ask me! Although I am quite busy these days which includes a new born, I still try to find time to update the script as time permits. A couple of weeks back I received an email from one of my readers who came across ghettoVCB and was quite happy with the free solution. He also had some feedback asking why I did not provide an installable VIB for ghettoVCB?

A totally valid question and the answer was quite simple. When I had first created ghettoVCB back in the classic ESX 3.x days, the concept of a VIB had not existed yet. With the release of ESXi 5.0, the idea of the VIB was introduced but it was only recently in 2012 did VMware publish a method for customers to create custom VIBs for ESXi using the VIB Author Fling. I do have to admit at one point I did think about providing a VIB for ghettoVCB, but I guess I never went through with it for whatever reason. Looking back now, this was a no-brainer to provide a simplified user experience and not to mention the benefit of having ghettoVCB installed as a VIB is that it will automatically persist on ESXi after reboots which was a challenge for new users to ESXI.

So without further ado, here is ghettoVCB provided in either a VIB or offline bundle form:

To install the ghettoVCB VIB, you just need to download the VIB and run the following ESXCLI command and specifying the full path to the VIB:

esxcli software vib install -v /vghetto-ghettoVCB.vib -f

Once installed, you will find all ghettoVCB configuration files located in:


Both ghettoVCB and ghettoVCB-restore scripts are located in:


One additional thing I would like to point out is that you can also quickly tell which version of ghettoVCB is running by inspecting the installed VIB by using the following ESXCLI command:

esxcli software vib list -n ghettoVCB

Screen Shot 2015-05-26 at 1.28.13 PM
If you look at the screenshot above, I have highlighted two important pieces of information in green. The first is the "Description" property which includes the Github commit hash of the particular revision of ghettoVCB and the "Creation Date" property which contains the date of that commit. This can be handy if you want to compare it to the latest ghettoVCB repository found on Github here. Thanks again Markus for the suggestion!

For those of you who are interested in the details for creating your own ghettoVCB VIB, the next section is specifically for you. Earlier this week I blogged about a Docker Container that I have created to help build custom ESXi VIBs and as you can see now, that was the basis for us to be able to quickly create ghettoVCB VIB based on the latest revision of the script.

Step 1 - Create a new Docker Machine following the steps outlined here.

Step 2 - Login to the Docker Machine and create a new Dockerfile which contains the following:

Step 3 -  Next we need to build our new Docker Container which will use the VIB Author Container by running the following command:

docker build -t lamw/ghettovcb .

Screen Shot 2015-05-26 at 2.14.52 PMThe output will be quite verbose, but what you will be looking for is text highlighted in green as shown in the screenshot above. You should see the successful build of both the VIB and offline bundle as well as Docker Container showing a successful build.

Step 4 - After a successful build of our Docker Container, we can now launch the container by running the following command:

docker run --rm -it lamw/ghettovcb

Screen Shot 2015-05-26 at 2.16.58 PM
Once logged into the Docker Container, you will see the generated VIB and the offline bundle for ghettoVCB as shown in the screenshot above.

If you wish to copy the VIB and offline bundle out of the Docker Container into the Docker Host, you can use Docker Volumes. I found this useful thread over on Stack overflow which I have modified to include the copying of the ghettoVCB VIB and offline bundle out to Docker Host by running the following command:

docker run -i -v ${PWD}/artifacts:/artifacts lamw/vibauthor sh << COMMANDS
cp vghetto-ghettoVCB* /artifacts

Finally, to copy the ghettoVCB VIB from the Docker Host to your desktop, we first need to identify the IP Address given to our Docker Machine by running the following command:

docker-machine ip osxdock

Currently, Docker Machine does not include a simple "scp" command so we will need to use regular scp command and specify the private SSH keys which you can find by running "docker-machine inspect [NAME-OF-DOCKER-HOST]" and connecting to our Docker Host to copy the ghettoVCB VIB by running the following command:

scp -i /Users/lamw/.docker/machine/machines/osxdock/id_rsa docker@ .

25 thoughts on “ghettoVCB VIB & offline bundle for ESXi

  1. Nice! thanks for the effort!
    using it via cron to backup my vms weekly… to an nfs data store. which I write to tape the day after using bacula.
    works all like a charm!

    • No, ghettoVCB only supports full backups as it clones the source VM. For more advanced/efficient backup mechanism you’ll need to look at commercial products like vSphere Data Protection as an example which is included in all paid versions of vSphere

  2. esxcli software install -v /vghetto-ghettoVCB.vib -f = esxcli software vib install -v /vghetto-ghettoVCB.vib -f

  3. In the blog post you say there is a config file at /etc/ghetto/ghettoVCB.conf which is not the case. It’s under /etc/ghettovcb/ghettoVCB.conf
    But the bigger issue is that I can’t edit and of the files in that folder. If I try to use vi to edit any of the files under /etc/ghettovcb I get a message saying “Operation not permitted”

    But I was able to copy ghettoVCB.conf to myconfig.conf and then edit that. Which is likely what you intended in the first place, but it’s not clear at first.

    2) Could you add the outgoing port 25 firewall rule to your VIB as well? Currently I have my own VIB that I use for that, but it would be really nice if both ghettoVCB and the port 25 firewall rule could just be a single VIB.


  4. Love this script! Been working flawlessly for years…we just replaced the VMWare host hardware and I thought I’d try the vib method, but it’s not happy:

    # esxcli software vib install -v /vghetto-ghettoVCB.vib
    VIB virtuallyGhetto_bootbank_ghettoVCB_1.0.0-0.0.0 violates extensibility rule checks: [u'(line 23: col 0) Element vib failed to validate content’]
    Please refer to the log file for more details.

    This is ESXi 5.5 fyi. Any ideas?

    Thank you so much. — MB

  5. Many thanks for VIB/bundle of this great tool! Just one question, how is it now with config-file? I think /etc is non-persistent, so any change I do to /etc/ghettovcb/ghettoVCB.conf will be lost after reboot. Or am I wrong?

    • No,if you want to backup your configs, you can use the before rebooting. Thats backup your configs, but not all. Shell commands can be restore the configs by commands in /etc/rc.local.d/ Put in this your routines to restore the config in /etc’s. I have in datastore a folder with scripts and configs. You can’t edit the etc-files directly, edit this from datastore with copy promt to send etc-folders.

  6. I managed to get this up and running in ESXI 6

    I use a NFS share here is my install Guide

    #First mount share and install vib

    esxcli storage nfs add –host= –share=/var/nfs –volume-name=RemoteNFS || true

    esxcli software vib install -v /vmfs/volumes/RemoteNFS/BackupSolution/vghetto-ghettoVCB.vib -f

    #add to /etc/rc.local.d/ THis sets up the crontab and makes a local script at boot##

    mkdir /etc/cron
    echo ‘#!/bin/sh’ > /etc/cron/
    echo ‘esxcli storage nfs add –host= –share=/var/nfs –volume-name=RemoteNFS || true’ >> /etc/cron/
    echo ‘sh /opt/ghettovcb/bin/ -a -g /vmfs/volumes/RemoteNFS/BackupSolution/config/esxi105.conf >> /vmfs/volumes/RemoteNFS/BackupSolution/log/cron.esxi105.log’ >> /etc/cron/
    chmod +x /etc/cron/

    /bin/kill $(cat /var/run/
    /bin/echo ‘* 2 * * * /etc/cron/’ >> /var/spool/cron/crontabs/root
    /usr/lib/vmware/busybox/bin/busybox crond

    #see that I utilize the remote share for my logs in the script. The esxi file system requires the script be built every boot.
    # I’m sure there are better ways to do this but this works for now.

  7. #please not this is a single line from the above setup

    echo ‘esxcli storage nfs add –host= –share=/var/nfs –volume-name=RemoteNFS || true’ >> /etc/cron/

    • Question
      If I change the number of backups I want to keep per VM from 3 to 2 will it automatically delete the third one from the folders or do I have to do this manually?

  8. This has been a great solution for our remote offices. Thanks for all that you have done.
    I ran into an issue today testing upgrading hosts to ESXI 6 via the vSphere Update Manager. During the upgrade process, it errors out with the following error. Is there a way around this without uninstalling ghettoVCB?

    VIB virtuallyGhetto_bootbank_ghettoVCB_1.0.0-0.0.0 violates extensibilty rule checks
    irtuallyGhetto_bootbank_ghettoVCB_1.0.0-0.0.0’s acceptance level is community, which is not compliant with the ImageProfile acceptance level partner

  9. I found 1 error( no white space before ]]) and 1 warning (no double quote) in
    I hope already someone had modified.

    $ diff

    – if [[ “${EMAIL_LOG}” -eq 1 ]] || [[ “${EMAIL_ALERT}” -eq 1 ]] ; then
    + if [[ “${EMAIL_LOG}” -eq 1 ]] || [[ “${EMAIL_ALERT}” -eq 1]] ; then

    – [[ “${BACKUP_ALL_VMS}” -eq 1 ]] && touch ${VM_FILE}
    + [[ $BACKUP_ALL_VMS -eq 1 ]] && touch ${VM_FILE}

  10. Also I added SMTP=0 in function sendMail().

    @@ -1323,8 +1323,7 @@

    sendMail() {
    #close email message
    – SMTP=0

  11. Is ghettoVCB compatible with VMware vSphere Enterprise 6.0? I am seeking a backup solution, but have heard it is compatible with 5.0 and maybe 5.5 and not 6.0.

    Please advise

  12. Hello William ,

    do you have any Videos regard use your toll.

    I’m not Master to understand your Post can you just share step by step video pls

  13. I don’t see complete installation method for ghetto.vib, Could you please share the link for backup and restore and details ASAP.


  14. In Esxi 6 free, I start my script with crontab. My script calls but it doesn’t wait the end of this. How I can call and wait the results BEFORE continuing with the other lines of my script ? Thanks you for your answer and for your blog (and for ghetto, sure !)


  15. For anyone interested, I created a Dockerfile that build the vib and offline bundle upon running (instead of building) the container. It also puts the vib/zip in /output which means you can run like ‘docker run –rm -v /tmp:/output ‘ and then find the biv/bundle in /tmp on your docker host. Repo is at

  16. Hi,
    Just for Information. in the (LAST_MODIFIED_DATE=2016_11_20) you have to modify line 781 from:
    if [[ ${ESX_RELEASE} == “5.5.0” ]] || [[ ${ESX_RELEASE} == “6.0.0” ]] ; then


    if [[ ${ESX_RELEASE} == “5.5.0” ]] || [[ ${ESX_RELEASE} == “6.0.0” ]] || [[ ${ESX_RELEASE} == “6.5.0” ]] ; then

    otherwise ESXi 6.5 host will not mount the NFS Share and you probably get an Error like:

    Add a NAS datastore.
    readonly is a boolean value, 1 for readonly and 0 for rw access.
    NFS Version must be nfs for nfs v3 or nfsv41 for version 4.1 or later

Thanks for the comment!