VirtualBox is ridiculously simple to set up and get virtual machines going. Shared folders, shared clipboard and much more are no issue.
But.
It eats resources. The installed virtual machines (VM) run relatively slow. What have you found to be feature comparable - and most importantly more resource-efficient - alternatives for running VMs under Linux?
Definitely if you’re on Linux, use Qemu (and the best is to install a GUI to use it after)
I use Quickemu for mine, makes it really quick and easy to get a new system up and running.
Really wish we could get in the habit of recommending GUIs first, not last.
Without any kind of software behind GUI this is almost useless and I think that CLI (or even TUI) are today so underrated that we should give more and more power to them instead of GUI
Really wish we wouldn’t have to separate the two. This adds a complication layer for exiting Windows users.
Ideally: install app (insert name). Run and enjoy.
I’ve looked at it. It comes up a lot. Thank you.
What about VMware Workstation Pro? Or are you looking for something FOSS? It’s easy to download without creating an account and I found it easier to setup that VB. I actually switched because I’d been having connectivity issues with VB and it took me a year to realise it was a VB issue.
Under Linux, the recommended route is KVM/Qemu, with Virt-Manager as the GUI front-end for them. You will need to follow tutorials to install it correctly, as it requires special steps, e.g. adding them to specific usergroups. But once it works, it works well.
Yea, the installation isn’t too difficult. Looking at my groups as well I think it’s only the
libvirt
group that you have to add a user to for KVM/QEMU with Virt-Manager, but the same could be said for VirtualBox as I believe you have to still add the user to thevboxusers
group if you were to install it instead.I recall I had to do like one thing to get it working outside of just apt install but I can’t for the life of me remember what it was. I just put the error in a web search and found what was needed to deal with it.
definitely not as easy as virtualbox
Gnome Boxes is about as easy as virtual box, and wont break your kernel.
Not for the faint of heart, but I’ll keep it in mind.
You can also run VirtualBox with KVM as a backend.
VMware workstation is free, it’s not open source but it’s faster than VirtualBox, if you want GPU passthrough KVM is the only choice but require quite bit of effort to setup
KVM, QEMU are the most common solutions here
virt-manager is my go-to. There’s also Gnome Boxes, but I’ve never used it myself. virt-manager is the best I’ve tried, personally. Both use KVM, so they should be much more resource efficient
I’ve been using Virt-Manager with KVM/Qemu and don’t have any complaints.
There’s nothing better than virtual box for desktop environments, especially after you install the guest tools.
I don’t know what you mean by “it eats resources” - of course it does, you’re emulating and entire system. What are your expectations?
Virtual Box is a Type 2 hypervisor, which means it’s running on top of the OS, and not directly on the hardware.
KVM is a Type 1, which runs directly on the hardware itself.
There are pros and cons to each, and VBOX is a great piece of software, but it is more resource intensive than other options available.
And it performs very well, especially for gui applications. It even supports multiple monitors for the guest.
For running a desktop it’s clearly superior and “fast enough”. I used it to run my primary development environment for years.
I don’t know if it’s more resource-efficient, but when I wanted to start using VMs for work, I knew VirtualBox would not be a viable choice (thanks to Oracle and their horrible licensing), so I chose GNOME Boxes and have been pretty happy with it. I didn’t do any tests so I can’t say for certain , but it doesn’t seem like the resource consumption is that much different.
Especially on Linux, libvirt/qemu on kvm is a no-brainer. It works, it’s fast, the setup is practically effortless
As jet points out, QEMU for actual hardware virtualisation.
There is one relevant thing, which is not exactly in the same category, but does somewhat similar thing:
containers
most popular example being Docker
https://en.wikipedia.org/wiki/Containerization_(computing)
containers don’t emulate whole hardware stack like virtual machines do, they emulate just the OS
so because they don’t put resources towards emulating hardware, they are much more resource efficient.
so if your problem is “I’m running Fedora but I want to run something that for some reason runs just on Ubuntu”, then you could use containers for that.
containers are mostly used in headless environments (as in servers, no GUI), so running and displaying desktop Linux inside them is a bit tricky, but it can be done.they emulate just the OS
Containers don’t emulate anything. They have an OS installed within them. Typically you use Alpine Linux which super minimalistic and lightweight.
yes, valid point, thank you for the correction
I’ve been using https://containertoolbx.org/ recently to manage my “other distro” requirements. It doesn’t do anything special but works nicely as a wrapper around podman and does all the bind mounts and uid mappings so you can just enter your $HOME as though you have set up your account in a new OS.
Distrobox is Toolbx but more portable (packaged on basically all distributions) and supports way more distributions as guests. I recommend using that if not on Fedora or you want to run a different guest than Fedora.
for running GUI app, I use flatpak which is a sort of a container / sandbox
https://virt-manager.org/ is a no brain. Built upopen libvirt/Qemu/KVM it’s way more powerful and pretty much just as easy to easy. There is zero reasons to use anything else.
How easy is it to convert a VirtualBox machine+hdd to Virt Manager?
Pretty damn easy.
qemu-img convert -f vdi -O qcow2 Windows10.vdi Windows10.qcow2
Here’s a more complete guide: https://cubiclenate.com/2024/05/30/converting-vdi-to-qcow2-step-by-step-guide-for-virt-manager-migration/
Virtualbox should not run slowly in terms of compute. Make sure your allocating enough cores and memory, and VT/AMD-V is enabled in the BIOS of the host. Also Guest additions should be installed. Not sure but that might help IO speeds.
What might be slow, Graphics may not be acceralerated. Exactly what VM software to use, what it works with, and actually getting it to work can be challanging. Installing guest drivers though is probably required.
For Linux KVM solutions are preferred but more technical to use. Getting graphics acceleration with KVM has been challenging, though may be possible.
All VM solutions are resource intensive. Use containers and/or native software to reduce/avoid that.
I haven’t used it nearly as much as VirtualBox but Boxes (flatpak) is definitely a breeze to use. It uses KVM under the hood I think. If your use cases are complicated it might abstract away too much though.