Score:0

How to install QEMU on Ubuntu Server?

pw flag

All the info I can find do something like this:

sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients

But when executing it shows it will install a LOT of packages that are for systems with a GUI (fonts/wayland/etc) and not for headless servers.

I want to keep my Ubuntu server as clean as possible, and not install almost the complete desktop environment just to run QEMU.

So what is the better way to install it onto a headless server?

pl flag
What specific packages do you believe are unnecessary for qemu to function correctly? I have just installed those same three packages on my server and it pulled in a reasonable set of libraries. Far from a "complete desktop", not even close.
Score:1
sl flag

Hi @maestro the default user is always in mind when picking default dependencies. Sadly for qemu there are so many use-cases that there isn't one (1) default use case. So the dependencies are aligned to those who'd know the least how to fix situations - and in this case that means that qemu-system-gui is a recommends from qemu-system-$arch.

But it is only a recommends intentionally, that allows you to either uninstall qemu-system-gui (and its implied dependencies) later or use apt-get install --no-install-recommends ... in the first place.

If you want to trim your system to a minimum set of packages then --no-install-recommends might become a good friend of yours anyway :-).

Furthermore qemu-kvm is from the stone age and only left for compatibility and old howto's like the one you probably found. Using qemu-system-$arch usually is more what you want. And OTOH libvirt-daemon-system is only needed if you want to drive things through libvirt (like virsh or virt-manager or such). But you write "just to run QEMU" and that means you won't need it.

Assuming you are on x86 that overall comes down for you to just:

apt-get install --no-install-recommends qemu-system-x86

Hope that helps!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.