In order to boot all OpenStack instances into Ceph, that is, for the boot-from-volume feature, we should configure an ephemeral backend for nova. To do this, edit /etc/nova/nova.conf
on the OpenStack node and perform the following changes.
This recipe deals with configuring Nova to store entire virtual machines on the Ceph RBD:
[libvirt]
section and add the following:inject_partition=-2 images_type=rbd images_rbd_pool=vms images_rbd_ceph_conf=/etc/ceph/ceph.conf
# cat /etc/nova/nova.conf|egrep "rbd|partition" | grep -v "#"
# service openstack-nova-compute restart
cirros
image that we downloaded earlier in this chapter and convert this image from the QCOW to RAW format (this is important). You can also use any other image, as long as it's in the RAW format:# qemu-img convert -f qcow2 -O raw cirros-0.3.1-x86_64-disk.img cirros-0.3.1-x86_64-disk.raw
# glance image-create --name cirros_raw_image --is-public=true --disk-format=raw --container-format=bare < cirros-0.3.1-x86_64-disk.raw
# nova image-list # cinder create --image-id ff8d9729-5505-4d2a-94ad-7154c6085c97 --display-name cirros-ceph-boot-volume 1
true
:# cinder list
# nova boot --flavor 1 --block_device_mapping vda=fd56314b-e19b-4129-af77-e6adf229c536::0 --image 964bd077-7b43-46eb-8fe1-cd979a3370df vm2_on_ceph --block_device_mapping vda = <cinder bootable volume id > --image = <Glance image associated with the bootable volume>
# nova list
18.116.50.87