Most GNU/Linux distributions have simple installation processes based on package repositories. It is often best to use the repository approach for installing QEMU, as you can be confident that it will just install and run. Here are some examples:
If you can't install QEMU from a package repository, go to the QEMU website and download the latest source code and follow the instructions given.
QEMU from source
The most surefire way to get QEMU working is to build QEMU from its source. To do so, enter the following commands in a command line environment:
git clone git://git.qemu-project.org/qemu.git(The git link here is provided by the QEMU download page)
git submodule init
git submodule update --recursive(Credit for steps 3,4 and 5)
git submodule status --recursive
git checkout stable-2.6(As of writing this, the stable branch version is 2.6. Change 2.6 to the number of current stable version when you are applying these steps)
../configure(If you want to build QEMU only for a specific target (say, only for 32-bit x86) instead of for all targets, use
NOTE: All these steps should work seamlessly on all platforms, except for the step 9 on Windows. To get step 9 working on Windows, you need MinGW or a similar solution. That is, to get this working on Windows, you need MinGW (or a similar solution).
You may find platform specific instructions on compiling QEMU from source here.
QEMU by itself isn't very fast, as it does a lot of emulation even when running on the hardware compatible with the guest operating system. To make it perform better, QEMU has a kernel module called KVM that allows much of the guest OS's code to run directly on the host processor when running on x86 or x86-64 processors with virtualisation extensions under GNU/Linux. For example, if the host is x86 GNU/Linux and the guest is Windows XP, then KVM can run most of the Windows XP code directly on the processor without emulation.
QEMU-KVM requires a GNU/Linux or BSD Unix host, and a CPU with virtualisation extensions -- either Intel VT or AMD-V. To determine whether your CPU has this support on GNU/Linux, run the following command from a shell:
egrep '(vmx|svm)' /proc/cpuinfo
If you get nothing back, your CPU does not support the required virtualisation extensions.
Many modern GNU/Linux distros have simple installation processes based on package repositories. It is often best to use the repository approach for installing QEMU-KVM, as you can be confident that QEMU-KVM will just install and run. Here are some common GNU/Linux distros and their QEMU-KVM install commands:
|Fedora ||yum install @virtualization or
More details are available on the KVM website. If you can't install QEMU-KVM from a package repository, go to the QEMU-KVM website and download the latest source code and follow the instructions given.
- Also valid for other RPM-based distributions (e.g. RedHat, CentOS).
- Also valid for other dpkg-based distributions (e.g. Ubuntu, Mepis, Mint).