Resource icon

Scripts to start VM when another host/VM finishes booting 2024-03-19

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Stux submitted a new resource:

Scripts to start VM when another host/VM finishes booting - So you virtualized your router and now you need to orchestrate your VMs?

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

This script "start_vm_after_host.sh" 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.


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...

Read more about this resource...
 

Tony-1971

Contributor
Joined
Oct 1, 2016
Messages
147
Last edited:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Hello,

Probably you can also use a different command pipe to find a VM ID given VM Name.
Something like:
Code:
root@tn-xeond[~]# midclt call vm.query | jq --arg vmname "icinga" '.[] | select(.name == $vmname) | .id'
1

See also https://stackoverflow.com/questions/36625131/how-to-search-a-json-with-jq-for-values

Best Regards,
Antonio

Thanks, I replaced the logic in the repo.

 
Top