Resource Scripts to start VM when another host/VM finishes booting

This resource was originally created by user: Stux on the TrueNAS Community Forums Archive. Please DM this account or comment in this thread to claim it.

I had a need to start a VM only after another one had finished booting.

This script “” will allow you to enter a host’s IP address, and SSH port.

The script will then start the the specified VM when the sshd server on the other specified host begins returning SSH response.

GitHub - mrstux/truenas_scripts: TrueNAS scripts

TrueNAS scripts. Contribute to mrstux/truenas_scripts development by creating an account on GitHub.

I have a pfSense VM which is my network router using PCIe Pass-Through. As its the DHCP server and DNS resolver I do not want my VMs to launch automatically until after this VM finishes launching.

I set a post-init command to launch any VM I want once the router comes online using

/path/to/truenas_scripts/ <router ip> 22 <vm name>

And this works well for me.

Tested on SCALE 23.10.2

Ooh ooh that’s me…