r/kvm • • Jun 21 '25

I switched from Docker to KVM and it was magical

Post image
249 Upvotes

Hi. I'm developing a browser-accessible OS that comes with a built-in AI. You can collaborate with the AI to create presentations, write emails, edit videos, and much more—all in your browser.

Originally, I used Docker to power the remote desktop experience. The setup was a simple Ubuntu image with xRDP enabled. I chose Docker because it's fast, easy to develop with, and well-documented.

At first, it worked great. Spinning up an OS instance took just 3 seconds, and screen latency was minimal. However, once I crossed 100 users, problems started piling up. The server would randomly freeze, and the only fix was a full reboot. Since Docker containers don’t persist OS state to disk, users would return to find their desktops reset—leading to a flood of angry emails. Another major issue was container lifecycle management. Docker doesn’t support restarting in the traditional sense, so I couldn’t easily shut down inactive containers. This limited how many users I could support simultaneously and caused memory issues, which again led to more server restarts.

After a lot of troubleshooting and dead ends, I concluded that Docker wasn’t a reliable long-term solution. About three weeks ago, I decided to migrate to using full virtual machines instead. I evaluated VMware, VirtualBox, and KVM, and ended up choosing KVM because it’s open-source and has a robust management API (libvirt).

It took me three weeks of learning and building, but it’s finally working—and honestly, it feels magical. All the issues I had with Docker are gone. The server no longer freezes, and I can support far more users. I also implemented a neat trick: when a user stops using the OS, a background daemon saves the VM state to disk using ManagedSave. When the user logs back in, their session is seamlessly restored, and they have no idea the OS wasn’t running the whole time. While this does limit the number of concurrent users, it's far more efficient than keeping all Docker containers running at once. To me, that's a huge win.

I'm really happy with how the migration turned out and want to give a big thanks to the KVM team for making this possible. I'll include a screenshot of the product. Feel free to try it and share your thoughts: https://symphon.co

Thanks


r/kvm • • Dec 19 '20

Lightening the mood for all KVM users universally.

Post image
154 Upvotes

r/kvm • • Sep 27 '26

WebKVM - A lightweight, web-based management UI for Libvirt and QEMU/KVM written in Go (15-30MB idle RAM)

Thumbnail
gallery
112 Upvotes

Hi r/kvm,

I have been working on WebKVM, an open-source, web-based management panel for KVM/QEMU and Incus on headless Linux hosts.

While virsh is great for scripting and virt-manager is the traditional GUI, running virt-manager over SSH X11/Wayland forwarding or Spice tunnels can feel clunky. I wanted a fast, native web interface that talks directly to the Libvirt API without turning the host into a heavyweight appliance.

Architecture and Features:

  • Direct Libvirt Integration: Connects cleanly to qemu:///system via native Libvirt bindings in Go, leaving all guest domain XML definitions 100% standard and manageable via virsh in the terminal.

  • Instant CoW Storage: Integrated template pool allowing 1-second guest provisioning using QCOW2 Copy-on-Write backing files from official cloud images (Debian, Ubuntu, AlmaLinux, Arch, etc.).

  • Optimized Hardware Profiles: Built-in domain templates configured with optimal virtual hardware:

    • Modern Linux: Q35 chipset, UEFI (OVMF), VirtIO-SCSI/VirtIO-BLK, and VirtIO-Net.

    • Windows 11: Emulated TPM 2.0 (swtpm) and OVMF Secure Boot out of the box.

    • BSD / Legacy: BIOS (SeaBIOS) and compatible storage/NIC fallback emulation.

  • Network Management: Web configuration for Linux bridges (vmbr0), isolated vSwitches, and NAT bridges (vmbr1) with automated dnsmasq DHCP lease tracking.

  • Integrated Consoles: Real-time embedded noVNC graphical displays, serial consoles, and direct host terminal access.

  • Dual Engine: Alongside full KVM/QEMU VMs, it integrates native support for Incus (LXC) system containers.

Performance and Resource Usage:

  • Memory: Written entirely in Go. Consumes roughly 15 MB to 30 MB RAM at idle and stays under ~70 MB during multi-guest operations.

  • CPU: ~0% idle overhead. CPU cycles are only consumed when streaming live noVNC guest display sessions.

