The supported formats of imported images are QCOW2, RAW, VHD and VMDK, and if your image file is in other formats, you need to convert the image into any of the above-mentioned four types before importation.
Before exporting an image, please refer to private image importation and use the image self-inspection tool, for ensuring that the current system configuration complies with JD Cloud’s image requirement.
The Linux system can export the system disk image and convert its format with qemu-img. The mutually convertible formats include: raw, qcow2, qcow, cow, vmdk and cloop.
yum install qemu-img (CentOS) or
apt-get install qemu-utils (Ubuntu, and install qemu-img. Also, you can go to https://pkgs.org/download/qemu-img to download the installation package.
Through execution of the following instruction, a designated disk can be integrally exported as an image and stored under the designated directory.
qemu-img convert -O qcow2 /dev/vda /mnt/vdb/image_out.qcow2
yum -y install lrzsz tar -zcvf image_out.tar.gz image_out.qcow2 sz image_out.tar.gz
qemu-img can be made to execute the following instruction to convert the format of the designated image file, if the image file format is not within those supported by JD Cloud.
qemu-img convert -f raw -O qcow2 image.raw image_out.qcow2
qemu-img info image_out.qcow2
The Windows system can export the image in VHD format with Disk2vhd provided by Microsoft official website, and if the image file is in other formats, qemu-img (for windows) can be used to conduct format conversion.
Go to download and install Disk2vhd
After decompression, execute disk2vhd.exe. So, the following interface is displayed. Designate the storage path and file name, tick the system disk, and untick "use Vhdx", and thereafter click Create to export the system disk image in VHD format.
Go to downland qemu-img-windows
Place the decompressed file (including .exe files and .dll files) in the folder of image files
3, In powershell, enter the folder of image files, and execute the following instruction for format conversion. So, the target Image will be saved in the directory of source images.
.\qemu-img.exe convert -f raw -O qcow2 image.raw image_out.qcow2
.\qemu-img.exe info image_out.qcow2