From a repository
Most GNU/Linux distributions have package repositories that carry precompiled binaries of QEMU. This is a much simpler installation process when compared to compiling it from source. It's often best to use these repositories when installing QEMU, as you can be confident that it will install and run without problems. This table outlines the minimum commands to perform in order to install QEMU from your repository.
If in the event that you can't install QEMU from a package repository, you can go to the QEMU website to download the latest source code and follow the instructions given.
If you're hesitant to work with the command-line, there's a GUI front-end called QEMU Manager. However, this program has been abandoned. Its last release (7.0) was in 2010, the creator's website has disappeared, and it doesn't appear to have its source available; this means that (should you use it) you would stick with the very old 0.11 version of QEMU it provides, causing conflicts with newer builds severely. And if you need an x86 virtualization tool that isn't out of date, has a graphical interface, and works as good as QEMU, then VirtualBox is recommended.
If you're comfortable with the command-line, there are two builders providing downloads of QEMU for use with the command line. One compiles QEMU with Cygwin, and they warn that you need to download MinGW packages as a result. The other is as recent as possible with his builds and doesn't require Cygwin. His builds are linked by the QEMU website.
Building from source
The most surefire way to get QEMU working is to build it from its source. To do so, make sure you have git (and if you're on Windows, get MinGW), and enter the following commands into a terminal/command-line environment:
git clone git://git.qemu-project.org/qemu.git
git submodule init
git submodule update --recursive
git submodule status --recursive
git checkout stable-2.9
After QEMU is installed, you may find platform-specific instructions in the documentation.
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).
- This is the git link provided by QEMU's download page.
- To prevent the problem that this solves.
- But don't put
2.9if it's no longer the current stable version. If the current is higher, change it accordingly.
- If you want to build QEMU only for a specific target (say, only for x86 which is 32-bit) instead of for all targets, use