qemu-kvm for headless system

Hi all

I’ve openSUSE 42.3 minimal install as personal bedside server. And I want to use it as host for my VM’s.

When I try to install qemu-kvm or qemu-x86, zypper wants to install all of that stuff:

Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0 acl adwaita-icon-theme at-spi2-core cups-libs fontconfig gdk-pixbuf-loader-rsvg
gdk-pixbuf-query-loaders glib-networking gsettings-desktop-schemas gtk3-data gtk3-tools hicolor-icon-theme libFLAC8 libLLVM
libSDL-1_2-0 libX11-xcb1 libXcomposite1 libXcursor1 libXdamage1 libXext6 libXfixes3 libXft2 libXi6 libXinerama1 libXrandr2
libXrender1 libXtst6 libXxf86vm1 libasound2 libatk-1_0-0 libatk-bridge-2_0-0 libatspi0 libaudiofile1 libavahi-client3
libavahi-common3 libbluetooth3 libbrlapi0_6 libcacard0 libcairo-gobject2 libcairo2 libcelt051-0 libcolord2 libdatrie1 libdrm2
libdrm_amdgpu1 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libepoxy0 libesd0 libfdt1 libfreebl3 libgbm1 libgdk_pixbuf-2_0-0
libgnutls28 libgraphite2-3 libgtk-3-0 libharfbuzz0 libhogweed2 libibverbs libibverbs1 libjasper1 libjbig2 libjpeg8 libjson-c2
libjson-glib-1_0-0 liblcms2-2 libmlx5-1 libnettle4 libogg0 libopus0 libp11-kit0 libpango-1_0-0 libpciaccess0 libpixman-1-0
libpulse0 librdmacm1 librest0 librsvg-2-2 libsnappy1 libsndfile1 libsoftokn3 libsoup-2_4-1 libspeex1 libspice-server1
libsqlite3-0 libtasn1 libtasn1-6 libthai-data libthai0 libtiff5 libusbredirparser1 libvdeplug3 libvirglrenderer0 libvorbis0
libvorbisenc2 libvte-2_91-0 libwayland-client0 libwayland-server0 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxshmfence1 libyajl2 mozilla-nss mozilla-nss-certs qemu qemu-ipxe
qemu-seabios qemu-sgabios qemu-vgabios qemu-x86 rdma-core xen-libs

is it normal to bring icon themes, GTK3, and others for headless server? How can I avoid it? Not install qemu or change distro are bad choice :slight_smile: How do you think, there is a possibility, that maintainer reviews spec file for reduce dependencies list?

I haven’t revisited the idea of a minimalist KVM hypervisor-only install (Did you really mean you wanted QEMU support, because that’s a whole different situation), especially since QEMU integration.

A lot of those graphics libraries are likely needed for remote graphical management tools like the VNC based connection you’d normally use when you use virt manager to connect to a remote machine.

But, if you were willing to use only CLI and not use libvirt?
That’d be an interesting exploration.

If you’re looking for a practical approach, my recommendation is…
Even if headless, you may want to support remote graphical consoles and for that you need to install a full graphical environment.
You <may> be able to get everything you need to work in a MinimalX configuration which is not a full Desktop, but an OpenBox implementation (IIRC).
But, for a long term configuration guaranteed to support every possible situation you should install a full Desktop, if even only a lightweight Desktop like LXQt or XFCE.

Note that if you have already installed a text-only “Server” configuration, you cannot just install a Desktop, I’ve forgotten the name of the pattern at the moment, but that pattern which is installed only on text-only Servers provides missing functionality without a Desktop but also prevents a simple Desktop install. When I dealt with this years ago, there is a convoluted process which starts by removing the pattern but understand that removing a pattern does not uninstall the packages in the pattern so you might have to also remove packages manually.

Since that experience, I’ve personally preferred to pave and re-build with LXQt or XFCE instead. IIRC the result can be only about 200MB additional storage used for the Desktop files. Additional resource usage to support a graphical environment should be nearly non-existent if no one is logged in. There is additional attack surface that needs to be locked down, but for the most part should not be an issue if this is a single purpose machine. If your machine is already providing network services, then you should already be dealing with that.

HTH,
TSU

Thanks for your reply.

I forget about virtualbox. And it has much less dependencies:

The following 10 NEW packages are going to be installed:
libICE6 libSM6 libXext6 libXmu6 libXt6 libvpx1 systemd-logger virtualbox virtualbox-host-kmp-default xbitmaps

10 new packages to install.
Overall download size: 13.1 MiB. Already cached: 0 B. After the operation, additional 38.0 MiB will be used.

So I decide to switch to it, because it has full-featured cli interface, possibility to start guests in headless mode and much more. But major for me is modest appetit for unneeded for me packages.