Linux under Compile and install QEMU and Libvirt

Source: Internet
Author: User

Directory [Hide]

    • 1 Installing QEMU
      • 1.1 Qemu Introduction
      • 1.2 Downloading source files
      • 1.3 Compiling the installation
    • 2 Installing Libvirt
      • 2.1 Libvirt Introduction
      • 2.2 Downloads Libvirt
      • 2.3 Compiling the installation
    • 3 references

KVM Virtual Machines (English: kernel-based virtual machine) is a virtualized infrastructure for use in the Linux kernel. KVM currently supports native virtual technologies for Intel VT and AMD-V. KVM was introduced into the Linux 2.6.20 core in February 2007. It has also been introduced into FreeBSD. In Mac OS X, KVM is also visible.

Since KVM is integrated into Linux, it's not necessary to install KVM.

Installing QEMUabout QEMU

QEMU is an open-source emulator for a complete PC system. In addition to the emulation processor, QEMU allows you to simulate all necessary subsystems, such as networking hardware and video hardware. It also allows for advanced conceptual simulations such as symmetric multi-processing systems (up to 255 CPUs) and other processor architectures such as ARM and PowerPC.

Download the source file

Install QEMU's latest version of QEMU's git address from git:

1 http://git.qemu-project.org/qemu.git

Use the following command to download the QEMU code locally, and later to compile and modify it yourself, and then publish your new QEMU.

1 git clone git://git.qemu.org/qemu.git
Compiling the installation

After the download is complete, compile the installation.

01020304050607080910111213 ### 如果你是从压缩包下载来的,先解压缩cd/tmptar zxvf qemu-x.y.z.tar.gzcd qemu-x.y.z### Then you configure QEMU and build it (usually no options are needed): ###git下载及源码包下载都一样了./configure make### Then type as root user: makeinstall### to install QEMU in /usr/local.

You may be having problems with ./courfigure

Note: Many of the software may not be installed at the time of installation and need to be installed in advance, but you will be asked what is missing.

12345 yum installgccyum install zlib-devel.x86_64yum install glib2-devel.x86_64yum installpixman-devel.x86_64git submodule update --init dtc   ###会提示缺某个模块,在当前的git目录下运行
Installing LibvirtLibvirt Introduction

Libvirt is currently the most widely used tool and application interface (API) for managing KVM virtual machines, and some common virtual machine management tools such as Virsh, Virt-install, Virt-manager, etc.) and cloud computing framework platforms (such as OpenStack, Opennebula, eucalyptus, etc.) use Libvirt application interfaces at the bottom.

Download Libvirt

The location of the GIT project Http://libvirt.org/git/?p=libvirt.git

Create a new folder to store git files

1 git clone git://libvirt.org/libvirt.git
Compiling the installation

This section is a reference to the http://libvirt.org/compiling.html article

1234 ###个人不推荐这个方法,见下面$ ./autogen.sh --prefix=$HOME/usr$ make$ sudomakeinstall

By default, configuration and post-compilation directories may be inconsistent with the default directory provided by the Linux operating system release, for example: LIBVIRTD, Virsh and other executable programs installed in RHEL 6.3 with system RPM packages are installed in the/usr/sbin/directory. Libvirt.so, libvirt-qemu.so and other shared library files are installed in the/usr/lib64/directory, and from the previous steps to know that they compile the installation, the default will be LIBVIRTD, Virsh, etc. installed in the/usr/local/sbin directory, libvirt.so, libvirt-qemu.so, etc. are installed in the/usr/local/lib/directory. If you want to maintain consistency in the directory where executable programs and shared libraries are installed in the operating system hairstyle version, the autogen.sh script provides the "–system" parameter, configured with this parameter, to ensure that the installation directory is consistent with the native system as much as possible, with command-line operations as follows.

12345 ###个人推荐这个方法##保持对操作系统发型版中安装可执行程序和共享库的目录的一致性$ ./autogen.sh --system### 或者 ./configure --prefix=/usr --localstatedir=/var  --sysconfdir=/etc$ make$ sudomakeinstall

Installing Libvirt may also be missing some software, such as

1234 yum install libtool.x86_64autopint : yum install gettext-devel.x86_64python-config : yum install python-devel.x86_64pciaccess : yum install libpciaccess.devel.x86_64

Check for installed Libvirt

12345 # which libvirtd/usr/sbin/libvirtd# which virsh/usr/bin/virsh
References
    • Qemu compiled from source qemu–compilation from the sources
    • Laugh all Over the World –libvirt compilation, installation
    • Anatomy of a Ibm–libvirt virtual library

original articles, reproduced please specify: reprinted from East Dongdong Chen Yudong Blog

This article link address: Linux under Compile and install QEMU and libvirt–https://www.chenyudong.com/archives/install-qemu-libvirt-in-fedora-linux.html

Linux under Compile and install QEMU and Libvirt

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.