This article explains how ESX and ESXi persist configuration information across reboots, and the ramifications of an unclean shutdown or reboot.
Troubleshooting the cause of the unclean shutdown or restart is outside the scope of this article, but should be investigated separately.
An ESX/ESXi host may not retain its configuration in the event of an unclean shutdown or reboot resulting from a power outage or loss, hard power off or reset, software or hardware hang, or the reboot -f
command executed on the host. Shutdowns or restarts of a host performed gracefully from the vSphere Client or console persist configuration state to disk prior to completing.
Configuration information for an ESX/ESXi host are saved in different locations depending on the version:
state.tgz
file on the boot device.initrd
) on the boot device. Other configuration information is stored on disk in the service console.Configuration information for the host is available in several configuration files within the /etc/
directory on an ESXi host. If changes are made to these configuration files, they do not persist across reboots.
Configuration changes to files on an ESXi Installable or Embedded host installation are retained in the state.tgz
file on the boot device. The state.tgz
file contains a copy of the configuration file /etc/vmware/esx.conf
, which is consulted early in the startup process, prior to loading drivers.
The state.tgz
file is regenerated automatically under two conditions:
/var/spool/cron/crontabs/root
runs the command /sbin/auto-backup.sh
, which updates the state.tgz
file if any configuration has changed./sbin/shutdown.sh
runs the command /sbin/backup.sh 1
, which updates the state.tgz
file.If the state.tgz
file is not updated automatically following a configuration change, and the host is shutdown or restarted uncleanly, the state.tgz
file contains the previous configuration. Reapply the configuration changes to the host and backup the configuration to state.tgz
automatically or manually.
To manually regenerate the state.tgz file after a configuration change:
/sbin/auto-backup.sh
Configuration information for the host is available in several configuration files within the /etc/ directory on an ESX host. If changes are made to these configuration files, they persist across reboots.
Configuration changes that affect early startup of the ESX host, such as loading of drivers, require persisting some configuration information to the initial ramdisk (initrd
). The initial ramdisk contains a copy of the configuration file /etc/vmware/esx.conf
, which is consulted early in the startup process, prior to loading drivers.
The initial ramdisk is regenerated automatically under two conditions:
/etc/cron.hourly/refreshrd
updates the initial ramdisk./etc/init.d/vmware
updates the initial ramdisk.If the initial ramdisk is not regenerated automatically following a configuration change, and the host is shutdown or restarted uncleanly, the initial ramdisk contains the previous configuration. Reapply the configuration changes to the host and backup the configuration to the initial ramdisk automatically or manually.
To manually regenerate the initial ramdisk after a configuration change:
esxcfg-boot --rebuild