Testing With QEMU

From RockWiki

Jump to: navigation, search

Testing bootable floppies and CD/DVD ISO images with qemu is really easy.

Contents

Setup Virtual Hard Disks

If you want to use virtual hard disks in QEMU, create them with e.g.:

qemu-img create qemu-hda.img <size>

Where <size> can be given in Kilo-(<size>K), Mega-(<size>M) or Giga-Bytes(<size>G).

Booting ISO Images

To boot an ISO image with e.g. one available hard disk, type:

qemu -cdrom ROCK-CD.iso -hda qemu-hda.img -boot d

Booting Floppy Images

To boot floppy images use:

qemu -cdrom ROCK-CD.iso -hda qemu-hda.img -floppy floppy.img -boot a

To "change" floppies, overwrite floppy.img with the image of the next floppy.

Booting Cross-Builds

QEMU can emulate many more architectures than x86, use qemu-<arch> or qemu-system-<arch> instead of qemu.

Support is incomplete for some architectures in QEMU, read https://fabrice.bellard.free.fr/qemu/ for details.

Personal tools