VirtualBox Enable VRDE from CLI

A brief How-To enable the VRDE remote desktop feature for a VirtualBox guest on a linux host using the command line.

I already have a VirtualBox guest machine named Alpine deployed on a Ubuntu host, I wish to enable VRDE and configure both the TCP port and IP address to listen on.

jon@Ubuntu:~/$ VBoxManage showvminfo Alpine | grep VRDE
VRDE:                        disabled
jon@Ubuntu:~/bin$ 

As you can see above, there is currently no VRDE configuration for the Alpine VM.

jon@Ubuntu:~/$ VBoxManage modifyvm Alpine --vrde on --vrdeport 12345 --vrdeaddress 127.0.0.1 
jon@Ubuntu:~/$ 
jon@Ubuntu:~/$ VBoxManage showvminfo Alpine | grep VRDE
VRDE:                        enabled (Address 127.0.0.1, Ports 12345, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
VRDE property               : TCP/Ports  = "12345"
VRDE property               : TCP/Address = "127.0.0.1"
VRDE property               : VideoChannel/Enabled = <not set>
VRDE property               : VideoChannel/Quality = <not set>
VRDE property               : VideoChannel/DownscaleProtection = <not set>
VRDE property               : Client/DisableDisplay = <not set>
VRDE property               : Client/DisableInput = <not set>
VRDE property               : Client/DisableAudio = <not set>
VRDE property               : Client/DisableUSB = <not set>
VRDE property               : Client/DisableClipboard = <not set>
VRDE property               : Client/DisableUpstreamAudio = <not set>
VRDE property               : Client/DisableRDPDR = <not set>
VRDE property               : H3DRedirect/Enabled = <not set>
VRDE property               : Security/Method = <not set>
VRDE property               : Security/ServerCertificate = <not set>
VRDE property               : Security/ServerPrivateKey = <not set>
VRDE property               : Security/CACertificate = <not set>
VRDE property               : Audio/RateCorrectionMode = <not set>
VRDE property               : Audio/LogPath = <not set>
jon@Ubuntu:~/$ 
jon@Ubuntu:~/$ 

VirtualBox is now listening on the Ubuntu host's loopback IP 127.0.0.1 using TCP port 12345. This allows me to access the VM using a SSH tunnel to the Ubuntu host.