Build+manage VMs to support small ceph clusters for dev/test with your system images on libvirt/KVM hosts
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Ceph Libvirt Clusterer

Build a dev/test cluster of not-yet-Ceph nodes on a hypervisor running libvirt and KVM.

If you are planning on writing Ceph code or writing applications that use Ceph, you're going to want a small cluster for development and testing. If you're running Linux with libvirt and KVM, this tool can help you provision such a cluster.

This tool only handles virtual machine creation. Once the virtual machines are built, you can use ceph-deploy, puppet, chef, or ansible to do the Ceph configuration.



On Ubuntu/Debian machines:

sudo apt-get install python-libvirt python-virtualenv

On RHEL/CentOS machines:

# (coming soon... installing a RHEL system to test...)

On openSUSE machines:

sudo zypper install libvirt-python python-virtualenv

Clone the code and install:

git clone
cd ceph-libvirt-clusterer
virtualenv --system-site-packages venv
. venv/bin/activate
python develop


Before you use cephlvc, you need a machine image that the rest of your cluster will be built with. I built this tool to test openSUSE's Ceph Enterprise Storage, so I have a virtual machine named opensuse-ceph-template with the following attributes:

  • ceph user is created
  • ceph user has a SSH key
  • ceph user's public key is in the ceph user's authorized_keys file
  • ceph user is configured for passwordless sudo
  • emacs is installed (not strictly necessary :-) )

Right now there's an API. A command line interface is planned.

import cephlvc
import libvirt

cluster = cephlvc.Cluster(name='cephdemo',

for x in range(0, 4):
    cluster.add_domain(data_volume_count=3, data_volume_size=8192)


# at this point you're going to want to know the IP addresses of the machines:
# work, work, work, work, work

That code will create 4 machines:

  • cephdemo-00
  • cephdemo-01
  • cephdemo-02
  • cephdemo-03

And each machine will have three data volumes of 8GB.