I've created a GitHub repository containing the scripts I've written for use with my FreeNAS-on-ESXi All-In-One systems:
https://github.com/Spearfoot/utility-scripts-for-freenas-and-vmware-esxi
These might be handy for folks who haven't already cooked up their own solutions to the standard issues:
NOTE: The Network UPS Tools daemon on FreeNAS is unable to execute scripts because of permissions issues. So just specify the SSH command -
https://github.com/Spearfoot/utility-scripts-for-freenas-and-vmware-esxi
These might be handy for folks who haven't already cooked up their own solutions to the standard issues:
- Forcing ESXi to rescan datastores so it will see the ones provided by FreeNAS
- Starting up selected VMs when FreeNAS boots
- Shutting down VMs gracefully when FreeNAS is shut down
- Configuring FreeNAS to poll a UPS and shut down the ESXi host when needed
esxi-poweroff-host.sh
: Issue apoweroff
command to the ESXi hostesxi-rescan-datastores.sh
: Instruct the ESXi host to rescan its datastores (call from your FreeNAS startup script)esxi-start-datastore-vms.sh
: Start selected virtual machinesesxi-start-vm.sh
: Start a virtual machine given its vmx nameesxi-stop-all-datastore-vms.sh
: Gracefully shut down all running VMs in a given datastoreesxi-stop-all-vms.sh
: Shut down all virtual machines on datastores provided by FreeNAS (call from your FreeNAS shutdown script)esxi-stop-vm.sh
: Shut down a virtual machine given its vmx namestartup-script.sh
: Sample startup script for use as a FreeNAS postinit Init/Shutdown Taskshutdown-script.sh
: Sample shutdown script for use as a FreeNAS shutdown Init/Shutdown Taskhost.config
: Sample host configuration settingsesxi.config
: Common code for ESXi support
NOTE: The Network UPS Tools daemon on FreeNAS is unable to execute scripts because of permissions issues. So just specify the SSH command -
ssh root@esxihostname poweroff
- as the UPS Shutdown command, instead of using esxi-poweroff-host.sh
.