I have a VM’s disk to copy from one host to another for live migration.
I can think of two ways to copy the VM’s disk.
Do a snapshot of the Logical Volume in the original host, create a Logical Volume in the destination host of the same size. Then copy using
dd
command.Create a new VM in the destination Logical Volume, then do a snapshot of the Logical Volume from the original host and run
rsync
to copy all directories and files to the destination Logical Volume withrsync
option—delete
.
The first method takes longer as it duplicates the entire volume. The second method is less straightforward. What’s the best way to copy the disk?