Libvirt Host Setup

Libvirt Configuration

The following steps are required to configure Libvirt to work with the automation code

Install and Configure Libvirt

Please follow the steps given at Install and Enable section

Enable IP Forwarding

Please follow the steps given at IP forwarding section

Accept TCP connections

Please follow the steps given at Accept TCP connections section

Allow Firewall for libvirt connections

Please follow the steps given at Firewalld section

Password less access

Follow below steps to add the public key of the Terraform client machine user to the authorized list for password-less access. 1. Copy ~/.ssh/id_rsa.pub contents from Terraform client machine. 2. Append the public key as copied above to ~/.ssh/authorized_keys on the KVM host.

Verification

You can verify TCP connections to the kvm host using an example virsh command given below.

virsh --connect qemu+tcp://<host_name_or_ip>/system --readonly