this post was submitted on 23 Jun 2024
31 points (94.3% liked)
Linux
5232 readers
124 users here now
A community for everything relating to the linux operating system
Also check out !linux_memes@programming.dev
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Usually KVM is used alongside higher level programs like QEMU and/or libvirt/virt-manager, which handle the display side of things. It can be done in many different (configurable) ways, including built-in SPICE/VNC/RDP servers (guest support not needed), or it can just render directly into the application window itself (not as a background service) via SDL/OpenGL/etc., but that means closing the program destroys the VM.
I think the most popular/common option is qemu/kvm via libvirt, using virt-manager to manage the VMs and handle the display, which by default uses SPICE behind the scenes and runs the VM as a background service which virt-manager (or any SPICE client) can connect/disconnect from at will.
The libvirt method is more akin to VMware ESX server, where the VMs are always running in the background, and you attach to them to see the display whenever you want, whereas VMware Workstation/Player/etc. is more like running qemu directly with the SDL/GL display option which does all the emulation and display directly inside the running application window and the two are tightly coupled.
Right: https://virt-manager.org/
One can close the window that shows the virtual machine, and it would still run in the background. Qemu+Kvm is not the only way to use Virtual Machines with virt-manager, one can also use LXC or Xen as its Hypervisor. I'm relatively new to the concept of Kvm and it was a little bit confusing first.
First a connection to a Hypervisor needs to be established (here Qemu+Kvm). I think that means a server is running in the background, correct me if I'm wrong. Then one can install or run a virtual machine with the connection. Here is a screenshot on my current setup (I tried to create an AppImage, long story) and added a few useless red arrows. The QEMU/KVM connection is automatically connected at start (configurable). Once a virtual machine is running, you have to click "Open" to show the window of the VM.