Get Virtualizor
Create VPS with VMDK / VHD

Converting Vmdk / Vhd To Virtualizor's supported storages

Overview

Creating a VPS directly using VMDK / VHD is not possible but you can follow the below steps to manually migrate vmdk / vhd to Virtualizor VPS using LVM / File based storage.

Step 1 : Copy `vmdk` / `vhd` file from Source server to Virtualizor Server

Copy the VPS vmdk / vhd file from Source server to the Virtualizor server. (You can use SCP for it)

Note : Server must have the same amount of free space available on "/" partition so that it can fit the converted file as well.

Step 2 : Convert 'vmdk' / 'vhd' file to 'img' format

Once the file has been copied to the proper destination, you need to convert it to img format by running the following command (Skip this step if your storage on Virtualizor panel is Qcow2) :

For Vmdk :

qemu-img convert vpsfile.vmdk -O raw /converted.img

For Vhd :

qemu-img convert vpsfile.vhd -O raw /converted.img

Note : The file ownership should be set to qemu for user and group using chown command.
chown qemu:qemu filename

Step 3 : Create VPS on Virtualizor panel

Create VPS on Virtualizor panel with LVM / File based storage with same or more disk space than original vps and then power off the VPS from panel.

Step 4 : dd the `.img` to Virtualizor VPS disk

Let's assume the VPS created on Virtualizor is v1001 and vps disk name is vsv1001-dvhckogpoqenoy9c-fy4xodn6olq3efvi. You can run the below command to dd the .img data to vps

For LVM Storage :

Syntax : dd if=/converted.img of=/dev/vg/vps-lv
Example : dd if=/converted.img of=/dev/vg/vsv1001-dvhckogpoqenoy9c-fy4xodn6olq3efvi status=progress

For Thin - LVM Storage :

Syntax : dd if=/converted.img of=/dev/vg/vps-lv conv=sparse status=progress
Example : dd if=/converted.img of=/dev/vg/vsv1001-dvhckogpoqenoy9c-fy4xodn6olq3efvi conv=sparse status=progress

Note : You can find the actual VPS disk path using lvscan command in case of LVM & Thin LVM Storage.
Example : lvscan | grep v1001

For RAW - File based storage :

Syntax : cp /converted.img /path-to-vps-disk.raw
Example : cp /converted.img /vms/vsv1001-dvhckogpoqenoy9c-fy4xodn6olq3efvi.raw (You can press 'y' to overwrite the vps disk.)

Note : The file ownership should be set to qemu for user and group using chown command.
chown qemu:qemu filename

For qcow2 - File based storage :

Syntax : qemu-img convert vpsfile.vmdk -O qcow2 vpsfile.qcow2
Example : qemu-img convert vpsfile.vmdk -O qcow2 vsv1001-dvhckogpoqenoy9c-fy4xodn6olq3efvi.qcow2

And then copy the convert disk to vps storage path.

Note : The file ownership should be set to qemu for user and group using chown command.
chown qemu:qemu filename

Once the dd / cp operation is successful , you can start the VPS from the panel.

Note : Virtualizor may fail to perform operations on such VPS since they might be having a custom partitioning layout.

Converting Proxmox Qcow2 storage to LVM / Thin LVM / RAW Storage

Overview

You can follow the below steps to manually convert qcow2 to LVM / File based storage.

Step 1 : Copy `.qcow2`file from Source server to Virtualizor Server

Copy the VPS qcow2 file from Source server to the Virtualizor server. (You can use SCP for it)

Note : Server must have the same amount of free space available on "/" partition so that it can fit the converted file as well.

Step 2 : Convert 'qcow2' file to 'img' format

Once the file has been copied to the proper destination, you need to convert it to img format by running the following command:

qemu-img convert vps_disk.qcow2 -O raw /converted.img

Note : The file ownership should be set to qemu for user and group using chown command.
chown qemu:qemu filename

Step 3 : Create VPS on Virtualizor panel

Create VPS on Virtualizor panel with LVM / File based storage with same or more disk space than original VPS and then power off the VPS from panel.

Step 4 : dd the `.img` to Virtualizor VPS disk

Let's assume the VPS created on Virtualizor is v1001. You can run the below command to dd the .img data to VPS

For LVM Storage :

Syntax : dd if=/converted.img of=/dev/vg/vps-lv
Example : dd if=/converted.img of=/dev/vg/vsv1001-dvhckogpoqenoy9c-fy4xodn6olq3efvi status=progress

For Thin - LVM Storage :

Syntax : dd if=/converted.img of=/dev/vg/vps-lv conv=sparse status=progress
Example : dd if=/converted.img of=/dev/vg/vsv1001-dvhckogpoqenoy9c-fy4xodn6olq3efvi conv=sparse status=progress

Note : You can find the actual VPS disk path using lvscan command in case of LVM & Thin LVM Storage.
Example : lvscan | grep v1001

For RAW - File based storage :

Syntax : cp /converted.img /path-to-vps-disk.raw
Example : cp /converted.img /vms/v1001-dqvftoc1ccqqgiap-t2arww0xaxskh0pj.raw (You can press 'y' to overwrite the vps disk.)

Note : The file ownership should be set to qemu for user and group using chown command.
chown qemu:qemu filename

Once the DD / cp operation is successful , you can start the VPS from the panel.

Note : Virtualizor may fail to perform operations on such VPS since they might be having a custom partitioning layout.

    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list