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:
For Vmdk :
qemu-img convert vpsfile.vmdk -O raw /converted.img
For Vhd :
qemu-img convert vpsfile.vhd -O raw /converted.img
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.)
For qcow2 – File based storage :
Syntax : dd if=/converted.img of=/path-to-vps-disk-qcow2 status=progress
Example : dd if=/converted.img of=/vms/v1001-dqvftoc1ccqqgiap-t2arww0xaxskh0pj.qcow2 status=progress
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
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.)
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.