Export CentOS 7 KVM vm so it can be imported in Proxmox

I have two dedicated servers, one running Proxmox and the other one running OpenNebula 5.4. I need to export one of the virtual machines (KVM) from OpenNebula and the import it to Proxmox so it will run from there. The reason behind this is because there are way too many virtual machines on the OpenNebula server and I have issues with high load mostly because of a specific vm. Since the proxmox server has just a few virtual machines running on it and the server’s CPU is more powerful, this could be a solution in my case.

Now I’m wondering if there is any step by step guide to follow or how to do it. I have everything configured in terms of networking, vlans and everything. I just need to be able to get that centos machine from OpenNebula, move it to the Proxmox server and start it from there.

Hi Bogdan Stoica,

I have OpenNebula Server with CEPH storage and move VM from Openebula to Proxmox success. This is step:

  1. Export rdb pool of VM to image raw file

rbd -n client.libvirt -k /etc/ceph/ceph.client.libvirt.keyring snap create one-ssd/one-52-658-0@backup01

rbd -n client.libvirt -k /etc/ceph/ceph.client.libvirt.keyring export one-ssd/one-52-658-0@backup01 /data/658.raw

  1. Copy file 658.raw to Proxmox server and using as image of VM.

Hope this can help you. Thanks.

What have you tried?

According to https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE#KVM_to_Proxmox_VE_.28KVM.29 it is supposed to be as simple as shutting down the VM in opennebula and:

KVM to Proxmox VE (KVM): Just create an new VM on Proxmox VE and add the existing disk image to this new VM, set the boot order and start.

https://forum.proxmox.com/ may be a better place to ask, add a link if you ask there.

I have managed to solve it like this:

I have created a vm snapshot of that vm running on the opennebula server. Then I used qemu-img convert to convert the image from qcow2 to raw format. Then created an identical machine as in cpu/mem/disk size on the proxmox server and for the image disk type i have selected raw. Didn’t actually turn the machine ON. I checked where the disk file for that machine has been created and just replaced that disk image with the snapshot image from OpenNebula. Started the vm in Proxmox and that’s it. It worked like a charm.

I suppose it would have been worked using the qcow2 format as well (without converting it but I haven’t tried that yet).

One advice. It would be better to create the vm snapshot with the vm powered off than using --live while running. I had some issues with the mysql databases since the vm on OpenNebula was up & running while creating the image and it was pretty extensively used. Not sure if that’s the cause but it might be.