Centos openstack + cinder + ceph

If you are looking to run OpenStack with ceph as the backing storage for cinder, you will need the following.

  1. yum -y install openstack-cinder
  2. Follow the instructions atĀ http://ceph.com/docs/master/rbd/rbd-openstack/
  3. Create the firewall rules to allow compute nodes to connect to cinder-volumes
  4. You might run into the following error while attaching
    internal error unable to execute QEMU command '__com.redhat_drive_add': Device 'drive-virtio-disk1' could not be initialized
    This is because qemu in CentOS does not have rbd build in by default.
  5. To solve this problem, download qemukvm and qemu-img fromĀ http://ceph.com/packages/ceph-extras/rpm/.
  6. Install the packages, e.g.
    rpm --oldpackage -Uvh qemu-kvm- qemu-img-

Building CentOS images for OpenStack

Here’s an easy way to roll your own images for OpenStack. The build machine runs CentOS 6.

  1. Install EPEL repository if you haven’t already
  2. Install oz
    yum -y install oz
  3. Create a kickstart file. Download example.
  4. Create a tdl file. Download example.
  5. Run oz-install
    oz-install -p -u -d1 -a centos6.ks centos6.tdl
  6. Convert the image to qcow2
    qemu-img convert /var/lib/libvirt/images/centos6_x86_64.dsk -O qcow2 centos6.qcow2
  7. Import the newly create image into glance
    glance image-create --name centos6 --disk-format=qcow2 --container-format=ovf < centos6.qcow2</li>
  8. Boot it up to see whether it works!
    nova boot --flavor 1 --image centos6 --key_name sshkey centos6