Skip to main content
Version: Next

Cloning a Server (VM)

VirtFusion is designed primarily for service providers, where server cloning is not typically part of regular workflows. As such, cloning a server is a manual process and requires careful attention. This guide walks you through the steps required to manually clone a server.

warning

The original server must remain offline during the entire disk copy process to avoid data corruption or inconsistencies.

Prepare a New Server

  • Create a new server and configure it to mirror the original server. While you may choose different CPU and memory allocations, the storage size must be identical to that of the original server.
  • Build the server from the user area and select Self Install as the install method.

VirtFusion will now build the new server and create a blank disk.

info

Keep in mind that the self install option automatically enables VNC. If you don't need it, be sure to disable VNC after the build is complete.

Identify Disk Paths

Once the new server has built, you will need to locate the disk paths.

  • Example original server disk path:

    /home/vf-data/disk/0c2c37b3-6bf4-47d8-9238-2549d23ac09f_1.img
  • Example new server disk path:

    /home/vf-data/disk/622d09c8-11c9-4522-a471-db341e2b19ea_1.img

To find the actual paths, go to each server's configuration by selecting them in the admin area. You will see a section called ####### STORAGE ####### and something along the lines of:

 <source file="/home/vf-data/disk/622d09c8-11c9-4522-a471-db341e2b19ea_1.img"/>

In this case /home/vf-data/disk/622d09c8-11c9-4522-a471-db341e2b19ea_1.img is the path you require.

Power Off Both Servers

warning

Before copying the disk, you will need to shutdown both servers. You can do this from within VirtFusion.

Confirm that the servers are fully stopped before proceeding.

Copy the Disk

Now copy the original server’s disk over the new one using cp or rsync. This will overwrite the new server’s disk with the original server's data.

Example:

cp -f /home/vf-data/disk/0c2c37b3-6bf4-47d8-9238-2549d23ac09f_1.img /home/vf-data/disk/622d09c8-11c9-4522-a471-db341e2b19ea_1.img

Or, for progress tracking:

rsync -a --progress /home/vf-data/disk/0c2c37b3-6bf4-47d8-9238-2549d23ac09f_1.img /home/vf-data/disk/622d09c8-11c9-4522-a471-db341e2b19ea_1.img
info

If the new server is on a different hypervisor, you'll need to transfer the disk over the network or manually download it from the original hypervisor and upload it to the new one.

Boot the Cloned Server

After the disk copy is complete:

  1. Start the new server from VirtFusion.
  2. Confirm it boots correctly and functions as expected.
  3. Boot the original server if required.