Take a look at NeonView - a minimalist and lightweight image viewer created by TuxArena!

Easily Configure QEMU to Run Bootable ISO Images

Posted by Craciun Dan | 4/29/2009 01:33:00 AM | | 6 comments »

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

6 comments

  1. Anonymous // April 29, 2009 12:51 PM  

    I had troubles running Jaunty installer inside Qemu virtual machine.

    The edit boxes just don't get keyboard focus on clicking on them.

    Have you expirienced such troubles?

  2. Laurent // April 29, 2009 4:48 PM  

    Qemu is really a great tool to try Linux or BSD distributions, without having to reboot your PC.

    But the most notable feature of Qemu is its ability to emulate other architectures. So, you can run a Linux PPC distribution from your x86 computer. This can be really interesting for embedded or cross-platform software development.

  3. Jyrgen Hannus // May 01, 2009 10:34 AM  

    Why to prefer this to for example "Virtualbox".. ?

  4. Anonymous // July 02, 2009 2:29 AM  

    "Why to prefer this to for example "Virtualbox".. ?"

    Ummm... because VirtualBox requires admin rights? This doesn't.

  5. andy // October 24, 2009 9:03 AM  

    When booting arch in qemu, It gets to this stage and stops:
    trying to set up timer as virtual wire IRQ

    Also, in the terminal, i get this message:
    Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory

    What is the problem????

  6. Taimoor Mirza // March 02, 2010 9:15 AM  

    Install QEMU accelarator. It will solve your problem.

    -Taimoor

If you liked this article, please consider submitting it: