remote desktop to headless ubuntu

Discussions related to using VirtualBox on Linux hosts.
Post Reply
bolgruz
Posts: 2
Joined: 15. Jul 2017, 15:56

remote desktop to headless ubuntu

Post by bolgruz »

Hi.

I'm running virtualBox on a headless ubuntu server (16.04_LTS).

I'm following the tutorial found here, which I find great:
VirtualboxDOTorg / manual / ch07.html

So I've done:
VBoxManage createvm --name win81 --ostype Windows81_64 --register
VBoxManage modifyvm win81 --memory 2048 --acpi on --boot1 dvd --nic1 nat
VBoxManage createhd --filename win81.vdi --size 64000
VBoxManage storagectl win81 --name "IDE Controller" --add ide --controller PIIX4
VBoxManage storageattach win81 --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium win81.vdi
VBoxManage storageattach win81 --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium Memtest86.iso // I use memtest86 just for testing
VBoxManage modifyvm win81 --vrde on
VBoxManage modifyvm win81 --vrdeauthtype null // I wil use auth later on. I first want to try out an easy scenario...
VBoxHeadless --startvm win81

The VM starts, and virtualBox says it is listening on port 3389, great!

Now I want to connect using remote desktop.
I use Windows 10 remote desktop client, and enter the address of my server.

The issue is that is see in the terminal of my linux server:

15/07/2017 15:59:11 other clients:
15/07/2017 15:59:11 webSocketsHandshake: invalid client header
15/07/2017 15:59:11 Client [my Win10 ip] gone

Remote desktop in windows10 says it cannot connect.

How coul I go forward?
I've tried to restart my linux host, and restart the vm, just to be sure, but it behaves the same...

Thanks,

Sylvain.
bolgruz
Posts: 2
Joined: 15. Jul 2017, 15:56

Re: remote desktop to headless ubuntu

Post by bolgruz »

After quite a while, I found the issue.

You not only need to install Oracle_VM_VirtualBox_Extension_Pack-5.0.40-115130.vbox-extpack, but also remove the (in my case preinstalled) VNC extpack, since they apparently both listen on the same port...

sudo VBoxManage list extpacks
sudo VBoxManage extpack uninstall VNC

sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-5.0.40-115130.vbox-extpack
sudo VBoxManage extpack cleanup
Post Reply