1

I start windows with a database server in a virtual box by the command:

VBoxManage startvm Wind10 --type headless

Then maybe I want to show the gui by

VirtualBox

or by

VBoxSDL --startvm Wind10 --separate

to do some work there. Afterwards I want to close the gui again but the headless windows os to continue running neatlessly (without having all the database clients being crashed by rebooting it). I found a solution for ubuntu (Is it possible to launch GUI of headless VirtualBox' machine?) with a menu entry "Detach GUI", but this entry is missing in my OpenSuse 15.3.

Gerald Schade
  • 253
  • 3
  • 6

2 Answers2

1

Starting the VM from VirtualBox itself you can choose Detachable Start:

GUI Detachable

This will bring Detach GUI -option to the VM menu:

Detach Display

This also gives an additional shutdown option that just closes the GUI but leaves the VM running:

Shutdown Detach

To start the VM with detachable GUI on commandline, use command VBoxManage startvm <VMNAME> --type separate.

This also works when restoring a saved VM.

In my system both Oracle VM VirtualBox Extension Pack for host OS and VirtualBox Guest Additions for guest are installed by default (download links for current version 6.1.26 r145957). However neither of these is required for Detachable options to be available.

Tested and confirmed with VirtualBox 6.1.26 on OpenSUSE Leap 15.3, Debian 10 and MacOS Mojave (host OS:s).

Peregrino69
  • 4,526
  • 2
  • 22
  • 30
  • Thank You! This was the answer I saw for ubuntu in other blogs, as mentioned. Both menu entries are missing in the virutalbox-version from my Opensuse 15.3-repository (VBoxManage --version: 6.1.26_SUSEr145957), but maybe they will be delivered there lateron – Gerald Schade Sep 20 '21 at 21:09
  • @GeraldSchade Nope, I don't think so. I'm also running VBox 6.1.26 r145957, only difference is that I'm running it on Debian. I don't think there would be that much diff between Linux versions. What I'm showing above is not in the Ubuntu thread - I checked before trying. – Peregrino69 Sep 20 '21 at 21:12
  • @GeraldSchade I updated my answer a bit, please check. – Peregrino69 Sep 20 '21 at 21:38
  • Maybe, it's because Ubuntu is a Debian-Clone, at least in my "Oracle VM Virtual Box Manager" is different concerning the menu entries, and the selection of different "start"-flavours ist missing. But howsoever, Your command line instruction "VBoxManage startvm --type separate." works very well for me and offers me the option "continue running in the background" when closing the virtual machine window, so it solves my problem. – Gerald Schade Sep 20 '21 at 21:45
  • @GeraldSchade Well you gave me a reason to finally finish the Leap installation that I've been postponing for quite some time... I'll drop a note here once I've confirmed your result :-) – Peregrino69 Sep 20 '21 at 21:54
  • @GeraldSchade Can't confirm your result after all - answer updated. – Peregrino69 Sep 21 '21 at 09:13
0

As a workaround, after using:

VBoxSDL --startvm Win10 --separate

from a putty command line, I close the GUI by Ctrl+C at that command line, followed by:

pkill VBoxSVC -9

Thereby, the Virtual Machine seems to continue in the background the whole time and I might be able to open the GUI again in the same manner.

Gerald Schade
  • 253
  • 3
  • 6