How to move a data volume between VMs

Volumes may be moved from one virtual machine to another. In Horizon, the proper way is to detach volume from one VM and attach it to another. Detaching volume from a running machine is not recommended.

Step 1 Stop your Virtual Machine

To avoid potential technical issues, stop your virtual machine. Use command Compute -> Instances -> Detach Volume.

../../../../_images/detach_volume1.png

Step 2 Reconfigure system

The old machine will contain an entry in /etc/fstab, which must be removed or commented out. To that end, edit file /etc/fstab using command:

sudo -e /etc/fstab

Be extremely careful while applying these changes!

Step 3 Configure the new machine

The new machine must be configured. Use only two steps

  • Step 2: Attach the Volume to VM and

  • Step 6: Create the mount point

from the following article:

How to attach a volume to VM less than 2TB on Linux

Avoid steps Partition the volume and Create the File System; they would destroy all the data on the volume that you want to transfer.