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

Discussions related to using VirtualBox on Linux hosts.

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

Postby RocketNuts » 29. Jan 2020, 01:17

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?
Posts: 4
Joined: 11. Jul 2018, 06:27

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

Postby scottgus1 » 29. Jan 2020, 02:03

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.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
Posts: 6186
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 9 guests