Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Nov 2016 14:45:49 +0100
From:      "Martin \"eto\" Misuth" <eto.freebsd@ethome.sk >
To:        freebsd-questions@freebsd.org
Subject:   Re: VirtualBox on a remote server (SOLVED)
Message-ID:  <20161109144549.5f43f30c@eto-mona.office.smartweb.sk>
In-Reply-To: <20161109100302.66efe0dc@Papi>
References:  <CA%2ByoEx91vDJ26AzjYxO=TmoNa8wpnfJjDzF3MKOqxVYWtGE-5w@mail.gmail.com> <20161109111948.2ab0fd73@eto-mona.office.smartweb.sk> <20161109100302.66efe0dc@Papi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 9 Nov 2016 10:03:02 -0300
Mario Lobo <lobo@bsd.com.br> wrote:

> Hi Martin;
> 
> Thanks for replying.
> 
> Solved both errors!
> 
> The dbus error was solved by running:
> 
> dbus-uuidgen --ensure
> 
> To generate a machine-id, which was lacking.
> 
> 
> The libGL error was solved by issuing:
> 
> export LIBGL_ALWAYS_INDIRECT=1
> 
> The reason for this is because on X-forwarded ssh sessions, the
> Xserver tries to open the display of the client, which in this case is
> running on an Intel i915 card.
> 
> It was trying to use direct rendering and it can't for
> whatever reason.
> 
> Setting the above env var solves the problem and I now get the
> QT GUI on my display.

Glad you solved it!

However I still advise you, to check out headless vbox operation. I did bit of
researching after reading your mail, and it seems it is now much better
integrated into FreeBSD even!

So I am retracting my statement that it sucks. It seems it got much much better. 
rc.d wrapper seems to be provided now , so you don't have to write
it yourself, and such.

Here is most concise blog I found on the matter:
http://yuriystanchev.blogspot.com/2015/03/phpvirtualbox-on-freebsd.html

Basically the operation consists from vboxwebsrv daemon and vms set to use VNC
console for output.

The vm "herding" is done by vboxwebsrv control process (usually running as vbox
user) - it exposes control interfaces over HTTP/SOAP - usually bound to
localhost. As it acts as standalone daemon, it is greatly unaffected by state of ssh
connections and X forwardings and such.

This daemon can then spawn and tear down virtual machines, through SOAP "RPC",
"without" need to ssh even.

You can still manage VMs manualy by VBoxManage, from ssh session, under
condition, you run it under same user as vboxwebsrv (usually as vbox user) -
for example through sudo. With proper sudo rules, you can script vms this way.

Many people, including me back then, use phpvirtualbox interface paired with
nginx to provide friendlier GUI which is almost identical to QT interface.
This php interface converts your clicks into SOAP calls into vboxwebsrv.

Overall this approach seems much more robust.

  eto



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161109144549.5f43f30c>