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
You might need or prefer to install QEMU by compiling the source code, which is available on the QEMU website. The QEMU Emulator User Documentation has basic instructions on how to compile the source code on Linux and Microsoft Windows.
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 Linux. For example, if the host is x86 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 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 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 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 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).