Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I bring up the GUI for a Vagrant managed Virtual box while the box is running?

I know that I can configure my Vagrantfile to boot my machine with a GUI according to http://docs.vagrantup.com/v2/virtualbox/configuration.html with:

config.vm.provider "virtualbox" do |v|   v.gui = true end 

But if I've started a box headless, is there any way to bring up a GUI while the machine is running? Virtualbox provides the small preview, so I suspect it is possible but I haven't found any documentation on how to do this.

Edit: Terry pointed out that I can vagrant reload after changing the setting above to get a gui, but that reboots the box. I'm still hoping there's a easy way to enable the gui without a reboot.

like image 268
mattwise Avatar asked Nov 26 '13 20:11

mattwise


People also ask

Does vagrant have a GUI?

5.3 Using a GUI gui to true. The next time you start the VM with vagrant up, it will open a VirtualBox 3 Page 4 CS168 Using the Vagrant VM Fall 2019 window and start the VM in GUI mode. Note that the VM may take a few minutes to boot the first time you start in this mode.

Does VirtualBox have GUI?

How to install the headless VirtualBox server. The first thing to be done is the installation of VirtualBox on your server. Because we don't have a GUI on the server, we'll install a headless version. To make the system aware of the new group, log out of the server and log back in.

What is the difference between VirtualBox and vagrant?

VirtualBox is basically inception for your computer. You can use VirtualBox to run entire sandboxed operating systems within your own computer. Vagrant is software that is used to manage a development environment.


1 Answers

There are 3 ways I've found to get a gui on a running headless machine if you can see it in the VirtualBox Manager:

  • You can suspend the machine (Close|Save State or vagrant suspend) and then start it again. When you restart it, you will see the GUI.

or, if you don't want to stop the machine at all:

  • You can go to display settings and enable the Remote Display Server while it's running (you may want to change the default port), and then use an RDP viewer (On Windows use Remote Desktop Connection) to access the GUI.

  • [Edit July 2015] With VirtualBox 5.0, click on the headless VM, choose "Show", and it will bring up the gui.

like image 114
Victor Roetman Avatar answered Sep 17 '22 01:09

Victor Roetman