I'd like to run a VM guest on a headless server.
The guest runs Xubuntu for graphics and x11vnc
as described here. I already tested the VM on my laptop, but now I'd like to run it on my headless Ubuntu Server, so I thought I could just install a GUI-less version of VirtualBox and control the VM via vboxmanage
commands.
Unfortunately, when I ran sudo apt install virtualbox
on the server, it wanted to pull in 877 MB, most of which look to me like they're GUI-related:
The following NEW packages will be installed:
adwaita-icon-theme at-spi2-core binutils binutils-common binutils-x86-64-linux-gnu
build-essential cpp cpp-9 dctrl-tools dkms dpkg-dev fakeroot fontconfig g++ g++-9 gcc
gcc-9 gcc-9-base gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5
libasyncns0 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatomic1 libatspi2.0-0
libavahi-client3 libavahi-common-data libavahi-common3 libbinutils libc-dev-bin
libc6-dev libcaca0 libcairo-gobject2 libcairo2 libcc1-0 libcolord2 libcrypt-dev
libctf-nobfd0 libctf0 libcups2 libdatrie1 libdouble-conversion3 libdpkg-perl
libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl-mesa0 libegl1
libepoxy0 libfakeroot libfile-fcntllock-perl libflac8 libgbm1 libgcc-9-dev
libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgl1 libgl1-mesa-dri
libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgomp1 libgraphite2-3 libgsoap-2.8.91
libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libice6 libinput-bin libinput10
libisl22 libitm1 liblcms2-2 libllvm11 liblsan0 liblzf1 libmpc3 libmtdev1 libopus0
libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0 libpcre2-16-0
libpixman-1-0 libpulse0 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5
libqt5opengl5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5x11extras5
libquadmath0 librest-0.7-0 librsvg2-2 librsvg2-common libsdl1.2debian
libsensors-config libsensors5 libsm6 libsndfile1 libsoup-gnome2.4-1 libstdc++-9-dev
libthai-data libthai0 libtsan0 libubsan1 libvncserver1 libvorbisenc2 libvpx6
libvulkan1 libwacom-bin libwacom-common libwacom2 libwayland-client0
libwayland-cursor0 libwayland-egl1 libwayland-server0 libx11-xcb1 libxcb-dri2-0
libxcb-dri3-0 libxcb-glx0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0
libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0
libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1
libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1
libxkbcommon-x11-0 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6
libxxf86vm1 linux-libc-dev make manpages-dev mesa-vulkan-drivers qt5-gtk-platformtheme
qttranslations5-l10n ubuntu-mono virtualbox virtualbox-dkms virtualbox-qt x11-common
0 upgraded, 175 newly installed, 0 to remove and 0 not upgraded.
Need to get 143 MB of archives.
After this operation, 877 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
Since I don't want my server to be cluttered with packages I'll never need, I was wondering whether there is a way to install a minimal, command-line only VirtualBox instead?
Alternatively, if VirtualBox doesn't provide a way to run and manage VMs without the overhead, is there a similarly easy solution that does?