importing rbd from another cluster

tim taler

Member
Mar 8, 2018
19
0
6
26
Hi all,
I have a ceph/kvm cluster on debian buster with ceph octopus.
On it a bunch of vms which use rbd as storage backends.

I like to migrate those vms to an actual proxmox cluster.

I stopped the vm on the source side and then did:

Code:
sudo rbd export <name-of-rbd> - | zstd | ssh <proxmox-target-system> "unzstd | sudo rbd import - <name-of-rbd>"

then verified the checksum on both sides with:

Code:
sudo rbd export <name-of-rbd> - | xxhsum

Checksum does match.
But if I pick this rbd as the harddisk for a new machine I create in proxmox it failes to boot since it doesn't recognize any partition on the rbd (checked with using a netinst image as a resuce system).

Any hint would be appreciated!
TIA
 
Why not add the Ceph cluster as a storage to Proxmox?
Then you can create a VM without disks and attach the disk from the external cluster. After a 'move disk' the image is transferred to its new home. This way you can verify the boot of the VM with the old Ceph cluster as well.

Or a you use rbd-mirror to mirror the images onto the new cluster. But obviously this needs more configuration work.
 
Thank Alwin for your response.
Well in the old cluster I can start and stop the VM with no problem
(sudo virsh start <name>)

Is there a how-to for attaching an external octopus ceph cluster to proxmox?

but since the checksums of the rbds are matching on both sides ... would that really makes a difference?
 
Is there a how-to for attaching an external octopus ceph cluster to proxmox?
Just like any other RBD storage. :)
https://pve.proxmox.com/pve-docs/chapter-pvesm.html#ceph_rados_block_devices

but since the checksums of the rbds are matching on both sides ... would that really makes a difference?
That's a "that depends". With the external storage, you do not export the image and can run the VM right of that storage. If that works, you can run a move disk (qemu-mirror). This doesn't involve the export/import and zstd compression. If the VM doesn't start at the first stage, then libvirt has some way to boot from the RBD image.