github.com/mrstux/truenas_scripts TrueNAS Resource Post & Discussion
Some simple TrueNAS scripts. Not all are my own work.
I clone these scripts into tank/server/scripts in my pools
Starts a vm after another host comes online
I use this to activate my VM's after my pfSense VM finishes starting. I call the script as a post-init command with my pfSense VM's IP and the vm name ie
/mnt/tank/server/scripts/truenas_scripts/start_vm_after_host.sh <pfsense ip> 22 ssh <vm name>
ssh
can also be generic
for a tcp check
starts a vm by name
stops a vm by name
waits for a host's ssh port to begin responding
prints a list of all vm names and their ids