Friday, December 26, 2014

Libvirt: In a Nutshell

Posted By: Saurabh Deochake - 9:40:00 PM

Share




In one of the previous posts, we discussed about lightweight virtualization solutions and more specifically, Linux Containers aka. LXC. Although, LXC has its own management tools that are shipped with the package, there are other APIs and virtual machine managers which can be used to manage various hypervisors and container systems. In this post, we discuss about Libvirt, a widely popular open source virtual machine management API.

What is Libvirt?

Libvrit is an open source API, daemon and virtual machine manager for managing platform virtualization. Libvirt can be used to manage various virtualization solutions like LXC, KVM, OpenVZ, Xen and VMware ESX. Libvirt is a C Library, but it offers bindings in other languages some of which are Python,Perl, Ruby and Java.  

Some of Hypervisors Supported by Libvirt

Supported Hypervisors

Libvirt Supports a multitude of hypervisors and virtualization solutions. Some of widely known hypervisors supported by Libvirt are:
  1. LXC- Linux Containers
  2. OpenVZ
  3. QEMU/KVM
  4. Xen Hypervisor
  5. VirtualBox
  6. VMware ESX and GSX Hypervisors
  7. Microsoft's Hyper-V Hypervisor
  8. IBM's PowerVM for AIX

Command Line Tools

Libvirt comes with a plethora of tools for management purposes. These tools range from virtual machine management to file system management, from memory management to provision of virtual machines over the network. Some of important command line tools that are used are:
  • virsh: An interactive shell and a virtual machine management tool which comes shipped with core distribution of Libvirt. It is one of the most important tool when it comes to managing various tasks on domains like virtual machines, containers or storage managed by Libvirt. 
  • virsh-top: Another interactive command line utility to keep track of CPU, memory, disk and network utilization of all the virtual machines running on a host machine. This utility is essentially similar to "top" command which provides an ongoing look at processor activity of host machine.
  • virt-what: A shell script essentially used for detecting if the program is running on the virtual machine.
  • virt-df: Another commond line utility which is similar in working with that of Linux file system command, "df". This utility offers the file system information of all virtual machine running on the host machine. This utility gives the information about how much disk space is used in each of guest disk.
  • virt-clone: This tool allows disk image(s) and configurations to be cloned from one virtual machine to another. This tool comes in handy especially while creating a new virtual machine from existing virtual machine keeping disk configurations intact. It automates copying of data across to new disk images, and updates the UUID, MAC address, and name in the configuration.

Get Libvirt

Libvirt is an open source software and released under the GNU Lesser General Public License (see the file COPYING.LIB in the distribution package for the precise wording). You can get Libvirt from the latest upstream tarballs from hereYou can also get it using git clone from git clone git://libvirt.org/libvirt.git.

About Linuxys

Linuxys is a private online Publication that complies the technology stuff going around in the world which is helpful for you. The main purpose of this site is to share tips, tricks and experience of new gadget, tools and software.

0 comments:

Post a Comment

Creative Commons License
This blog by Linuxys is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Copyright © 2015 Linuxys™ All rights reserved.

Designed by Templateism. Hosted on Blogger Platform.