[SOLVED] Migrate physiacal Root-Server to KVM

Younex

Well-Known Member
Jan 30, 2018
93
22
48
44
Hi,

i have a remote root server (hetzner provider) and would like to migrate the hard disk to kvm.
What is the best way to do this?

dd the entire disk to an external hard disk?

Thanks
 
Hi,

dd the entire disk to an external hard disk?
I would do it this way.
You can also use rsync and do the partition manually this is more work and a more complex task.
 
My favorite rsync parameters for P2V are:

Code:
rsync -aAxXvPSH /root/partition/of/current/machine/ /root/mounted/on/remote/machine/

Note: trailing slash is important :)

HTH,
Shantanu
 
Last edited:
I wrote some handy scripts and integrated them into a lightweight bootable USB/ISO image called restartOS that can be used to P2V or V2V while offline. I have migrated dozens of VMs with these scripts. Just run clone-target on the destination machine, and then clone-source on the origin. If they are on the same network, they will find each other. The image will be compressed over the wire, which dramatically speeds up the transfer of un-allocated blocks.