Hacker News new | ask | show | jobs
by crc_ 245 days ago
I'm not well versed in qemu's various options. When I didn't specify a BIOS image, it seems to be using SeaBIOS, not UEFI, and hangs on "Booting from Hard Disk...". I should be able to start doing proper videos soon; I've been slowly working towards that.

I can say that the display & overall performance is noticeably faster on the two actual computers I tested on than under qemu on my Linux system.

3 comments

> I can say that the display & overall performance is noticeably faster on the two actual computers I tested on than under qemu on my Linux system.

You'd probably want to use `-enable-kvm` so it's not doing full software emulation. Assuming you're running this on another x86-64 machine.

Thanks; I'll start doing that when running on Linux. (I had missed this, as my main dev box is running OpenBSD which doesn't have kvm)
I'm surprised to see that tcg (TCG, the tiny code generator, the original QEMU) is still the default accel, even when KVM could be used instead.
you probably should set the serial port speed
Oh, I didn't realize -nographic was using a serial port. That's probably why it's slow!
It may default to 9600... tons of devices will fall back to that, given no other instruction
Yeah, that was my inference. It looked like about 9600.
Thanks!

It makes sense that it would default to using SeaBIOS; QEMU has a lot of options whose defaults were more reasonable 20 years ago.

This is a minor pet peeve of mine, actually. I would understand if qemu defaulted to BIOS booting, though I'd prefer that it try UEFI then fall back to BIOS/CSM at this point, but it's actively difficult to do UEFI on qemu; you have to actively feed it the ROM by path, and last I tried you had to include a -pflash for writable storage even if you weren't doing anything with it (thankfully this appears to have been fixed). I really wish they just let you do something like -boot-firmware=uefi,bios or such. (And again, in 2025 I really think UEFI should just be the default, with fallback to CSM/BIOS for backwards compat)
The countervailing force here is the desire for command line backwards compatibility. Every time you change a default to be something that makes more sense today, you break the existing working setups of some unknown number of people...

The approach the project has settled on is to say that providing user friendly defaults should be the job of a "management layer" piece of software like libvirt, and QEMU proper should concentrate on providing flexible and orthogonal options which that other software can use to tell it what to do.

Does qemu make an effort to preserve backwards compatibility with its cli? Because I have distinct memories of getting caught by them changing the way multiple parts of their command line work.

But in this case, my suggestions should be fairly backwards compatible; retaining the default of BIOS but adding a simple `--firmware uefi` option would change nothing for existing users, and even defaulting to `--firmware uefi,bios` should be mostly compatible since it just tries UEFI and then promptly falls back to BIOS.

Yeah, we do try to maintain at least some back compat. Some things go through a deprecate-and-drop cycle, but that is more often driven by "the old thing is a pain to maintain internally" than by "the new thing is more user friendly".

New top level command line options are rare these days, and magic "do what I mean" options also rare: we tend to prefer "tell us specifically what you want".

Thank you for explaining! I had had the impression that QEMU was pretty fanatical about backward compatibility.
Pretty sure they do, but I agree that adding `--firmware uefi` would be fine.
Maybe we should have new command names with defaults that are reasonable this decade, keeping qemu-system-i386 and the like for backwards compatibility?
Like apt vs apt-get? Yeah, I could potentially go for that. Although in the case of qemu I'm not entirely convinced that we need to go that far because I think it would only take small tweaks to make the existing tool friendlier.
Yeah, exactly.

I don't think you can make those small tweaks without breaking tens of thousands of users' production setups which depend on those defaults.