Introduction
In my last post, I discussed how I wrote a Perl script that uses a YAML file to build a list of virtual machines on the Xen hypervisor. When the script was nearly complete, it occurred to me: why not modify this script for use with libvirt/KVM? I mainly use KVM instead of Xen because of its better support for Enterprise Linux. Often, when I need to spin up a set of virtual machines for testing, I use dmacvicar/libvirt provider for Terraform. Usually this works pretty well; however, sometimes I get annoyed at having to learn the HCL language and just want to define a list of VMs with my specs. That is where I can see this script being of use, at least for myself. Of course, my intention was not to replace Terraform, even for myself. Mainly, this was a fun project that exercised my Perl skills and taught me stuff about Linux networking, libvirt, and more.