0

I use to start my VMs (Virtual Machines) with the Virtual Box headless command line option, like:

VBoxManage.exe startvm "Windows XP SP3 - SandBox 01" --type headless

This open a VM with no window associated on the desktop (background, no GUI). As long as I use to enter my VMs via remote control (SSH, VNC... etc) this is fine for me: no more unneeded windows on my desktop.

But sometimes (not often) I need to bring the VM to foreground (start its GUI).
Why? Examples:

  • To insert a virtual CD (ISO).
  • To install Guest Additions.
  • When I loose control and can not access it.

Is this possible?

My best workaround until now is just closing the VM (sometimes an unclean close, I fear) and starting it again via the GUI of VirtualBox.

Additional points:

  • This thread starts by asking about the same problem, but it is soon derivated to another way to solve the things, not starting the GUI.

3 Answers3

2

If you are using VBoxHeadless, you automatically have an RDP session available for access to the guest UI.

In addition, you can control your VM without a GUI using VBoxManage so you should never actually need the UI, it is merely a convenience.

For example, you can mount an ISO as a virtual CD/DVD using the following command:

VBoxManage storageattach "Windows XP" --storagectl "IDE Controller"
  --port 0 --device 1 --type dvddrive --medium /full/path/to/iso.iso

Installing the guest additions is just a matter of mounting the guest additions ISO then running the appropriate executable.

If you loose control of the guest, you can use VboxManage to reboot or power off the guest. Of course, you can also add commands to a batch script to save you having to remember the commands all the time.

Please see the VirtualBox Manual for more information.

Julian Knight
  • 14,749
  • 3
  • 31
  • 46
0

VirtualBox 5 has added a mode called "Separate Mode" which allows you to detach/reattach the GUI to the VM. You just hit the button and/or detach the GUI from the virtual machine that is running.

fixer1234
  • 28,064
0

Starting from VirtualBox v5.0 (I still don't know of a method for older versions), for your background (headless: no frontend) running virtual machine:

  • Open VirtualBox Manager.
  • Click Machine .
  • Click Show .

A GUI frontend window will be immediately opened for the virtual machine.