connect to a headless virtualbox instance in Linux?

Solution 1:

I discovered a way to connect to the VirtualBox built-in remote desktop GUI:

First suspend the machine using:

VBoxManage controlvm <vm> savestate

After that start the gui by:

VboxManage startvm <vm> --type gui

I'd like to use one single command to connect to the GUI but these commands are the best solution I have found so far.

Solution 2:

VirtualBox's remote desktop service is bound to your host system's network interface, regardless of what networking (if any) you have set up in the guest.

I use VMs like this all the time. localhost:5555 and 127.0.0.1:5555 should both work, but you can try troubleshooting.

Have you tried using another port for the server? Maybe something else on your machine is already using 5555?

Have you tried using another RDP client or accessing it from another machine on your LAN (using your LAN IP address in that case)?

Are you trying to access the RDP server of one VM from inside another? This may or may not work depending on the network settings of the second VM.