File systemd-vboxinit_ManPage of Package systemd-vboxinit

.TH SYSTEMD-VBOXINIT 1 "April 2025" "systemd-vboxinit" "User Commands"
.SH NAME
systemd-vboxinit \- Enable automatic startup of virtual machine sessions during system boot and save their state upon host shutdown or halt.
.SH SYNOPSIS
.B systemd-vboxinit
[\fIOPTIONS\fR]
.SH DESCRIPTION
Systemd-vboxinit is a script that manages VirtualBox VMs to auto start and auto save. It supports systemd integration to
enable automatic boot and shutdown handling of VMs. Derived from vboxinit from the phpvirtualbox project, which is based
on vboxtool. This version is tailored for OpenSUSE but works on any systemd-enabled distro.

.SH OPTIONS
.TP
.BR -s ", " --start
Start enabled virtual machines or show their state.
.TP
.BR -x ", " --stop
Save the state of all running virtual machines, enabled or not.
.TP
.BR -d ", " --disable
Like stop but also stops the vbox daemons (useful before a vbox update).
.TP
.BR -h ", " --help
Show this help.
.TP
.BR -a ", " --about
Display brief info.
.TP
.BR -l ", " --license
Show license.

.SH CONFIGURATION
To enable autostart/autosave, add the extradata key \fIpvbx/startupMode\fR with value \fIauto\fR to the VM using VBoxManage:
.PP
\fBVBoxManage setextradata bar pvbx/startupMode auto\fR
.PP
\fIbar\fR is the name of the virtual machine (see \fBVBoxManage list vms\fR).

.SH NOTE
Do not run \fBsystemd-vboxinit\fR with root privileges. The script should be invoked as a regular user who belongs to the \fIvboxusers\fR group.

.SH USAGE EXAMPLES
.TP
\fBsystemd-vboxinit --start\fR
.TP
\fBsystemd-vboxinit --stop\fR
.TP
\fBsystemctl start VBoxAutostart@foo.service\fR
.TP
\fBsystemctl enable VBoxAutostart@foo.service\fR
.PP
Where \fIfoo\fR is the name of the user that owns the vms and is a member of the \fIvboxusers\fR group.

.SH LOGGING
Use \fBjournalctl _SYSTEMD_UNIT=VBoxAutostart@foo.service\fR to view logs.
Enable persistent logging with \fBsystemd-journald.service(8)\fR.

.SH FILES
.TP
\fI/usr/share/doc/packages/systemd-vboxinit/README\fR
Documentation file.

.SH SEE ALSO
systemctl(1), systemd(1), systemd-journald.service(8), VBoxManage(1)

.SH AUTHOR

\fBJason V. Ferrer (jason.ferrer@gmail.com)\fR

openSUSE Build Service is sponsored by