Configure OpenStack Nova to store virtual machine disks in Ceph block storage.
Before you begin, make sure that you have the following prerequisites in place:
About this task
Nova uses the libvirt driver to manage virtual machine disks. When configured to use Ceph, Nova stores instance disks as Ceph Block Devices (RBDs), which improves scalability and enables features such as live migration.
-
Edit the Ceph configuration file on the Nova compute nodes.
For example, to open the configuration file on the Nova compute nodes:
vi /etc/ceph/ceph.conf
-
Add the required client configuration settings.
[client]
rbd cache = true
rbd cache writethrough until flush = true
rbd concurrent management ops = 20
admin socket = /var/run/ceph/guests/$cluster-$type.$id.$pid.$cctid.asok
log file = /var/log/ceph/qemu-guest-$pid.log
-
Create the required directories and set permissions.
Run the following commands on each Nova compute node:
mkdir -p /var/run/ceph/guests /var/log/ceph
chown qemu:libvirt /var/run/ceph/guests /var/log/ceph
-
Edit the Nova configuration file.
For example, to open the configuration file on the Nova compute nodes:
vi /etc/nova/nova.conf
-
Configure the
[libvirt] section to use Ceph.
Ensure the following options are present:
[libvirt]
images_type = rbd
images_rbd_pool = vms
images_rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_user = cinder
rbd_secret_uuid = UUID
disk_cachemodes = network=writeback
hw_disk_discard = unmap
Replace UUID with the UUID of the Ceph secret configured for Nova.
Nova is configured to store virtual machine disks in Ceph Block Devices. New instances can now use Ceph‑backed disks, enabling scalable and resilient compute storage.
What to do next
Restart the OpenStack service to complete the configuration. For more information, see Restarting the OpenStack services.