Install KVM in Linux (source code installation)

Source: Internet
Author: User

1, first download KVM source code: http://www.linux-kvm.org/page/Downloads or http://sourceforge.net/projects/kvm/files/ to select the latest version


2, go to the KVM official website to view the installation Tutorial: http://www.linux-kvm.org/page/HOWTO1


3. Install the function dependency Library

On a Debian etch system you can install the prerequisites with :( Ubuntu system applicable command :)

 apt-get install gcc libsdl1.2-dev zlib1g-dev libasound2-dev linux-kernel-headers pkg-config libgnutls-dev libpci-dev

Note:When building from git, you also need gawk. (If you get the source code from git, gawk is required)


4. decompress, compile, and install

If you are using a recent kernel (2.6.25 +) with KVM modules embedded ded, boot into it, and :( if you are using a Linux kernel version later than 2.6.25, follow these steps)

Tar xzf qemu-kvm-release.tar.gzcd qemu-KVM-release. /configure -- prefix =/usr/local/kvmmakesudo make installsudo/sbin/modprobe KVM-Intel (for Intel graphics cards) # Or: sudo/sbin/modprobe KVM-AMD (for AMD graphics cards)

If you're using an older kernel, or a kernel from your distribution without the KVM modules, you'll have to compile the modules yourself :( if the Linux kernel is less than 2.6, so you need to compile it yourself)

Tar xjf kvm-kmod-release.tar.bz2cd KVM-kmod-release. /configuremake sudo make install sudo/sbin/modprobe KVM-Intel # Or: sudo/sbin/modprobe KVM-AMD some problems may occur here, when sudo/sbin/modprobe KVM-intel is executed, an error may occur. Check whether the execution is successful: lsmod | grep KVM. If two lines of information are displayed, the installation is correct, if only one row of KVM is 51032 0, it indicates that it is not successful. Solution: 1. Check whether your CPU supports virtualization. For different types of CPUs, go to the official website to check whether they are supported. If the CPU is not supported, the system will prompt KVM: no hardware support 2. If virtualization is supported, the CPU virtualization is disabled. The enabling method is in the BIOS settings to enter the BIOS, find the CPU parameter and enable CPU virtualization.
Dmesg | grep KVM output is similar to: [4790.548000] KVM: disabled by BIOS

It indicates that it is disabled.
 
3/If the above is not solved, it only indicates that you have problems with the early installation.

Note:If sound doesn't play in the guest VM you can add -- audio-DRV-list = "ALSA oss" to./configure as explained inhttp: // www.linux-kvm.com/content/sound-problem-solved


The above is the qemu management tool, which belongs to the operations on the Character interface. If you are not very interested in the character interface, you can also install a graphical management tool. See the following link.

Reference link: http://www.linuxidc.com/Linux/2012-12/76324.htm tested this method successfully installed !!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.