From the course: Ansible: From Basics to Guru by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Managing KVM virtual machines

Managing KVM virtual machines

In this lesson, you will learn how to manage KVM virtual machines with Ansible. So before we start, let's have a look at the procedure. KVM virtual machines are deployed on top of the Linux internal KVM hypervisor. This KVM hypervisor is a part of the Linux kernel. The only requirement is that you have a CPU that supports hypervisor extensions. Then the KVM virtual machines themselves are managed by libvirt-d, and libvirt-d is a daemon that must be running on a managed host. The foundation of any KVM virtual machine is twofold. There's an XML configuration file that needs to be created in ETC libvirt-qemu, and there is a disk file in var lib libvirt images. When you create a virtual machine, a fresh installation can be done, or an existing disk file can be used as a template. And the following demo shows how to use existing disk files using the virt module. You should know a little bit about the background of this use case. In this use case, we are going to look at my lab machine…

Contents