Live data from Hacker News

QEMU 10.1.0

wiki.qemu.org

41–50 of 61 posts

Re: QEMU 10.1.0

#41

Curious: how do people use Qemu the most these days? Dev environment? Running specific apps on a different OS? I don't know... gaming?

For Zig we use QEMU to run our module test suites on a broad range of targets that we don't necessarily have real hardware for: https://github.com/ziglang/zig/blob/50edad37ba745502174e49af...

Re: QEMU 10.1.0

#42

I'm curious if QEMU will ever support features like x86(_64) hardware paths that with Arm and RISC-V... Since most of the patents are now expired, it makes a lot of sense. Apple seems to be further along here than other competitors, but it seems to be limited to Rosetta, not broadly supported.

If the kernel makes it available to userspace, then it could be done. I am not aware of any specific emulation-friendly extensions to RISC-V though.

Re: QEMU 10.1.0

#43
post #3

QEMU is truly excellent software, from the perspective of a person who very rarely needs to emulate another architecture. It "just works" and has wonderful integrations with basically everything I could want.. sometimes it feels like magic: even if the commandline UX is a bit weird in places. I've always wondered though how it works with KVM: I know KVM is a virtualisation accelerator that enables passing through nat…

> I've always wondered though how it works with KVM Other people have given some more comprehensive explanations, but I'll try to put it as simply as possible. Plain QEMU has a CPU emulation layer called TCG. The machine basically consists of memory (RAM and MMIO devices) and CPUs (CPU registers and state). When QEMU has set up the machine and is ready to run, it calls TCG to say "given this memory and this initial C…

The only comment that directly answers the original doubt about how QEMU can use and work with KVM. Hats off.

Re: QEMU 10.1.0

#44
post #5
post #3

QEMU is truly excellent software, from the perspective of a person who very rarely needs to emulate another architecture. It "just works" and has wonderful integrations with basically everything I could want.. sometimes it feels like magic: even if the commandline UX is a bit weird in places. I've always wondered though how it works with KVM: I know KVM is a virtualisation accelerator that enables passing through nat…

Not everything uses qemu. Some do. More use KVM. Not everything does. Example: https://firecracker-microvm.github.io/

I've found QEMUs microvm to be faster at boot while having nicer tooling and a cleaner upgrade path if needing more features. Aside from hype I'm actually not sure why anyone would still use firecracker.

Re: QEMU 10.1.0

#45
post #14
post #3

QEMU is truly excellent software, from the perspective of a person who very rarely needs to emulate another architecture. It "just works" and has wonderful integrations with basically everything I could want.. sometimes it feels like magic: even if the commandline UX is a bit weird in places. I've always wondered though how it works with KVM: I know KVM is a virtualisation accelerator that enables passing through nat…

Xen is still used massively too.

AWS runs Xen guests through a KVM-based compatibility layer. You can try it with QEMU too.

Re: QEMU 10.1.0

#46

Curious: how do people use Qemu the most these days? Dev environment? Running specific apps on a different OS? I don't know... gaming?

Mine is a rather prosaic example, but I'm sure it's not uncommon: Proxmox on leased bare metal servers make for wonderful (small scale, but impressively equipped at ~$100/mo) cheap dev hosting.

If you find yourself limited by the equivalent VPS expense, I discovered that for my use-case (mixed web hosting, dev services, self-hosting) I could squeeze a lot more out of an entry level bare-metal box with ~48GB of RAM, and everything just becomes a VM in Proxmox, and it's still trivially simple to scale/replicate, maintain backups, and tie together with other VPS or cloud services.

The only part that was a bit of a challenge is negotiating NAT for the virtual NICs so you don't need separate IPv4 addresses for each guest. But Proxmox's docs are pretty robust, and I'm sure there are dozens of tuts available now.

Re: QEMU 10.1.0

#47

Curious: how do people use Qemu the most these days? Dev environment? Running specific apps on a different OS? I don't know... gaming?

I'd suspect a great deal of people are secretly benefiting from qemu when they do $(docker build --platform linux/{arm64,amd64}) courtesy of binfmt_misc and a static copy of qemu

- https://github.com/moby/buildkit/blob/v0.23.2/docs/multi-pla...

- https://github.com/moby/buildkit/blob/v0.23.2/Dockerfile#L16...

- https://github.com/tonistiigi/binfmt/blob/buildkit/v9.2.2-54...

- https://github.com/tonistiigi/binfmt/blob/buildkit/v9.2.2-54... and https://github.com/tonistiigi/binfmt/blob/buildkit/v9.2.2-54...

and let me tell you from first-hand experience, that trying to swap in an updated version of the bundled qemu binary when the static version panics on some mis-emulated instruction is some whooooooo, boy

Re: QEMU 10.1.0

#48
post #47

Curious: how do people use Qemu the most these days? Dev environment? Running specific apps on a different OS? I don't know... gaming?

I'd suspect a great deal of people are secretly benefiting from qemu when they do $(docker build --platform linux/{arm64,amd64}) courtesy of binfmt_misc and a static copy of qemu - https://github.com/moby/buildkit/blob/v0.23.2/docs/multi-pla... - https://github.com/moby/buildkit/blob/v0.23.2/Dockerfile#L16... - https://github.com/tonistiigi/binfmt/blob/buildkit/v9.2.2-54... - https://github.com/tonistiigi/binfmt/blob…

Then again, everything in buildkit is designed for maximum opacity, in my experience so I guess it tracks

Re: QEMU 10.1.0

#49
post #42

I'm curious if QEMU will ever support features like x86(_64) hardware paths that with Arm and RISC-V... Since most of the patents are now expired, it makes a lot of sense. Apple seems to be further along here than other competitors, but it seems to be limited to Rosetta, not broadly supported.

If the kernel makes it available to userspace, then it could be done. I am not aware of any specific emulation-friendly extensions to RISC-V though.

Me either, but I'm assuming they'll start to become more common. Possibly the inverse as well, ARM cores on x86 even.

Re: QEMU 10.1.0

#50
post #19
post #3

QEMU is truly excellent software, from the perspective of a person who very rarely needs to emulate another architecture. It "just works" and has wonderful integrations with basically everything I could want.. sometimes it feels like magic: even if the commandline UX is a bit weird in places. I've always wondered though how it works with KVM: I know KVM is a virtualisation accelerator that enables passing through nat…

If you use it rarely, I can high recommend the excellent QuickEMU [0] Any VM is just a `quickget ubuntu 24.04` and `quickemu --vm ubuntu-24.04.conf` away. The conf file is just a yaml that is very readable and can give you more cores/ram/disk easily. Just run `quickget` to get a list of OS's to download. [0] https://github.com/quickemu-project/quickemu

Doesn't the 'q' in 'qemu' stand for "Quick" ?
Post reply on HN