autostart multiple VM

Discussions related to using VirtualBox on Linux hosts.
Post Reply
reylon
Posts: 6
Joined: 9. Jan 2016, 14:03

autostart multiple VM

Post by reylon »

Vbox 5.2.12 - Debian 9 - I need to autostart more VM one after the other.
Using vbox service I could start succesfully one:

[service]
Type=idle
User=admin
Group=vboxusers
ExecStart=/usr/bin/VBoxHeadless --startvm [machine1 name]
ExecStop=/usr/bin/VBoxManage controlvm [machine1 name] savestate

to start more machines I tried this way:
ExecStart=/usr/bin/VBoxHeadless --startvm [machine1 name] --startvm [machine2 name] --startvm [machine3 name]

But I obtained that only the last start and the machine before became aborted. What the way to start 3 VM one after one? Perfect will be use a delay time...
Thank you
reylon
Posts: 6
Joined: 9. Jan 2016, 14:03

Re: autostart multiple VM

Post by reylon »

some help? :)
Guideloom
Posts: 29
Joined: 5. Sep 2018, 18:42

Re: autostart multiple VM

Post by Guideloom »

As far as I can see, you cannot specify a start order to your VMs, nor can you have a "delayed" start time using the normal virtualbox command set.
The only way to do this is with custom scripts that start each machine in the order you want, with sleep commands to introduce delays.

Standard VirtualBox autostart is "all at the same time".
https://geek1011.github.io/linux-tips/c ... autostart/
Post Reply