How to get multiple VM to be started on server boot

Discussions related to using VirtualBox on Windows hosts.
Post Reply
SYSMGR
Posts: 9
Joined: 15. Feb 2016, 15:49

How to get multiple VM to be started on server boot

Post by SYSMGR »

Environment: HP server, XEON Silver 4208 CPU (8 core), 32Gb memory. OS: WindowsServer2019 Essentials; Server is domain member.
VBox 6.1.4 + extension pack. The server can be accessed from LAN only (no external (internet) path to this server).

I run 2 VMs on this machine: One (webserver + application) is connected (via bridged controller) to LAN so can be accessed from any system in LAN using supported TCPIP protocols (HTTP(S), FTPS, SSH), the other contains the database that is used by webservices, this one can only be accessed by the first one.

Currently, I start VBox and both VM's by hand after the server has started, but I want BOTH of them be started automatically on (re)boot, without ANY manual interaction.
I prefer them running under a non-privileged user, but this is not a requirement.

Following the documentation I have an idea how to start a VM automatically - but it is my impression that this not on reboot of the server, but on login as a user - and just one. What I need is both VM's be started on (re)boot of the server, without requirement to login.

How to achieve this?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How to get multiple VM to be started on server boot

Post by mpack »

As you said, it is easy to add VM shortcuts to a startup folder to launch VMs on (any) user login.

VMs themselves are stored in a user folder "VirtualBox VMs", and the index of registered VMs, as displayed in the manager, is also specific to each user. However other users could register the same VMs if they were moved to a public folder. Though I've not tested it, I suspect that a global startup folder shortcut will not work unless the logged in user has registered that VM.

There is no official feature which allows VMs to be launched as a Windows Service, which is what would be required to launch them without a user logging in. There is however an unofficial tool for this: VBoxVmService - Discussion & Support.
Post Reply