vboxweb in 5.2.18-dfsg-2~ubuntu18.04.3 ignores VBOXWEB_HOST ip in /etc/default/virtualbox

Bug #1819045 reported by David Litster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
New
Undecided
Unassigned

Bug Description

PROBLEM:

Phpvirtualbox depends on having vboxweb starup and listening properly. I installed the virtualbox 5.2.18-dfsg-2~ubuntu18.04.3 package on a default server install of 18.04, and had trouble getting the vboxweb.service unit file to accept my environment changes to /etc/default/virtualbox (i.e. they were completely ignored)

VBOXWEB_USER=vbox
VBOXWEB_HOST=0.0.0.0

 I finally understood that some combination of systemd unit file and vboxweb itself was ignoring the default in my /etc/default/virtualbox file. I got that working after hacking extra startup args (--host=0.0.0.0) into /lib/systemd/system/vboxweb.service, based on this advice:
https://askubuntu.com/questions/793101/how-can-i-configure-vboxweb-to-listen-on-specific-adress-on-ubuntu-16-04

EXPECTED BEHAVIOR:

The repo package should source /etc/default/virtualbox according to previously working instructions and conforming to the behavior of the Oracle package. Why are the systemd launch unit scripts different?

ENVIRONMENT:

Description: Ubuntu 18.04.2 LTS
Release: 18.04
virtualbox 5.2.18-dfsg-2~ubuntu18.04.3

The Ubuntu systemd unit script appears to be the same in virtualbox 6.0.4-dfsg-5 from disco.

ADDITIONAL INFORMATION:

On a whim I decided to install the official 6.0, then 5.2 packages from Oracle. Both picked up my environment variable changes flawlessly.

It looks like the way the Oracle package starts vboxweb(oracle) is quite different from the ubuntu package. Does this have something to do with why the changes aren't being picked up?

UBUNTU - /lib/systemd/system/vboxweb.service
cat debian/vboxweb.service
[Unit]
Description=VirtualBox Web Service
After=network.target

[Service]
Type=forking
ExecStart=/usr/bin/vboxwebsrv --pidfile /run/vboxweb.pid --background
PIDFile=/run/vboxweb.pid

[Install]
WantedBy=multi-user.target

From:
https://packages.ubuntu.com/bionic/amd64/virtualbox
https://packages.ubuntu.com/disco/amd64/virtualbox

ORACLE - /lib/systemd/system/vboxweb.service
cat /lib/systemd/system/vboxweb-service.service
[Unit]
SourcePath=/usr/lib/virtualbox/vboxweb-service.sh
Description=
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target
After=vboxdrv.service
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/usr/lib/virtualbox/vboxweb-service.sh start
ExecStop=/usr/lib/virtualbox/vboxweb-service.sh stop

[Install]
WantedBy=multi-user.target

NOTE: The systemd unit file uses this script: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Installer/linux/vboxweb-service.sh

Revision history for this message
Simon Iremonger (ubuntu-iremonger) wrote :

Bionic-proposed repository, now has Virtualbox 5.2.32 in there...
Can you confirm this fixes the above issue over the bionic 5.2.18 version?
If not, it may be possible (if hurry!) to get the community maintainer/updater to fix that issue in proposed update as well.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

please try and use /etc/vbox/vbox.cfg for the configuration values!
the fix for vboxweb will come in 6.1.16-dfsg-4

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.