Page 1 of 1

Run a VirtualBox Virtual Machine from an Ubuntu Server shell with no GUI?

Posted: 29. Jan 2020, 01:17
by RocketNuts
I have a server running Ubuntu Server 19.10 with no GUI and no screen attached. I only connect to it through SSH.

Is it possible to install VirtualBox on there and run a Virtual Machine that does have its own (virtual) screen, even though the screen isn't displayed or outputted anywhere by the host machine?

For example I want to run a Windows 10 Virtual Machine. I want to launch it from the shell, and I will then interact with it using VirtualBox's CLI/API functionality to send keyboard & mouse commands, grab screenshots, etc.

Obviously the Windows instance in the Virtual Machine will need to think it has a screen, whereas in reality it's running in a command-line-only host environment where the screen cannot be shown.

If necessary I could first create and setup the VM elsewhere. For example on an Ubuntu Desktop PC where I do have a GUI so I can interact visually. But once I have a fully installed and working VM, I'd want to copy the files to the Ubuntu Server and run it from there.

Is this possible, and if yes, how?

Re: Run a VirtualBox Virtual Machine from an Ubuntu Server shell with no GUI?

Posted: 29. Jan 2020, 02:03
by scottgus1
It should be possible. Virtualbox is installable via the command line, and the vboxmanage commands can adjust every setting that the Virtualbox GUI can do, and more. You could go for the full command-line 'religious experience', or build a guest to the point of starting the install on a GUI-desktop PC then move the guest to the no-GUI host. The guest's video system is virtual, so there should be a full guest GUI calculated. Depending on host capabilities, you might not have 3D acceleration available for the guest. Use the Virtualbox RDP server or guest-local remote software to see the guest GUI on another PC.