TranslateProject/sources/tech/20200825 6 open source virtualization technologies to know in 2020.md
DarkSun e08d579152 选题[tech]: 20200825 6 open source virtualization technologies to know in 2020
sources/tech/20200825 6 open source virtualization technologies to know in 2020.md
2020-08-26 05:02:04 +08:00

11 KiB

6 open source virtualization technologies to know in 2020

Run, customize, and manage your VMs with open source Virt Tools. Plus get a glossary of key virtualization terms. What is virtualization

Virtualization Tools, better known as Virt Tools, is a collection of six open source virtualization tools created by various contributors to make the virtualization world a better place.

Virt Tools website

(Bryant Son, CC BY-SA 4.0)

Some of the tools, like KVM and QEMU, might be familiar to Linux enthusiasts, but tools like libvirt and libguestfs are probably less so.

In case you prefer to learn through watching videos than reading, I created a video version of this article, which you can access on YouTube.

Before walking through the tools, it's a good idea to know some essential virtualization terminology. I derived many of these definitions from Wikipedia, with pages linked in the table.

Term Definition
Virtualization In computing, virtualization refers to the act of creating a virtual (rather than physical) version of something, including virtual computer hardware platforms, storage devices, and computer network resources.
Emulator An emulator is a hardware or software that enables one computer system (called the host) to behave like another computer system (called the guest).
Virtual machine (VM) Also known as a "guest machine," these are emulations of real, physical hardware computers.
Hosts In hardware virtualization, a computer on which a hypervisor runs one or more VMs.
Hypervisor This is computer software, firmware, or hardware that creates and runs a VMs.
Kernel This is a computer program at the core of a computer's operating system with complete control over everything in the system.
Daemon This is a computer program that runs as a background process, rather than under the direct control of an interactive user.

This table summarizes each Virt Tool, including license information and links to each tool's website and source code. Much of this information comes from the Virt Tools website and each tool's site.

Name What It Is License Source Code
Kernel-based Virtual Machine (KVM) A virtualization module in the Linux kernel that allows the kernel to function as a hypervisor GNU GPL or LGPL Source code
Quick Emulator (QEMU) A generic and open source machine emulator and virtualizer GPLv2 Source code
Libvirt A library and daemon providing a stable, open source API for managing virtualization hosts GNU Source code
Libguestfs A set of tools for accessing and modifying VM disk images LGPL, GPL Source code
Virt-manager A desktop user interface for managing VMs through libvirt GPLv2+ Source code
Libosinfo Provides a database of information about operating system releases to assist in optimally configuring hardware when deploying VMs LGPLv2+ Source code

Kernel-based Virtual Manager (KVM)

KVM website

(Bryant Son, CC BY-SA 4.0)

KVM is a full virtualization solution for Linux on hardware containing virtualization extensions. KVM provides the hardware virtualization for a wide variety of guest operating systems, including Linux, Windows, macOS, ReactOS, and Haiku. Using KVM, you can run multiple VMs on unmodified Linux or Windows images. Each VM has private virtualized hardware: a network card, disk, graphics adapter, etc.

Most of the time, you won't directly interact with KVM. Instead, you must use QEMU, virt-manager, or another virtualization management tool to leverage KVM.

You can find full documentation on the KVM website, as well as access its source code.

Quick Emulator (QEMU)

QEMU website

(Bryant Son, CC BY-SA 4.0)

QEMU is a generic, open source machine emulator and virtualizer. When used as an emulator, QEMU can run operating systems and programs made for one machine (e.g., an ARM board) on a different machine (e.g., your own x86_64 PC). When used as a virtualizer, QEMU achieves near-native performance by executing the guest code directly on the host CPU using KVM.

QEMU is supported on multiple operating systems, and its installation process is as easy as running a few simple commands; here, you can see how to install QEMU on macOS with Homebrew.

QEMU macOS installation info

(Bryant Son, CC BY-SA 4.0)

After installing, learn how to use it by reading through its documentation, and you can also access its source code.

Libvirt

Libvirt website

(Bryant Son, CC BY-SA 4.0)

Libvirt is a library and daemon that provides a stable open source API for managing virtualization hosts. It targets multiple hypervisors, including QEMU, KVM, LXC, Xen, OpenVZ, VMWare ESX, VirtualBox, and more.

Another interesting thing about libvirt is that KubeVirt, an open source project for creating and managing VMs inside the Kubernetes platform, largely utilizes Libvirt. (I'll cover KubeVirt in a future article.) Libvirt is an interesting project to explore, and you can find a plethora of information on its official website as well as download its source code.

Libguestfs

Libguestfs website

(Bryant Son, CC BY-SA 4.0)

Libguestfs is a set of tools for accessing and modifying VM disk images. You can use it for viewing and editing files inside guests; scripting changes to VMs; monitoring disk used/free statistics; creating guests, physical to virtual (P2V), or virtual to virtual (V2V) machines; performing backups; cloning VMs; building VMs; formatting disks; resizing disks; and much more. I have been using it recently while working on a KubeVirt-based project called OpenShift Virtualization, which you can learn more about in my video tutorial.

Libguestfs' official website contains extensive documentation on how to use each command, and you can also download its source code on GitHub.

Virt-manager

Virt-manager website

(Bryant Son, CC BY-SA 4.0)

Virt-manager is a desktop user interface for managing VMs through libvirt. It primarily targets KVM VMs but also manages Xen and LXC. It also includes the command line provisioning tool virt-install. Think of virt-manager as an easy-to-use management tool for your VMs. For example, you can use virt-manager to run a Microsoft Windows environment on a Linux workstation or vice versa.

Virt-manager's source code is available on GitHub and documentation is on its website. At this time, virt-manager is only available for Linux platforms.

Libosinfo

Libosinfo website

(Bryant Son, CC BY-SA 4.0)

Libosinfo provides a database of information about operating system releases to assist in configuring hardware when deploying VMs. It includes a C library for querying information in the database, which is also accessible from any language supported by GObject introspection. As you may guess, libosinfo is more of a building block to enable an operating system's functionality—but quite an important one.

Libosinfo's source code is available on GitLab, and its documentation can be found on at its website.

Conclusion

Virt-tools is a set of six powerful tools that make virtualization easier and enable important virtualization functions. All of them are open source projects, so I encourage you to explore further and maybe even contribute to them.

What do you think? Feel free to leave a comment to share your thoughts or ask questions.

Learn how Vagrant and Ansible can be used to provision virtual machines for web development.


via: https://opensource.com/article/20/8/virt-tools

作者:Bryant Son 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出