For those who want to remotely manage virtualbox

someone has come up with a way to do this, its called remotebox
its currently linux only, but you can spin up a local vbox instance with linux and run it from there…
this video claims to have remotebox running on windows :

1 Like

I might actually be able to use this for some of the work I do. Thanks for sharing!

you wil need the vboxwebsrv (name may vary) running on the machine running the virtual machines. i dont know how to set it up on windows, but in linux you need to create/modify a few files.

/etc/default/virtualbox needs the following (create if it doesnt exist)

LOAD_VBOXDRV_MODULE=1
SHUTDOWN_USERS=""
SHUTDOWN=poweroff
VBOXWEB_USER=<user running virtualbox>
VBOXWEB_HOST=0.0.0.0

next create the following folder and chmod it:

mkdir /run/vboxweb
chmod 755 /run/vboxweb

next modify /usr/lib/systemd/system/vboxweb.service

[Unit]
Description=VirtualBox Web Service
After=network.target

[Service]
Type=forking
ExecStart=/usr/bin/vboxwebsrv --pidfile /run/vboxweb/vboxweb.pid --host=0.0.0.0  --background
ExecStopPost=/usr/bin/rm /run/vboxweb/vboxweb.pid
PIDFile=/run/vboxweb/vboxweb.pid
User=<user running virtualbox> 
Groups=vboxusers
[Install]
WantedBy=multi-user.target

note the addition of --host 0.0.0.0 , by default vboxweb only listens on localhost.

finally
systemctl daemon-reload
sysemctl vboxweb restart

explanations :
/etc/virtualbox defines the user to run virtualbox and the host to run it on (if ran standalone mostly, systemd will toss a error if this doesnt exist)

next we create a folder for the systemd pid to reside, so we can change its permissions to allow the normal user to control vboxweb as opposed to root (more secure)

finally we modify the .service file to make vboxweb run on all interfaces (change to the desired one if you like) and run as the virtualbox user.

1 Like