Libvirtd: Using RBD for a CDROM Device

Mostly a note to self but others may find this snippet useful.
I use the following to install from a disk image stored in RBD. Make sure to fill in your own client username, secret UUID, and monitor addresses.

    <disk type='network' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <auth username='libvirt'>
        <secret type='ceph' uuid='a487c228-159b-4197-8be9-8e0e0d2b8bd4'/>
      </auth>
      <source protocol='rbd' name='rados-pool/diskimage.iso'>
        <host name='monitor-1.address' port='6789'/>
        <host name='monitor-2.address' port='6789'/>
        <host name='monitor-3.address' port='6789'/>
      </source>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.