I have been looking for a way to connect to my virtualbox vm guest by a vnc client.
By that I mean, not installing a vnc client/server on the vm, but as an addition to virtualbox; The same way as vps providers do.
I have searched for this, nothing came up.
How do I do this?
Is vnc a requirement? or are you simply referring to being able to access the "physical screen" of your virtual machine without having to use a network enabled vm?
If so, The Virtual Box way of doing it ,is using Oracles implementation of the remote desktop protocol (RDP) which they call VRDP.
This allows you control of the guest with any rdesktop client.
You can see Oracles instructions for installing the vrdp here
If you really require / prefer VNC , or dont want the proprietary vbox extension you can enable vnc support with some tinkering according to this post
I'm having the same problems because the PEUL is not an option for me. From what I can tell VNC is available if you build it yourself and use the
--enable-vnc
option when running configure.Most other hypervisors (KVM, Xen, VMWare) have built-in VNC servers for the video framebuffer. The commercial version of VirtualBox does not have this capability but there was a GPL-licensed extension added to the Open Source Edition some time back.
If you install virtualbox from the universe repository, according to the changelog it has been enabled since version 3.1.53-dfsg-1 (for "headless" machines).
Unfortunately I don't use VirtualBox so somebody else (or google) would need to help you with how to set up the machine for VBoxHeadless.
In case you want a VirtualBox Headless machine, as in @WillDaniels' answer, here is a howto guide, which explains how to create a headless vm, and connect it to the network via bridged networking.