After I launch a virtual machine (Ubuntu 12.04) in headless mode on Windows 7 host
C:\Users\XXX>VBoxManage startvm "ubuntu 12.04" --type headless
Waiting for VM "ubuntu 12.04" to power on...
VM "ubuntu 12.04" has been successfully started.
Can I somehow launch the normal GUI that I would get by launching the virtual machine from VirtualBox' GUI ?
I know that I should be able to RDP to this machine but when I use Windows 7 built in RDP client and use localhost:rdp_port
(forwarded by NAT in VB options) I get the error
---------------------------
Remote Desktop Connection
---------------------------
Your computer could not connect to another console session on the remote
computer because you already have a console session in progress.
---------------------------
OK Help
---------------------------
What can I do in this situation to connect to this virtual machine with GUI ?
Is it the only solution for me to turn the machine off and then launch it with the GUI ? It sounds really not convenient to do this every time I need GUI – since I want the machine to be headless.
EDIT
I have also tried xrdp
but I cannot connect to the machine – I have it behind the VirtualBox NAT and the ports are forwarded.
Best Answer
I just solved this problem by clicking the green arrow "Show" at the top of the VirtualBox GUI while my headless instance was already running.
I could see what the VM window would look like inside the "Preview" Pane on the VirtualBox GUI, and after clicking "Show", the VM window came up as though I had initially powered on the machine from the Virtualbox GUI.
Edit: When you close the VM window, it will give you the additional option to "Continue running in the background", so your headless instance can revert to being headless again.