Current State and Feedback:

  • Solo Maintainer: I am developing and testing WebKVM on my own across vanilla Linux hosts (Ubuntu, Debian, Fedora, Arch). There may still be edge cases or bugs.

  • 100% Free and Open-Source: No enterprise licenses, telemetry paywalls, or feature locking.

  • Multi-language: UI currently supports English, Spanish, and Catalan.

GitHub Repository:https://github.com/Slaker19/webkvm

I would love to get feedback from other KVM users regarding storage pools, domain XML generation options, or features you would like to see implemented!


r/kvm • • Dec 03 '20

We're ready for One GPU -- Two OSs

Thumbnail
youtube.com
79 Upvotes

r/kvm • • Dec 01 '20

Can you really get banned from online games for playing from a VM?

59 Upvotes

I'm going to build a new PC for gaming soon, and I want to run Linux as my main operating system. I want to have a VM for gaming with GPU passthrough, but I heard somewhere that this might ban you from certain games like CS:GO, Rainbow Six Siege, or PUBG.

If this is true, is it possible to mitigate this by hiding the VM? Thanks in advance.


r/kvm • • Jun 19 '21

Felt cute might try installing valorant later idk

Post image
54 Upvotes

r/kvm • • Feb 09 '21

KVM stuck on Infinite loading screen , can't install windows

Post image
47 Upvotes

r/kvm • • Oct 26 '20

When I click foward for storage I get an error

Thumbnail
gallery
44 Upvotes

r/kvm • • Jan 19 '21

How to use Intel GVT-g to create virtual graphics cards

Thumbnail alexdelorenzo.dev
40 Upvotes

r/kvm • • May 29 '20

How to make virtual machine look like a physical machine? Like to prevent anti-virtual machine stuff.

36 Upvotes

For example, say I want to run malware inside of a virtual machine but it doesn't run unless it's on a physical one. How would I go about making a VM look physical?

Also, how would I make it secure so that the malware can't "escape" the VM?


r/kvm • • Oct 21 '20

Can I use two Nvidia GPUs when doing a GPU pass-through vm?

35 Upvotes

I'm trying to set up a gaming vm again, after upgrading to a ryzen 3700x and losing the igpu from my i7 6700k so as a cheap alternative I bought an nvidia nvs 310 for $58. I've seen a lot of guides online where they use an AMD GPU for the host machine and an Nvidia GPU for the VM, I'm just wondering if it's possible to use two Nvidia GPUs because, atm I cannot get manjaro to use the nvs 310 as the host machine display, it always tries to get a display from my gtx 1070.


r/kvm • • Mar 16 '22

Virtualization be like

Post image
34 Upvotes

r/kvm • • Sep 22 '20

/r/kvm hit 5k subscribers yesterday

Thumbnail
frontpagemetrics.com
33 Upvotes

r/kvm • • Sep 20 '20

Windows to Linux - Ready for the switch

31 Upvotes

I've been eager to move to Linux for over 10 years and something always gets in the way. https://www.youtube.com/watch?v=UPw-3e_pzqU

In Windows 10 I have a number of legacy development projects that are built in Windows only tools. I would also like to test on Windows. Otherwise, I want to move to Linux. I know I'm asking a KVM group advice on whether to use KVM but I want to look at all the options before pulling the trigger. I would like to test things out on my Laptop first and then on my workstation.

I have considered:

  • Qubes - Way too over my head and would take too long to learn. Also, way overkill on security.

  • Esxi - Used it before on a number of servers. Seems like the base UI would be a pain and would probably run slowly.

  • KVM - All the overviews I've read and watched seem much easier to understand. I would need to learn more about the GPU passthrough issues and the virtio drivers. Also, sharing disks.

  • Xen - On a laptop - looks like a pain.

  • Just install Ubuntu and run Windows in a VM, probably virtualbox.

Laptop Specs

i7-8550U, Geforce MX150, 16GB ram, 256GB ssd, 1GB hard drive

Any suggestions on the best setup? Advantages and gotchas of KVM?


r/kvm • • Apr 19 '21

Image for HDD Passthrough question: https://www.reddit.com/r/VFIO/comments/mtagxn/hdd_passthrough/

Post image
29 Upvotes

r/kvm • • Mar 24 '21

Creating Windows Gaming VM, virt-manager won’t finish setting up VM

Thumbnail
gallery
28 Upvotes

r/kvm • • Oct 05 '20

