Score:0

Ubuntu 22.04 - Autostart VirtualBox 7.0

cn flag

I'm trying to start VM boxes automatically on boot. A quick search yield 2 main solutions:

  • using Stat-up Application (tutorial). No luck.

  • using systemd service ( tutorial). Although when service was started using command-line, after boot - nothing happened.

and many more references on-line.

Appreciate any help for a working solution.

Edit_1

Can't explain why- but using first method DID do the job, but :

  1. I need 2 VM to start at boot.

  2. Only first VM starts (once only, the 2nd one did start).

Guy

in flag
Will the VMs need to start *before* anyone logs into the machine? If so, there will be some additional hurdles to make VirtualBox run under the `root` account, as there are checks in place to prevent that
guyd avatar
cn flag
@matigo No. It's not ideal but user is auto-login (meaning that it does not wait for password after boot ).
in flag
Generally what I have done in the past (before moving from VMs to Docker containers), is use a script that runs after the main account logs in. You can start a VM from the command line, which makes it possible to have a script launch VMs in a specific order, and including wait time between launches. the `VBoxManage` command is quite versatile
guyd avatar
cn flag
@matigo I sadly keep that in mind :)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.