Use this when KVM VMs use Ceph RBD images.
Ceph RBD · KVM Storage
Ceph RBD for KVM stores VM disks as RADOS block device images in a Ceph pool, accessed directly by QEMU through librbd. It gives shared, replicated storage with thin provisioning, snapshots and live migration.
1. libvirt RBD: disks as RBD images via librbd.
2. Auth via libvirt secret.
3. Live migration with shared storage.
4. cache=writeback with rbd cache is common.
5. Ceph health matters.
VM → librbd → Ceph pool
Context & applicabilityCommon mistakes · platform/version boundaries
- Using the
client.adminkey in libvirt instead of a restricted client. - Different Ceph keys on hosts, breaking live migration.
cache=writebackwithout considering data safety (Ceph RBD cache handles flushes correctly, but test).- Monitors listed by IPs that later change.
Operational reference
Fast context before you go deeper.
rbd info libvirt-pool/vm01-disk0Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
rbd -p libvirt-pool ls
rbd info libvirt-pool/vm01-disk0
virsh secret-list
ceph -s
Authentication failures usually mean a missing or wrong libvirt secret for the Ceph client key, or the client lacking caps on the pool.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- QEMU accesses RBD directly via librbd.
- Images are thin and support snapshots.
- Ceph health affects every VM.
virsh pool-info <rbd-pool>— RBD poolrbd ls -p <pool>— imagesvirsh secret-list— Ceph auth secret
ReferenceHow it works1 section · depth on demand
libvirt RBD configuration
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<source protocol='rbd' name='vm-pool/vm01-disk0'>
<host name='10.10.0.11' port='6789'/>
</source>
<auth username='libvirt'><secret type='ceph' uuid='...'/></auth>
<target dev='vda' bus='virtio'/>
</disk>
Documented example, not captured output. Create a Ceph user with limited caps (ceph auth get-or-create client.libvirt mon 'profile rbd' osd 'profile rbd pool=vm-pool') and store its key as a libvirt secret.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
KVM can use Ceph RBD directly through librbd in QEMU, without mapping devices on the host:
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<source protocol='rbd' name='vm-pool/vm1-disk0'>
<host name='10.10.0.11' port='6789'/>
</source>
<auth username='libvirt'><secret type='ceph' uuid='…'/></auth>
<target dev='sda' bus='scsi'/>
</disk>
Create a restricted Ceph user (ceph auth get-or-create client.libvirt mon 'profile rbd' osd 'profile rbd pool=vm-pool') and store its key as a libvirt secret.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Hypervisor Storage → KVM Storage → Ceph RBD. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://pve.proxmox.com/pve-docs/chapter-pvesm.html · confidence 94%