When you launch a KVM-based guest, most often you would see QEMU doing the major user space heavy-lifting by providing a PC-like environment—it handles guest memory management, network cards, emulated storage devices, and so forth. QEMU also has a robust Block Layer; not to mention its versatile, and widely-used, native disk image format, QCOW2.
PS: I am biased, as I work with QEMU on a daily basis :-)
The most complete guide is probably the Arch Linux one: https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM....
Also I recently discovered some very in-depth blog posts here: https://heiko-sieger.info/iommu-groups-what-you-need-to-cons...
Another whole website about this topic (no joke): https://passthroughpo.st/
You can write a system configuration, generate a QEMU VM and run it. Also all NixOS automatic tests[1] are running in QEMU VMs that are generated from a Nix configuration.
The most beautiful thing is that you can create multiple VMs and run them simultaneously to create a virtual network. For example you can test a client-server application by running the client and the server on two hosts or test some network configuration[2].
[1]: https://nixos.org/nixos/manual/index.html#sec-nixos-tests
[2]: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/nat...
There are a lot of rough edges to the desktop experience, but it generally works. And while that's faint praise, I have no current plans to switch back to Fedora (3 years) or Debian (12 years prior to that).
It's comforting to know that my entire base system configuration is declarative, and it's pleasant to not worry about libraries conflicting or unnecessary packages lingering around.
Immediate, ephemeral access to programs via, e.g., `nix-shell -p pdftk` is extremely convenient: they're only available in that shell session, and they (along with their dependencies) get cleaned up the next time you run `nix-collect-garbage`. Super handy.
edit: nevermind, I didn't realize it was a Linux distro.
I got sick of trying to figure out which thing I needed to click in virt-manager to get it to pass the flags I wanted, so I wrote my own minimal qemu-wrapper that covers all of the functionality from libvirt that I care about (vCPU pinning, binding to NUMA nodes, running as non-privileged user), and integrates better with the other system (systemd) monitoring than libvirt does. https://git.lukeshu.com/systemd-qemu/
----
I'm also involved with the Parabola GNU/Linux-libre distribution. Qemu user-mode emulation is essential to our support of non-x86 platforms (ARM and PPC). It lets us run cross-architecture chroots without a full-blown VM.
This has really freed me up because I'm no longer tied to a single machine. My home dirs are mounted volumes that are also backed up, so I can tear down and rebuild the environment with a single command (which means that my environments are also deterministic). I can connect to them from anywhere on the planet, using any machine as a client (even my phone or a tablet). My main laptop is now a weaksauce 1080p chromebook that acts as a glorified thin client and web browser.
Setting it up was somewhat difficult. When I did it there weren't many good guides for just exactly my situation, so I had to use many, many different resources to get it running. Based on some of the links others have posted here, there seems to be more out there on it now.
This was my last working startup script. I no longer recall why or even if any of these options were necessary or beneficial. At the time, it was just what worked. (Dual monitor, separate video cards for host and guest, L-CTRL+R-CTRL to pass mouse/keyboard control back and forth.) I haven't used this in quite a while, so I can't say if all of these options are still legit anymore.
#!/bin/bash
cp /usr/share/edk2-ovmf/OVMF_VARS.fd /tmp/my_vars.fd
qemu-system-x86_64 \
-enable-kvm \
-m 16G \
-cpu qemu64,hv_vendor_id=whatever,kvm=off,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,smep=off \
-smp cores=8,threads=1,sockets=1 \
-machine q35,type=pc -vga std -display gtk \
-drive if=pflash,format=raw,readonly,file=/usr/share/edk2-ovmf/OVMF_CODE.fd \
-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
-drive file=/dev/disk/by-id/ata-Samsung_SSD_860_EVO_250GB_XXXXXXXXXXXXXXX,format=raw,if=virtio \
-drive file=/dev/disk/by-id/ata-ST3000DM001-XXXXXXXXXXXXXXX,format=raw,if=virtio \
-boot order=d \
-object input-linux,id=kbd,evdev=/dev/input/by-id/usb-XXXXXXXXXXXXX_USB_Keyboard-event-kbd,grab_all=yes \
-object input-linux,id=mouse,evdev=/dev/input/by-id/usb-XXXXXXXXXXXXXXXX-event-mouse \
-device virtio-mouse-pci \
-device virtio-keyboard-pci \
-netdev user,id=user.0 -device e1000,netdev=user.0 \
&I did a similar thing with the Raspberry Pi a few years ago, but the QEMU support wasn't great back then which made debugging incredibly hard. I think the support has improved a lot since then, so I should probably give it another go.
[1] https://github.com/SgtCoDFish/bedrock-bootstrap - I'm writing the steps as a kind of tutorial to myself to aid learning, but fair warning that it's all a bit of a mess right now!
While years ago I would mainly use Virtual PC (I do miss its great GUI) and VMWare (and rarely bochs), qemu improved a lot and has (somewhat decent) support for so many more architectures. You can run Solaris for SPARC and Mac Os 9, for example.
I'm an avid follower of virtuallyfun.com and right now the latest post is about installing AIX on QEMU. If you look into the qemu category ( https://virtuallyfun.com/wordpress/category/qemu/ ) you'll find OS X Server, Unixware and more.
The author, neozeed, is very friendly and you can leave him comments or shoot him an email and he usually answers pretty in depth.
As for OS 9, I'm not sure it is as refined and functional as SheepShaver on Windows yet, but I'm on OS X, where SheepShaver takes more effort to set up. There's a modified QEMU for enhanced OS 9 compatibility (I think more G3 emulation?) here, and people managed to install 9.2: https://www.emaculation.com/forum/viewtopic.php?f=34&t=9028
Link?
Or do you mean a copy of the ISO? For that I'd try archive.org or winworldpc
(See https://taoofmac.com/space/blog/2019/04/21/2300 and https://github.com/insightfulsystems/alpine-python)
Will be trying ARM64 soon, as soon as I have a suitable development board.
QEMU has just the right mix of performance and hackability that I need for my "printf debugging" workflow :) (I've used Bochs a lot, too, which is more hackable, but far less performant.)
But support appears to be there as of a week ago, fyi.
What remote desktop app do you use?
What’s your latency like? What are the drawbacks to a setup like this?
Latency varies a lot and I’ve found hotel WiFi to sometimes be unusable. ATT LTE on the device generally works pretty well. I’m primarily running this setup just to have access to a full browser environment for my tinkering with web scraping so having a super responsive low latency connection isn’t as vital as it would be to do something like gaming. The main drawback is always needing a solid connection which is mostly solved with LTE where I go.
Also trying to setup gvt-g with dmabuf but corner cases still need fixes, e.g. video playback doesn’t work on overlay sprite of yuv encoding.
If you are using MS-DOS on QEMU there is a open source utility called DOSIDLE.EXE that keep the CPU usage low and stop the annoying CPU fan from spinning.