Growing Wiki

Libvirt

🌿 Budding

TODO Content

Libvirt is technically an open-source API, daemon (libvirtd), and management tool.

The main goal for Libvirt is to provide a single way to manage multiple different virtualisation hypervisors. ( For example, KVM/QEMU in my use case. )

My understanding is that it provides a universal/unified way of operating and using a VM. So it’s basically serving as an abstraction layer to make doing things easier. For example, instead of running long commands to execute actions like starting a VM, you simple rely on Libvirt to “start” the VM regardless of the underlying technology.

How does it relate to my plan?

The “Enterprise Perspective”, if you will.

Automation Compatibility

Modern tools like Terraform, Ansible and Vagrant does not interact with QEMU or KVM directly. This is where the Libvirt API comes in handy. Libvirt will be the interface that your code will use.

Virtualisation Unification

Libvirt doesn’t only work for KVM, it is compatible with many other virtualisation tools. This means that if I’m able to use virsh ( the CLI tool for Libvirt ), I will be able to transfer the skill set across different enterprise environment.

Security

For my use case ( learning VM using my local Arch machine ), Libvirt is managing most of the permissions for me. For instance, I would not require many elevated privileges or complex permissions required by QEMU ( if running directly ). This ensures that my VM run with the minimum necessary access to my host system ( Arch ), which in return makes it more “secure”.