Puppet module for libvirt management

Alessandro De Salvo



7,599 latest version

2.1 quality score

Version information

  • 0.1.5 (latest)
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Sep 4th 2015

Start using this module

Tags: libvirt, kvm


desalvo/libvirt — version 0.1.5 Sep 4th 2015


Puppet module for managing libvirt configurations.

Table of Contents

  1. Overview - What is the libvirt module?
  2. Usage


This module is used to install and configure libvirt.



  • virt_type: the virtualization type, currently only 'kvm' is supported
  • vnc_listen: set this to '' to enable public VNC access
  • vnc_password: set the VNC password
  • live_migration: set this to true to enable the live migration
  • qemu_user: user for qemu images
  • qemu_group: group for qemu images
  • rhev: Use the ovirt rhev binaries for KVM
  • sanlock: Set this to true if you want to use sanlock
  • sanlock_wd: Set this to false if you do not want to use the sanlock watchdoghdog
  • sanlock_host_id: Unique host id, must be set
  • sanlock_auto_disk_leases: The default sanlock configuration requires the management application to manually define < lease > elements in the guest configuration, typically one lease per disk. An alternative is to enable "auto disk lease" mode. In this usage, libvirt will automatically create a lockspace and lease for each fully qualified disk path. This works if you are able to ensure stable, unique disk paths across all hosts in a network
  • sanlock_require_lease_for_disks: Flag to determine whether we allow starting of guests which do not have any < lease > elements defined in their configuration. If 'sanlock_auto_disk_leases' is false, this setting defaults to true, otherwise it defaults to false
  • sanlock_disk_lease_dir: Custom sanlock lease dir, defaults to /var/lib/libvirt/sanlock
  • sanlock_user: Custom sanlock user, defaults to root
  • sanlock_group: Custom sanlock group, defaults to root

Configuring libvirt

class {'libvirt':
    virt_type    => 'kvm',
    vnc_listen   => "",
    vnc_password => "mysafepass",


Release Notes


  • Add sanlock support


  • Fix qemu-img package when RHEV is enabled


  • Support for oVirt RHEV binaries


  • Fix missing option to allow listening to incoming connection


  • New options for live migration and ownership of qemu images


  • Initial version