
libvirt-clients, which is a collection of CLI utilities to interface with the Libvirt daemon. It also installs the following helper packages libvirt-daemon-system: The complete Libvirt distribution, i.e., the C libraries and the Libvirt daemon libvirtd. The following apt packages are essential for creating and managing virtual machines using Libvirt with QEMU-KVM in an Ubuntu system.
The Arch wiki page on Libvirt has much useful information, keep in mind that the packages and commands may not correspond well with other Linux distributions. It consists of a stable C API, a daemon, and command-line utilities to work with the Libvirt API.
#Qemu vs virtualbox software#
Libvirt is an open-source set of software and libraries which provide a single way to manage multiple different hypervisors, such as the QEMU, KVM, Xen, LXC, OpenVZ, VMWare ESXi, etc. In this way, QEMU-KVM works in tandem to bring the best of both worlds. As CPU and memory calls are the most critical system calls, using KVM to handle them makes the whole process a lot faster and smoother. The rest of the system calls, such as calls to IO devices and disk drives, are routed through the OS, in the usual type 2 fashion. QEMU can use KVM to translate the calls made to the CPU and the memory, thus turning that part of the virtualization process bare-bones or type 1.
The host CPU supports bare-bones virtualization extensions, such as AMD-V or Intel VT-x. The guest OS and the host OS has the same architecture. When considered separately as standalone software, QEMU is a type 2 hypervisor, and KVM is a type 1 hypervisor, just like we already discussed. Type 2 hypervisors, on the other hand, emulate any and all architectures regardless of the host CPU, at least in theory.
For example, it can only create VMs with x86 architecture if the machine has an x86 CPU.
Type 1 hypervisors can only emulate the same architecture as of the host CPU. In general, type 1 hypervisors are a lot faster than type 2 hypervisor.
Type 2 virtualization is also called emulation, to distinguish it from type 1 or true virtualization.
Type 2 hypervisor: These run on top of a host OS, and thus it translates system calls made by the guest OS to system calls made to the host OS. KVM, which is a Linux kernel module and part of the official Linux kernel. Type 1 hypervisor: These run on bare metal and typically leverage features of the CPU specifically built for virtualization, for example, AMD-V and Intel VT-x. Hypervisors can be generally categorized into two types. The hypervisor manages and provides resources to the guest OS, and it translates system calls of the guest OS to suitable system calls or hardware interrupts in the host system. The system on which the hypervisor runs virtual machines is called the host system, and the virtual machines themselves are called guest systems. Virtualization, i.e., creating and running virtual machines, is handled by something called a hypervisor, which can either be software, firmware or hardware. I intend it to serve as a reference, especially for beginners who are just getting started with virtualization and system administration in general. In this post, I will explore some core concepts and terminologies regarding virtualization in Linux systems.