File Daemon Configuration

On the KVM host server, the Plugin Directory option of the File Daemon resource in /opt/bacula/etc/bacula-fd.conf has to point to where the kvm-fd.so plugin is installed. The standard directory for Bacula plugins is /opt/bacula/plugins

FileDaemon {
   Name = bacula-fd
   Plugin Directory = /opt/bacula/plugins
   ...
}

The libvirtd daemon should be started and accessible. The KVM host server’s File Daemon should have local, network-mounted, or SAN access to where KVM images are stored. On the KVM host server, the following command should list all local VMs:

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 1     gentoo                         running
 2     centos                         paused
 -     debian                         shut off

If specification of a URI using the virsh -c parameter is required, the corresponding uri= parameter will also be needed in the plugin command.

# virsh -c qemu:///system list --all
 Id    Name                           State
----------------------------------------------------
 1     gentoo                         running
 2     centos                         paused
 -     debian                         shut off

The install-kvm.sh script is designed to test the KVM setup of the hypervisor. The script should report an “OK” at the end. If not, any problems reported need to be corrected, and the resulting output should be sent to the Bacula Systems support team if you need assistance.

# /opt/bacula/scripts/install-kvm.sh check
Enter the :term:`libvirt` URI to connect libvirtd [qemu:///system]:

Trying to list VMs using virsh -r -c 'qemu:///system' list --all, it should not ask for a password.
Id    Name                           State
----------------------------------------------------
 1     gentoo                         running
 2     centos                         paused
 -     debian                         shut off

Did you have to enter a password to get the VM list? [y/N]: N

Enter the name of a guest that will be used to test the :term:`KVM` plugin requirements:
gentoo

Trying to mount gentoo filesystem as /tmp/bee-kvm-gentoo.2vsYz
Mount OK.
Attempting to list 10 files from gentoo root filesystem.
/tmp/bee-kvm-gentoo.2vsYz/
/tmp/bee-kvm-gentoo.2vsYz/bin
/tmp/bee-kvm-gentoo.2vsYz/bin/bb
/tmp/bee-kvm-gentoo.2vsYz/bin/dd
/tmp/bee-kvm-gentoo.2vsYz/bin/cp
/tmp/bee-kvm-gentoo.2vsYz/bin/df
/tmp/bee-kvm-gentoo.2vsYz/bin/du
/tmp/bee-kvm-gentoo.2vsYz/bin/ip
/tmp/bee-kvm-gentoo.2vsYz/bin/ln
/tmp/bee-kvm-gentoo.2vsYz/bin/ls

Unmounting gentoo filesystem.
OK: All tests are good.

Go back to the main KVM Configuration page.

Go back to the main KVM Plugin page.