6.2.2. Using the runqemu Command

The basic runqemu command syntax is as follows:

     $ runqemu [option ]  [...]
            

Based on what you provide on the command line, runqemu does a good job of figuring out what you are trying to do. For example, by default, QEMU looks for the most recently built image according to the timestamp when it needs to look for an image. Minimally, through the use of options, you must provide either a machine name, a virtual machine image (*.vmdk), or a kernel image (*.bin).

Following is a description of runqemu options you can provide on the command line:

Tip

If you do provide some "illegal" option combination or perhaps you do not provide enough in the way of options, runqemu provides appropriate error messaging to help you correct the problem.

For further understanding regarding option use with runqemu, consider some examples.

This example starts QEMU with MACHINE set to "qemux86". Assuming a standard Build Directory, runqemu automatically finds the bzImage-qemux86.bin image file and the core-image-minimal-qemux86-20140707074611.rootfs.ext3 (assuming the current build created a core-image-minimal image).

Note

When more than one image with the same name exists, QEMU finds and uses the most recently built image according to the timestamp.

    $ runqemu qemux86
            

This example produces the exact same results as the previous example. This command, however, specifically provides the image and root filesystem type.

     $ runqemu qemux86 core-image-minimal ext3
            

This example specifies to boot an initial RAM disk image and to enable audio in QEMU. For this case, runqemu set the internal variable FSTYPE to "cpio.gz". Also, for audio to be enabled, an appropriate driver must be installed (see the previous description for the audio option for more information).

     $ runqemu qemux86 ramfs audio
            

This example does not provide enough information for QEMU to launch. While the command does provide a root filesystem type, it must also minimally provide a MACHINE, KERNEL, or VM option.

     $ runqemu ext3
            

This example specifies to boot a virtual machine image (.vmdk file). From the .vmdk, runqemu determines the QEMU architecture (MACHINE) to be "qemux86" and the root filesystem type to be "vmdk".

     $ runqemu /home/scott-lenovo/vm/core-image-minimal-qemux86.vmdk