VMware ESXi: adding files which survive reboot
ESXi replace all manual added files, except datastores, at booting time.
Keeping a ssh key for passwordless login, e.g. for initiating a backup script or apc shutdown, is not possible without a little trick.
At booting time, the script /etc/rc.local is executed. Furthermore it’s possible to modify this script and it still survives the reboot.
1) Copy the needed files to /vmfs/volumes/datastore1/
2) edit /etc/rc.local to your needs
e.g. for copying ssh keys into the right place:
cp -r /vmfs/volumes/datastore1/.ssh/ /.ssh
This trick works for all data that won’t survive a regular reboot.
It’s also possible to customize the /bootbank/oem.tgz, but if it fails the ESXi won’t boot till the oem.tgz is recovered. Therefor, the solution above is really uncritical to me.