3 Replies Latest reply on May 14, 2019 4:20 AM by ToniCapablo

    Settings not persisting on ESXi 6.0 & 6.5

    CinciTech Enthusiast

      I have deployed ghettoVCB using the VIB onto an ESXi 6.0 host a couple months ago, and recently I've tried putting it on a new 6.5 host.  The new 6.5 host is still in the process of being stood up, so I can reboot it at will for testing, while the 6.0 host is running some VMs that people would like me to leave running (and which are being backed up currently, so long as the vhost doesn't get rebooted!).  Short version: I'm finding that each reboot undoes any and every change I make outside of the VIB install, and I'm looking for some advice on how to commit my changes such that they survive a reboot.


      Longer ramble: I've come to realize that a reboot seems to wipe everything out that I add to the ESXi file system, outside of installing the VIB.  I can modify the .conf file, or create a derived copy, or even modify the settings in the .sh, and ghettoVCB works smoothly until that next reboot happens and my changes are reverted to the VIB as it installed.  Is  there a way to make my configuration changes "stick"?  I even tried removing the VIB, copying the files to a ghettoVCB folder, and running from there; again it works until my folder is obliterated by the next reboot.  I don't love the idea of having to build my own VIB just to inject a conf file that won't get blown away.  I don't want to store everything on a datastore because I there are other hands in the mix that might decide to relocate said folder, and it's easier to just leave it hidden in the terminal session where they can't/don't browse.


      What options do I have, or do I absolutely need to deploy a Docker VM for no purpose other than to build my own VIB just to save changes without resorting to putting ghettoVCB onto the local  datastore?

        • 1. Re: Settings not persisting on ESXi 6.0 & 6.5
          EkimRemri Lurker

          Do you found a way to keep your settings ?


          • 2. Re: Settings not persisting on ESXi 6.0 & 6.5
            MacSMB Novice

            This might help:


            # Edit local.sh


            vi /etc/rc.local.d/local.sh


            # Insert above the line with the string "exit 0"


            /bin/kill $(cat /var/run/crond.pid) # stop the Cron Daemon

            /bin/cp /var/spool/cron/crontabs/root /var/spool/cron/crontabs/root.temp # Create an editable copy of the crontab file "root"

            /bin/echo "0 0 * * 1-5 /vmfs/volumes/simplejack-local-storage/ghettoVCB.sh -f /vmfs/volumes/simplejack-local-storage/backuplist > /vmfs/volumes/simplejack-local-storage/ghettoVCB-backup-\$(date +\\%s).log" >> /var/spool/cron/crontabs/root.temp # Add your cronjob

            /bin/mv /var/spool/cron/crontabs/root.temp /var/spool/cron/crontabs/root # Overwrite the existing root file with your edited root.temp file

            /bin/chmod 555 /var/spool/cron/crontabs/root # Make the file again read only even for root

            /bin/chmod +t /var/spool/cron/crontabs/root # Set again the sticky bit




            :wq # Save vi changes


            # Run 


            # This initiates an ESXi backup, in order to ensure the changes are saved in the ESXi configuration

            1 person found this helpful
            • 3. Re: Settings not persisting on ESXi 6.0 & 6.5
              ToniCapablo Novice



              I was looking for a solution to get work persistent configuration in ESXi and this type of solution worked so well!


              Thank you very much for the explanation and give us the solution in order to cron jobs in ESXi.