Ubuntu: Is there anyway to show VirtualMachine after start it with VBoxHeadless?


I've installed a VirtualMachine to work on the background. I use SSH to control it via terminal. But, sometimes SSH service didn't work properly and I can't access the VirtualMachine outside. All I can do is power it off via VirtualBox GUI. But, I think it's not a good idea to use poweroff, since it's like I pull the power cable out. Is there anyway to show the VirtualMachine after I started it via VBoxHeadless? So, I can turn it off with shutdown command.


We can not change the video output from headless to local screen after starting a Virtual Box VM in headless mode. But if not configured otherwise there will be an RDP server started automatically at default port 3389 in a headless machine. By this we will have access to that machine's GUI through any RDP-viewer.

In case SSH did not work it is very likely that your RDP server may be inaccessible too. In this case it is not recommended to poweroff or kill a running VM as this may lead to data loss.

In this case a quite convenient and secure workaround is to terminate the headless machine with saving the machine's state. This can also be done from the command line by:

VBoxManage controlvm "<Name of Machine>" savestate  

After that we will be able to start the machine in non-headless mode at exactly the saved state from the Virtual Box Manager, or again from command line with:

VBoxManage startvm "<Name of Machine>"  

Then we can debug the reason for any previously failed access, or safely shut down the machine.


I was able to do it when I accidentally started a Saved State Normal Start in Headless. I simply saved the headless state again then did a normal start. My first inclination was to ssh into it, but this is much better.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »