How to Migrate Your DigitalOcean Droplet to an Unraid VM

By October 21, 2020Linux

If you’re tired of paying for a DigitalOcean droplet and want to save money, you can migrate your droplet to an Unraid VM using this simple guide. By running your VPS locally, you could save hundreds or thousands of dollars a year. Here are the steps to follow:

Step 1: Set a Root Password for VNC

Before you start the migration, it’s important to set a root password for VNC. To do this, follow these steps:

  1. Shutdown or restart your DigitalOcean droplet into Recovery Mode in the DO Control Panel.
  2. Take note of the temporary root password shown in the console.

Step 2: Copy the Remote Disk Image of the DigitalOcean Droplet to Your Local Machine

Next, you need to copy the remote disk image of the DigitalOcean droplet to your local machine. You can do this with the following command:

ssh root@43.44.X.X "dd if=/dev/vda" | sudo dd of=88plug.raw bs=64k

This command will create a raw disk image of your DigitalOcean droplet and save it to a file called 88plug.raw on your local machine.

Step 3: Convert the Raw File to a Compatible IMG File for Unraid

After copying the disk image to your local machine, you need to convert it to a compatible img file for Unraid. You can do this with the following command:

qemu-img convert -p -O raw 88plug.raw disk.img

This command will create a disk image file called disk.img that is compatible with Unraid.

Step 4: Sync the Image File to Unraid

Next, you need to synchronize the disk image file to your Unraid server. You can use the following command to do this:

rsync -av --progress -e "ssh -T -c aes128-ctr -o Compression=no -x" disk.img root@tower.local:/mnt/user/domains/88plug/

This command will copy the disk image file to your Unraid server and save it to /mnt/user/domains/88plug/ the directory.

Step 5: Create a New VM with the Same OS as Your DO Droplet

Finally, you need to create a new virtual machine in Unraid with the same operating system as your DigitalOcean droplet. You can do this using the Unraid web interface or command line interface, and you’ll need to import the disk image file you created in Step 3. Here’s an example command to import the disk:

qm importdisk $VMID disk.img local-lvm

And to confirm the VM is created, you can list all available VMs with:

qm list

Bonus round: For other systems use the handy table below

Image formatArgument to qemu-img
QCOW2 (KVM, Xen)qcow2
QED (KVM)qed
VDI (VirtualBox)vdi
VHD (Hyper-V)vpc
VMDK (VMware)vmdk

Bonus Round: Convert Raw to QCOW2 for Proxmox

If you’re using Proxmox, you’ll need to convert the raw file to a QCOW2 file format. You can do this with the following command:

qemu-img convert -p -O raw 88plug.raw disk.qcow2


  • WIlliam says:

    Could you advise on what networking settings should be changed once up and running on proxmox? Any other settings to make this fully functional within Proxmox (like qemu guest agent)

Leave a Reply