How to use QEMU

    QEMU is a generic and open source processor emulator which achieves a good emulation speed by using dynamic translation.

    QEMU has two operating modes:

    • Full system emulation. In this mode, QEMU emulates a full system (for example a PC), including a processor and various peripherials. It can be used to launch different Operating Systems without rebooting the PC or to debug system code.

    Download

    QEMU is available on Fedora repository. It can be installed by using :

    In the following examples where “qemu” is, substitute your command for executing qemu. E.g.

    or

    Of course, this does not apply to “qemu-img”.

    QEMU virtual machine installation

    Create the virtual image for the system:

    Of course you are not obliged to take 5GB.

    Now let’s install the OS. Put in the install CD and type into your konsole (all in one line without break):

    “-user -net” is important to have internet access within your new system. “-m 196” is the Set virtual RAM size (megabytes), default is 128 MB, I chose 196.

    The install may take some time. After the install, qemu will try to boot the new OS itself. Maybe this may fail (was the case for me) - but don’t worry. If that happens: just close the qemu window and type the following command into your konsole to launch your new OS:

    Type, in the proper directory

      Debugging

      To get kernel output dumped to a file outside the virtual system, add e.g. “-serial file:/tmp/qemu-output.log” to the qemu command line. When booting the virtual system, add “console=ttyS0” to the kernel boot parameters.