From owner-freebsd-questions@freebsd.org Wed Nov 9 13:54:11 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7428AC38305 for ; Wed, 9 Nov 2016 13:54:11 +0000 (UTC) (envelope-from eto.freebsd@ethome.sk) Received: from smtpout6.dnsserver.eu (smtpout6.dnsserver.eu [92.240.253.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35A6DA04 for ; Wed, 9 Nov 2016 13:54:10 +0000 (UTC) (envelope-from eto.freebsd@ethome.sk) Received: from [92.240.253.67] (helo=smtp3s109.dnsserver.eu) by smtpout6.dnsserver.eu with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1c4TKI-0006di-55 for freebsd-questions@freebsd.org; Wed, 09 Nov 2016 14:54:06 +0100 Received: from [80.242.44.220] (helo=eto-mona.office.smartweb.sk) by smtp3s109.dnsserver.eu with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.83 (FreeBSD)) (envelope-from ) id 1c4TKJ-000C4T-KG for freebsd-questions@freebsd.org; Wed, 09 Nov 2016 14:54:07 +0100 Date: Wed, 9 Nov 2016 14:45:49 +0100 From: "Martin \"eto\" Misuth" 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: <20161109111948.2ab0fd73@eto-mona.office.smartweb.sk> <20161109100302.66efe0dc@Papi> Organization: ethome.sk MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 80.242.44.220 X-SA-Exim-Mail-From: eto.freebsd@ethome.sk X-SA-Exim-Scanned: No (on smtp3s109.dnsserver.eu); SAEximRunCond expanded to false X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2016 13:54:11 -0000 On Wed, 9 Nov 2016 10:03:02 -0300 Mario Lobo 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