ESXi: persistent files you can edit to apply settings during boot
Posted by jpluimers on 2022/01/18
Since ESXi boots from RAM, most files in /etc are not persisted after modification.
The files that are persisted, are only persisted once every hour by auto-backup.sh, so better run auto-backup.sh by hand if you want to reboot after changing them.
The auto-backup.sh script is ran every hour at 1 minute past the hour as per below crontab.
Default ESXi crontab in
/var/spool/cron/crontabs/root:#min hour day mon dow command 1 1 * * * /sbin/tmpwatch.py 1 * * * * /sbin/auto-backup.sh 0 * * * * /usr/lib/vmware/vmksummary/log-heartbeat.py */5 * * * * /bin/hostd-probe.sh ++group=host/vim/vmvisor/hostd-probe/stats/sh 00 1 * * * localcli storage core device purgeSchedules deciphered via [Wayback] Crontab.guru – The cron schedule expression editor:
- [Wayback] Every day at
01:01: “This module removes stale temporary files”1 1 * * * /sbin/tmpwatch.py- [Wayback] Every hour at
*:01: saves backup to/bootbank/state.tgz.1 * * * * /sbin/auto-backup.sh- [Wayback] Every hour at
*:00logs heartbeat messages to/var/log/vmksummary.loglike2021-02-23T19:00:02Z heartbeat: up 577d2h37m16s, 9 VMs; [[2802426 vmx 4194304kB] [6176344 vmx 4194304kB] [68997 vmx 8388608kB]] [[2802426 vmx 0%max] [6176344 vmx 0%max] [68997 vmx 0%max]]0 * * * * /usr/lib/vmware/vmksummary/log-heartbeat.py- [Wayback] Every
5thminute logs to/var/log/hostd-probe.log.*/5 * * * * /bin/hostd-probe.sh ++group=host/vim/vmvisor/hostd-probe/stats/sh- [Wayback] Every day at
01:00: Removes storage devices which have not been seen in some time interval.00 1 * * * localcli storage core device purgeNote that
localclicommands are the same asesxcli; foresxcli, a runninghostdis required;localclican run withouthostd. See:
- [Wayback] VCDX #200 Blog of one VMware Infrastructure Designer: ESXi localcli
- [Wayback/Archive.is] Overview of vSphere Command-Line Interfaces – Getting Started with vSphere Command-Line Interfaces – VMware {code}
localclicommands Set of commands for use with VMware Technical Support.localclicommands are equivalent toESXCLIcommands, but bypass the hoste daemon (hostd). Thelocalclicommands are only for situations when hostd is unavailable and cannot be restarted. After you run alocalclicommand, you must restarthostd. Run ESXCLI commands after the restart.Warning: If you use alocalclicommand, an inconsistent system state and potential failure can result.- [Wayback] VMware ESXi 6.5 – ESXCLI Command Reference | virten.net
–jeroen






Leave a comment