Easily Configure QEMU to Run Bootable ISO Images

    QEMU is a powerful, open-source machine emulator which allows you to run virtually any operating system inside your currently running distribution. In this brief tutorial I'll show how to run distributions for which the ISO is available, directly from within Debian or Ubuntu.

    Ubuntu Jaunty Jackalope running in QEMU

    First, install the package qemu:

    apt-get install qemu

    Next, we will need to create a QEMU image, so use the following command (and adjust parameters if needed to):

    qemu-img create -f qcow qemu_disk.img 3G

    The qcow (QEMU Copy-on-Write) specifies the disk image type, while the 3G parameter specifies the amount of memory that can be used (3 GB in this case).

    Given that we have an ISO distro image, in order to start it in QEMU use, for example:

    qemu -cdrom distribution_image.iso -hda qemu_disk.img -m 256 -boot d

    -cdrom distribution_image.iso chooses the ISO image which should be loaded
    -m 256 switch sets the virtual RAM size to 256 MB, default being 128
    -boot d specifies to boot on CD-ROM, default being c, hard-disk

    Below is a screenshot showing Ubuntu 9.04 Jaunty Jackalope running in QEMU on Debian Lenny, after giving the command (one line):

    qemu -cdrom ubuntu-9.04-desktop-i386.iso -hda qemu_disk.img -m 256 -boot d

    Booting up Ubuntu 9.04 Jaunty Jackalope from the Desktop CD
    Source URL: http://ashesgarrett.blogspot.com/2009/04/easily-configure-qemu-to-run-bootable.html
    Visit ashes garrett for Daily Updated Hairstyles Collection

Blog Archive