LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VitrualBox - How to show OS window from headless ? (https://www.linuxquestions.org/questions/linux-newbie-8/vitrualbox-how-to-show-os-window-from-headless-4175535177/)

bangnagr 02-26-2015 10:13 AM

VitrualBox - How to show OS window from headless ?
 
1 Attachment(s)
Hi All

I'm trying to bring virtual guest from headless mode to gui mode in VirtualBox. But I don't know how to do it. I really appreciate if someone help me on this.

I usually run linux virtual machines in headless mode and connect to it through ssh. I have setup tigervnc-server on linux virtual machine, so that i can connect through vncviewer whenever i want to work on gui.

But recently, one of my friend said, I can also start virtual machine in headless mode in VirtualBox window by holding <SHIFT> key and press Start. Sure it did, it started in headless mode. But, now I don't know how to bring back window again.

Thanks you.

suicidaleggroll 02-26-2015 10:26 AM

If it's running in headless mode, there is no window, so I'm not sure I understand the question.

You can connect to VirtualBox via RDP (each VM should have its own unique port) to watch/interact with the boot process or the OS even if it doesn't have a network connection. That's a much better solution than installing a VNC server on the VM IMO.

eg:
Code:

/usr/bin/nohup /usr/bin/vboxheadless -e "TCP/Ports"=3389 -s "VM Name" &> $HOME/vm_name.log &
Then just connect to the VM host (not the VM itself) on port 3389 with RDP.

bangnagr 02-26-2015 10:47 AM

Quote:

Originally Posted by suicidaleggroll (Post 5323728)
If it's running in headless mode, there is no window, so I'm not sure I understand the question.

Sorry for my confusing english. :) I usually work in TUI, so that i can save some memory. This is what i do:

Start VirtualBox guest in terminal:
Code:

$ VBoxManage startvm kali --type headless
Connect to VM:
Code:

$ ssh root@kali
Then, Shutdown it by
Code:

$ VBoxManage controlvm kali poweroff
If I need gui...
Code:

$ vncviewer kali:1
I didn't knew that one can also start VM in headless mode from VirtualBox GUI Window by holding <SHIFT> key and pressing Start. Since I started VM in headless mode from GUI interface of VirtualBox, I thought, I can also show the window of VM back - like again holding <SHIFT> key and press something...

Quote:

Originally Posted by suicidaleggroll (Post 5323728)
/usr/bin/nohup /usr/bin/vboxheadless -e "TCP/Ports"=3389 -s "VM Name" &> $HOME/vm_name.log &

I'll try this.

Thanks

suicidaleggroll 02-26-2015 10:52 AM

Quote:

Originally Posted by bangnagr (Post 5323752)
Since I started VM in headless mode from GUI interface of VirtualBox, I thought, I can also show the window of VM back - like again holding <SHIFT> key and press something...

No I don't believe that's possible. You can always use RDP to connect to the session though, the only difference then would be the menu bar along the top.

bangnagr 02-26-2015 11:46 AM

@suicidaleggroll, thanks, appreciate it.


All times are GMT -5. The time now is 02:18 PM.