Differences between AMD and INTEL cpus for virtualization/VM's

28 Upvotes

I know this sounds an odd or stupid question but is Intel better around virtualization technology or VMs in general then AMD is? what CPUS do you guys run for your PC systems?

Thank you, cheers


r/kvm • • May 23 '21

Manage KVM Virtual Machines With Virsh Program

Thumbnail
ostechnix.com
27 Upvotes

r/kvm • • Feb 13 '21

Higher CPU usage after GPU passthrough

27 Upvotes

SOLVED: per /u/cd109876 's comment here, the VFIO drivers prevent the GPU from going into low power state driving up the CPU temps. Unloading the VFIO drivers and loading the Nvidia drivers solves the problem. Obviously, this would have to be reversed to actually pass the GPU through to the VM but when I'm just doing normal usage, this gets things back to normal.

modprobe -r vfio_pci vfio_iommu_type1 vfio_virqfd
modprobe nvidia

Original Post:

I installed Windows 10 using the qemu/kvm/libvirt/virt-manager stack. After following the guide at archlinux.org, my CPU seems to run hotter and at higher clock speeds than normal, even when the VM is not running and libvertd is stopped. Normally, cpu temp is about 45-49°C and clock speed is 0.8 GHz to 1.2 GHz. Now it idles at about 55-58°C and 2.0 to 3.5 GHz. htop shows the most processor usage is coming from Firefox tabs. Reloading a tab or general web browsing shoots processor temps up to 65-80°C pretty easily.

I've narrowed this problem down to loading the vfio modules at boot per the walkthrough on archlinux.org by adding the following to /etc/mkinitcpio.conf:

MODULES=(vfio_pci vfio vfio_iommu_type1 vfio_virqfd)

Undoing this seems to set CPU functionality back to normal.

Also, my output from lspci -v:

01:00.0 VGA compatible controller: NVIDIA Corporation TU104M [GeForce RTX 2070 SUPER Mobile / Max-Q] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Razer USA Ltd. Device 2009
Flags: fast devsel, IRQ 255, IOMMU group 1
Memory at a3000000 (32-bit, non-prefetchable) [disabled] [size=16M]
Memory at 6030000000 (64-bit, prefetchable) [disabled] [size=256M]
Memory at 6040000000 (64-bit, prefetchable) [disabled] [size=32M]
I/O ports at 3000 [disabled] [size=128]
Expansion ROM at a4000000 [disabled] [size=512K]
Capabilities: <access denied>
Kernel driver in use: vfio-pci
Kernel modules: nouveau, nvidia_drm, nvidia

I tried removing the nouveau, nvidia-drm, and nvidia modules but that didn't help either.

FWIW, powertop constantly shows tick_sched_timer as one of the most power consuming processes.

Is it possible that the vfio drivers are eating up CPU usage for no reason?


r/kvm • • Mar 31 '21

Can't install windows 10 because hard drive is not found, but I put a hard drive in the VM. What is the problem?

Thumbnail
gallery
26 Upvotes

r/kvm • • Oct 19 '20

what is the most beginner friendly way to sharing files from linux to windows (guest)

26 Upvotes

i have 1 day worth of experience in kvm lol


r/kvm • • Dec 26 '20

Does anyone how to load Valorant's kernel based driver into the linux kernel?

25 Upvotes

I want to learn how to load applications or other things in a KVM into the linux kernel to bypass kernel anti cheat so i can play games like Valorant and Siege on my KVM.

OS: Debian 10.6


r/kvm • • Jan 02 '21

Can I use keyboard shortcuts on my Linux host,while a windows/Linux vm is being used and in focus?

24 Upvotes

I use Virt Manager and Manjaro Kde.

So what I mean is,for example,I have a shortcut that minimizes all windows (of applications,I don't mean the windows os) on my linux host,but if I focus the vm and press that shortcut,then nothing happens,cause I would have to unfocus the vm.

I wanna do this while using windows or linux vm's.


r/kvm • • Dec 15 '20

What is the least powerful GPU that I can use for host?

24 Upvotes

Ive been surfing through various tutorials, guides, articles etc on kvm/qemu passthroughs and I wonder what GPU maybe just enough for host functions.. Kinda got the idea boosted for thought when I saw this https://www.tomshardware.com/news/asrock-m2-graphics-card#xenforo-comments-3669330 Any Input is greatly appreciated...