Hacker News new | ask | show | jobs
by gattilorenz 793 days ago
> Qemu is just an ordinary CLI program.

To be honest, the qemu command line became more and more arcane over the years due to the large number of supported features, and is not very stable across major versions.

For example, until a certain point you could start a VM and install DOS/Win9x with

  qemu-system-i386 -m 32 -hda harddisk.img -cdrom cd.iso -fda floppy.img -boot a
if you try to boot it like this now, it will complain that the hard disk has been guessed as "raw":

  WARNING: Image format was not specified for 'harddisk.img' and probing guessed raw.
           Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
           Specify the 'raw' format explicitly to remove the restrictions.

So the actual incantation to use is

  qemu-system-i386 -m 32 -drive format=raw,file=harddisk.img -cdrom cd.iso -fda floppy.img -boot a 
which is not as easy to remember, supports conflicting mnemonics (-cdrom and -hda vs -drive) and whatnot (for the added benefit of... what? I suppose the average qemu user can figure out that some stuff can be "dangerous". Why not print the warning and continue without bugging me?)... The network options are even more varied, and IIRC not even the official guide was up to date at some point.

I put up with qemu, but when possible I am happy to avoid it.

1 comments

Yeah, there are increasingly more situations where the simple mnemonics no longer work and you now need to use the more advanced uniform syntax for specifying devices. The same is true, IIRC, of specifying sound card hardware: in the past it used to be one argument to enable Soundblaster emulation outputting to the default sound output on the host, now I'm pretty sure it's split in two. The more "advanced" options totally make sense, but dropping or limiting the simpler options feels like a shame given how handy the qemu CLI can be.

That said, while they can be annoying, there haven't been an enormous amount of these changes, which is why I liken it to FFmpeg, I still use the FFmpeg CLI all the time even though the CLI syntax for more advanced filtering has changed over time.