- (1) trusted storage connector pod
- (Many) VM pods connection to storage using shared directory
- Get the credentials from a PVC
- Create a qcow2 pointing to the storage described by PV
- Export the qcow2 (and thus the backing storage) using nbd over a socket
- (Other pod) connect to the socket booting the VM
# Generate an image pointing to the backing store: http://docs.ceph.com/docs/giant/rbd/qemu-rbd/
# A backing store can be any storage system supported by qemu.
$ qemu-img create -f qcow2 -b rbd:$WHATVER_COMES_FROM_PV qcow-for-my-pvc.qcow2
# Now share the disk all day long
$ qemu-nbd --persistent -k /shared-nbd/my-pvc.sock $PWD/qcow-for-my-pvc.qcow2
Any client can launch a VM using:
$ qemu-system-x86_64 --drive file=nbd:unix:/shared-nbd/my-pvc.sock