Page 1 of 1

[Solved] Script VBoxManage to GUI-fy existing headless VM?

Posted: 23. Aug 2018, 09:44
by NginUS
I have a script that uses vboxmanage to start a VM headless, which is fine. But I'd like to be able to script what happens when you open the main VirtualBox Manager window & use that VM's 'Show' button to start a detachable GUI on its display.

I know the Extension Pack allows for RDP'ing to the local display, but pertinent licensing details prevent legally doing so. The guest OS is Windows 10 Home Edition. I saw a hack to make RDP work with Terminal Services but anything constituting a licensing grey-area is a deal-breaker.

I looked through 'Chapter 8 - VBoxManage' & didn't see any mention of anything like this. Am hoping someone here has a (legal) solution- don't want to have to pay to upgrade the 'Home' edition to one that includes RDP.

Re: Script VBoxManage to GUI-fy existing headless VM?

Posted: 23. Aug 2018, 10:30
by socratis
I believe that you must have misunderstood something... ;)
The RDP option that you set from the "VM Settings" » "Display" » "Remote Display", has absolutely nothing to do with the guest. Or the host for that matter. It's a built-in RDP server in the VirtualBox Extension Pack. And the only license that you have to follow is the PUEL license of the ExtPack.

Remember that when you connect via RDP, you are *not* connecting to the guest, you are connecting to the host. The guest doesn't even have to have an RDP server, or a network connection at all. That's how, for example, you could RDP in a DOS VM. ;)

Re: Script VBoxManage to GUI-fy existing headless VM?

Posted: 23. Aug 2018, 10:31
by NginUS
Yeah, I get that. Sorry I wasn't clear about it.

Re: Script VBoxManage to GUI-fy existing headless VM?

Posted: 23. Aug 2018, 10:47
by socratis
NginUS wrote:Yeah, I get that.
Actually, based on your first post, I don't think that you do in fact get it:
NginUS wrote:...pertinent licensing details prevent legally doing so
...I saw a hack to make RDP work with Terminal Services
...constituting a licensing grey-area is a deal-breaker
...hoping someone here has a (legal) solution ... to one that includes RDP.
Now, the other part, the "scripting", I'm not sure I understand where the problem is:
NginUS wrote:I have a script that uses vboxmanage to start a VM headless, which is fine
NginUS wrote:But I'd like to be able to script ... to start a detachable GUI on its display.
Unless I'm missing or not understanding something, you can change that script to start the VM as Detachable. See ch. 8.12 VBoxManage startvm of the User Manual, or just type:
  • 
    VBoxManage startvm
to see the three "--type" options.

Re: Script VBoxManage to GUI-fy existing headless VM?

Posted: 23. Aug 2018, 11:02
by NginUS
I don't need to access it when it starts- headless is on purpose because while it needs to do its periodic tasks, I only need to access it to do stuff a couple times a day. Its fine to open the main window then click the Show button. But simplifying that would be preferred.

I had previously been using Windows 7 Ultimate & had a single-click access launcher via Remmina, but now since Windows 10 Home won't let me RDP in, I have to use VirtualBox's local display via the Show button.

Re: Script VBoxManage to GUI-fy existing headless VM?

Posted: 23. Aug 2018, 12:20
by socratis
NginUS wrote:but now since Windows 10 Home won't let me RDP in
Are you even reading my posts? You do NOT have to RDP in your VM. You RDP in your host. The RDP server is running in your host. As part of the VirtualBox ExtPack. Do you understand that part, or not?

From re-reading your posts, I think that what you want to do is: launch a VM headless, then at some point access the VM's window, but if possible without launching the VirtualBox Manager. Is that a correct description of the situation?

If so, then start the VM with:
  • VBoxManage start "<VM>" --type headless
and when you want to show the GUI later on:
  • VBoxManage start "<VM>" --type separate
That will "attach" a window to the headless running VM.

Re: Script VBoxManage to GUI-fy existing headless VM?

Posted: 23. Aug 2018, 12:26
by NginUS
Yea so again, I apologise for not making it clear that I can't legally use the Extension Pack in my use case.

However, I'll try your suggestion to see if I can re-attach to the VM that was launched headless. Thank you for that.

Should it work, I'll of course mark the thread solved.