All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Import images

Last updated:2021-08-04 11:26:30

Kingsoft Cloud allows you to import private images into the KEC console for subsequent operations such as creating instances and reinstalling the operating system. The supported image formats include RAW, VHD, QCOW2, and VMDK.

This topic describes the requirements on images and how to import the images.

Usage notes

You cannot use imported images to create Networking Enhanced instances.

Image requirements

Linux images

The following table describes the functional limits and requirements for Linux images.

Item Description
Password and account
  • Password: The password must be 8 to 32 characters in length and must contain uppercase letters, lowercase letters, and digits. Supported special characters include ! $ % ( ) * + , - . / : ; < = > ? @ [ ] ^ _ ` { } ~.
  • Username: An Ubuntu image must contain a user named ubuntu. Otherwise, the image does not support the password feature of the console. If such a user is not contained, you must select the Retain Image Settings option for Login Mode when you subsequently create an instance by using the image.
Network
  • Network interfaces: Dual ENIs are supported.
  • DHCP: You must enable DHCP.
  • IPv6: IPv6 is not supported.
Driver and firewall
  • Driver: Install KVM virtio driver.
  • Firewall: The firewall opens port 22 by default. You must disable the firewall.

The following table describes the requirements for the basic environment and critical configurations of Linux images.

Item Description
Standard image types
  • CentOS 5, CentOS 6, CentOS 7
  • Ubuntu 12, Ubuntu 14, Ubuntu 16, Ubuntu 18
  • Fedora 20
  • Debian 8, Debian 9
  • Red Hat 5, Red Hat 6, Red Hat 7
If you use a Linux operating system other than those mentioned above, features such as password-based login and attachment of secondary ENIs are not supported.
Requirements for the basic environment
  • Partition: The system disk partition cannot be adjusted. It must be a single root partition.
  • System disk: The size of the system disk cannot exceed 100 GB. Make sure that the system disk is not full.
  • System files: You cannot modify critical system files, including /sbin, /bin, and `/lib`.
  • File system: Verify the integrity of the file system. Supported file systems are XFS, EXT3, and EXT4. The MBR partition is used.
Requirements for critical configurations To ensure normal creation and startup of the system, you must meet the following requirements for the configuration files:
  • Do not modify /etc/issue*, /etc/*release*, and /etc/debian_version (if any).
  • Do not modify /boot/grub/menu.lst.
  • Do not change /etc/shadow to read only.
  • Do no modify /etc/selinux/config to enable SELinux.
  • Modify the /etc/fstab and grub configuration files as required to enable the system to mount and use virtio devices.

*Note: The size of the system disk refers to the disk space used to create the custom image, but not the actual space occupied by data.

Windows images

The following table describes the functional limits and requirements for Windows images.

Item Description
Password and account
  • Password: The password must be 8 to 32 characters in length and must include uppercase letters, lowercase letters, and digits. Supported special characters include ! $ % ( ) * + , - . / : ; < = > ? @ [ ] ^ _ ` { } ~.
  • Username: The image must contain a user named kingsoft. Otherwise, the image does not support the password feature of the console. If such a user is not contained, you must select the Retain Image Settings option for Login Mode when you subsequently create an instance by using the image.
Driver and ENI
Firewall and boot file

The following table describes the requirements for the basic environment of Windows images.

Item Description
Standard image types
  • Windows Server 2016 R2 Datacenter 64-bit English
  • Windows Server 2016 R2 Datacenter 64-bit Chinese
  • Windows Server 2012 R2 Datacenter 64-bit English
  • Windows Server 2012 R2 Datacenter 64-bit Chinese
  • Windows Server 2008 R2 Datacenter 64-bit English
  • Windows Server 2008 R2 Datacenter 64-bit Chinese
Requirements for the basic environment
  • Partition: A multi-partition system disk is supported.
  • System disk: The size of the system disk* cannot exceed 100 GB. Make sure that the system disk is not full.
  • System files: You cannot modify critical system files.
  • File system: Verify the integrity of the file system. NTFS systems are supported. The MBR partition is used.

*Note: The size of the system disk refers to the disk space used to create the custom image, but not the actual space occupied by data.

Import images

Preparations

You must fulfill the following tasks before importing an image:

  1. Create an image based on image requirements of Kingsoft Cloud.
  2. For a Linux image, use the image_check tool to make sure that the image meets the import requirements.
  3. Activate the KS3 service, create a bucket in the corresponding region, and upload the created image to the bucket.
  4. Authorize the KEC official account to access your KS3 resources.

Procedure

  1. Log in to the KEC console.
  2. In the left navigation pane, click Image.
  3. Click Import Image above the list of custom images.
  4. Select the operating system for importing the image. Make sure that all preparations on the page have been completed. Click Next.
  5. Configure image parameters. Note the following information during the configuration process:

    • Region: Enter or select the region to which the image will be imported. It must be the region where the bucket resides.
    • Bucket Address: Enter the address of the bucket where the image resides. For more information about how to obtain the address, see Obtain a bucket address.
    • System Structure: If the image is of a 32-bit operating system, select i386. If the image is of a 64-bit one, select x86_64.
    • When you import an Image, you can choose whether to add data disks based on your business.
  6. Click OK.

After the import is successful, the image will become available.

Description of error messages

Importing an image generally takes several hours, depending on the size of the image file and how busy the system is with import tasks.

During the importing process, the system will perform a simple check on image compliance and display error messages, if any.

Common error messages are described in the following table.

Error message Cause analysis
Format does not meet the conditions The image format is incorrect. Only RAW, VHD, QCOW2, and VMDK formats are supported. For more information about how to change the image format, see Convert the image format.
C:\boot.bat does not exist The C:\boot.bat file was not detected in the Windows image.
Image file partition error The image has no partition.
virtio driver is not installed The driver file viostor.inf or netkvm.inf does not exist.
Mirror system disk size does not match The possible causes are:
  • The system disk size exceeds the limit of KEC.
  • The system disk size of the image exceeds 100 GB.
The format does not meet the criteria or does not match what you fill The possible causes are:
  • The file system type of the image does not meet the system requirements. A Windows image supports NTFS, and a Linux image supports EXT4, EXT3, and XFS.
  • When you import the image, you selected an incorrect operating system for it. For example, you might select a Linux operating system for a Windows image, or a Windows operating system for a Linux image.
missing the system information file The possible causes are:
  • Necessary system information files are missing. For example,
    - The /etc/redhat-release file or link of CentOS, Red Hat, or Fedora points to a file in which system information is missing.
    - The /etc/lsb-release file or link of Ubuntu points to a file in which system information is missing.
    - System information is missing in the /etc/os-release and /etc/debian_version files of Debian.
  • A Linux operating system was selected for your importing, but it is actually a Windows image.
  • A wrong version was selected for your importing. For example, you might select CentOS 6 Edition for a CentOS 7 image.

If the preceding error messages appear, you need to create a new image according to the image requirements and upload it to the KS3 bucket.

If you encounter an unknown error, contact Kingsoft Cloud customer service.

On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback