In addition to creating a custom image, Tencent Cloud allows you to import images. You can import an image file of the system disk on a local or a different server into CVM custom images. You can use the imported image to create a CVM or reinstall the operating system for an existing CVM.
Import Preparation
Prepare an image file that meets the import requirements.
Image Attribute | Requirements |
---|
OS | - CentOS、CentOS Stream、Ubuntu、Debian、OpenSUSE、CoreOS、FreeBSD、AlmaLinux、Rocky Linux、Fedora、Kylin、UnionTech、TencentOS
- Both 32-bit and 64-bit OSs are supported
|
Image format | - RAW, VHD, QCOW2, and VMDK
- Run
qemu-img info imageName | grep 'file format' to check the image format.
|
File system type | GPT partition is not supported |
Image size | - The actual image size cannot exceed 50 GB. Run
qemu-img info imageName | grep 'disk size' to check the image size. - The image vsize cannot exceed 500 GB. Run
qemu-img info imageName | grep 'virtual size' to check the image vsize. Note: size of an image in QCOW2 format is used upon check during import. |
Network | - By default, Tencent Cloud provides the
eth0 network interface for the instance. - You can use the metadata service to query the network configuration of the instance. For more information, see Instance Metadata.
|
Driver | |
Kernel | Native kernel is preferred for an image. Any modifications on the kernel may cause the import to fail. |
Region | Importing images from COS in another region is unavailable for the Shanghai Finance and Shenzhen Finance. |
Image Attribute | Requirements |
---|
OS | - Windows Server 2008, Windows Server 2012, Windows Server 2016 related versions, Windows Server 2019 related versions, and Windows Server 2022 related versions
- Both 32-bit and 64-bit OSs are supported.
|
Image format | - RAW, VHD, QCOW2, and VMDK
- Run
qemu-img info imageName | grep 'file format' to check the image format.
|
File system type | - Only NTFS with MBR partition is supported.
- GPT partition is not supported.
- Logical Volume Manager (LVM) is not supported.
|
Image size | - The actual image size cannot exceed 50 GB. Run
qemu-img info imageName | grep 'disk size' to check the image size. - The image vsize cannot exceed 500 GB. Run
qemu-img info imageName | grep 'virtual size' to check the image vsize. Note: size of an image in QCOW2 format is used upon check during import. |
Network | - By default, Tencent Cloud provides
local area connection network interface for the instance. - You can use the metadata service to query the network configuration of the instance. For more information, see Instance Metadata.
|
Driver | Virtio driver of the virtualization module KVM must be installed for an image. The Windows system does not come with a Virtio driver by default, so first install the Windows Virtio driver before exporting a local image. Choose the download address based on the network environment:- Public network download address:
http://mirrors.tencent.com/install/windows/virtio_64_1.0.9.exe - Private network download address:
http://mirrors.tencentyun.com/install/windows/virtio_64_1.0.9.exe
|
Region | Importing images from COS in another region is unavailable for the Shanghai Finance and Shenzhen Finance. |
Others | Imported Windows images do not support Windows system activation. |
Directions
- Log in to the CVM console and click Images on the left sidebar.
- Select Custom image and click Importing an image.
- As prompted in the operation interface, first enable COS, and then create a bucket. Uploading an Object the image file to the bucket and get the image file URL.
- Click Next.
- Complete the configurations and click Import.
Note
Ensure the entered COS file URL is correct.
You will be notified about the result of import via Message Center.
Failed Imports
If the import failed, troubleshoot as follows:
Notes
Make sure you have subscribed to product service notifications via Message Subscription. This ensures you can receive notifications from Message Center, SMS messages, and emails about the cause of failure.
Note
If you do not subscribe to product service notifications, you will not receive the notification from Message Center about whether an import is successful.
Troubleshooting
You can refer to the following information for troubleshooting on errors. See error code for detailed error prompt and error description.
InvalidUrl: invalid COS URL
展开&收起 The InvalidUrl error indicates that an incorrect COS URL has been entered. The possible causes are:
- The image URL you entered is not a Cloud Object Storage image URL.
- The permission of the COS URL is not public read and private write.
- The access permission of the COS file is private read, but the signature has expired.
Note
COS URL with the signature can only be accessed once.
- When importing an image outside the Chinese mainland, a COS link in a different region is used.
Note
The image import service outside the Chinese mainland only supports COS instances in the same region; that is, a COS link in the same region needs to be used for import.
- The user's image file has been deleted.
If you receive the error message about an invalid COS URL, troubleshoot based on the reasons above.
InvalidFormatSize: invalid format or size
展开&收起 The InvalidFormatSize error indicates that the format or size of an image to be imported does not meet the following requirements of Tencent Cloud:
- Supported image file formats are
qcow2
,vhd
, vmdk
, and raw
. - The size of an image file to be imported cannot exceed 50 GB (based on the size in qcow2 format).
- The size of the system disk to which the image is imported cannot exceed 500 GB.
If you receive an error message that the image format or size is invalid:
- Convert the image file into an appropriate format according to Linux Image Creation, reduce the image content to meet the size requirements and then reimport it.
- Or migrate instance through Offline Instance Migration. This feature supports the migration of up to 500 GB image files.
VirtioNotInstall: Virtio driver not installed
展开&收起 The VirtioNotInstall error indicates that the image to be imported does not have Virtio driver installed. Tencent Cloud uses the KVM virtualization technology and requires users to install Virtio driver on the image to be imported. Except for a few customized Linux OSs, most Linux OSs have Virtio driver installed. In Windows OSs, users need to manually install the Virtio driver:
CloudInitNotInstalled: cloud-init program not installed
展开&收起 The CloudInitNotInstalled error indicates that the image to be imported does not have cloud-init installed. Tencent Cloud uses the open-source cloud-init software to initialize the CVM. If cloud-init is not installed, the CVM initialization will fail.
PartitionNotPresent: partition information not found
展开&收起 The PartitionNotPresent error indicates that the imported image is incomplete. Check whether the boot partition was included when the image was created.
RootPartitionNotFound: root partition not found
展开&收起 The RootPartitionNotFound error indicates that the root partition cannot be detected in the image to be imported. Check the image file. The possible causes are:
- The installation package was uploaded.
- The data disk image was uploaded.
- The boot partition image was uploaded.
- An incorrect file was uploaded.
InternalError: unknown error
展开&收起 The InternalError error indicates that the cause of error has not yet been recorded. Contact the customer service and our technical personnel will help you resolve the issue.
Error Code
Error Code |
Reason |
Recommended Solution |
InvalidUrl |
Invalid COS link. |
Check whether the COS URL is the same as the imported image URL. |
InvalidFormatSize |
Format or size does not meet requirements. |
Images must meet the image format and image size requirements in Preparations. |
VirtioNotInstall |
Virtio driver not installed. |
Install the Virtio driver in the image by referring to the Driver section in Preparations. |
PartitionNotPresent |
Partition information not found. |
Image is corrupted possibly due to incorrect image creation method. |
CloudInitNotInstalled |
Cloud-init software not installed. |
Install cloud-init in the Linux image by referring to the Driver section in Preparations. |
RootPartitionNotFound |
Root partition not found. |
Image is corrupted possibly due to incorrect image creation method. |
InternalError |
Other errors. |
Contact our customer service. |
Was this page helpful?