In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the concept and implementation principle of Libvirt to you. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
A brief introduction to Libvirt
Libvirt is an open source software tool developed by Redhat. The goal is to provide a general and stable software library to manage virtual machines on a node efficiently and securely, and to support remote operations. It consists of the following modules:
A library file that implements the management interface
A daemon (libvirtd)
A command line tool (virsh)
Libvirt is developed in C for portability and high reliability, but it also provides bindings to other programming languages, including Python,Perl,Ocaml,Ruby,Java and PHP. Therefore, the call of Libvirt can be integrated into various programming languages to adapt to different environments. Libvirt supports a variety of virtual machines as follows:
Name annotation LXC lightweight Linux container OpenVZ based on Linux kernel lightweight Linux container KVM/QEMU based on Linux type 2 VMMXen open source type 1 VMMUser-mode Linux (UML) system call level Linux virtual machine VirtualBoxOracle developed type 2 VMMVmware ESX and GSXVmware virtualized server version Vmware Workstation and PlayerVmware virtualized desktop version Hyper-V VMMPowerVMIBM developed VMMParallels WorkstationParallels for VMMBhyveFreeBSD 9 + developed by Mac structure of VM II and Libvirt
Libvirt shields the implementation of different virtualization and provides a unified management interface. The hierarchy of Libvirt is as follows:
A driver-based architecture is adopted to support a variety of VMM,Libvirt, as shown in the following figure.
Third, the realization of Libvirt
The main objects defined in the Libvirt code are shown in the following figure.
VirConnectPtr: represents a connection established by a particular VMM. Every Libvirt-based application should first provide a URI to specify a local or remote VMM to get a VirConnectPtr connection. For example, xen+ssh://host-virt/ represents a ssh connection to a Xen VMM running on a host-virt machine. After getting the virConnectPtr connection, the application can manage the virtual machine of the VMM and the corresponding virtualization resources, such as storage and network.
VirDomainPtr: represents a virtual machine, either activated or just defined.
VirNetworkPtr: represents a network
VirStorageVolPtr: represents a storage volume, usually used by a virtual machine as a block device.
VirStoragePoolPtr: represents a storage pool that is used to allocate and manage logical areas of storage volumes.
1. Communication between computers'
During initialization, all drivers are enumerated and registered. Each driver loads a specific function that is called by Libvirt API. As shown in the following figure, Application calls PublicAPI through URI, and then PublicAPI invokes the real Driver implementation using the API interface provided by Driver.
2. Communication between remote hosts
The goal of Libvirt is to support remote management, so access to Libvirt drivers is handled by the Libvirt daemon libvirtd, and libvirtd is deployed on the node running the virtual machine and managed by the peer remote Driver through RPC, as shown in the following figure.
In remote administration mode, virConnectionPtr actually connects the local remote Driver and the remote specific Driver. All calls first go to the libvirtd,libvirtd in the cloud through remote Driver to access the corresponding Driver.
On the concept of Libvirt and what is the principle of sharing here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.