A while ago I created a ceph storage cluster and connected it to proxmox2 according to the method described in http://pve.proxmox.com/wiki/Storage:_Ceph. We have some kvm images running on the ceph storage that where originaly just for testing purpose but over time they are becoming more and more important for our company. Because I don't consider the ceph storage as production ready yet, I would like to move the kvm images to our ISCSI storage. Does anyone know how I can copy the images from ceph to other storage? Knowing how to copy them to local storage would be sufficient.
1 Answers
You can easily transfer images in and out of Ceph RADOS with the rbd
command. I am currently using libvirt to manage my KVM images, so my paths may be different.
The libvirt configuration for one of my virtual machines uses an RBD disk image located at data/vm-www
. To see that RBD pool, I can use the rbd ls -p data
command. For any other command, such as getting information about the image, you can use a shortened form: rbd info data/vm-www
, instead of the longer rbd info -p data vm-www
.
Now that you have verified you can find the image, use this command to save it to a local file: rbd export data/vm-www www.raw
. www.raw
is now a file that contains your virtual machine's disk, and you can tell your libvirt or qemu-kvm command to use it directly as a raw file. Alternatively, you can use qemu-img to convert it to a different format, such as qcow2.
I do not have experience with RBD snapshots, but the rbd export
command lists a "--snap" option, presumably to be used with information that you can get from rbd snap ls data/vm-www
.
Hope this helps!