# Preparing an Image File

You need to prepare an image file that meets the platform requirements.

- You are advised to complete the network, tool, and driver configurations in Table 1 on the ECS and then export the image file. You can also complete the configurations on the created ECSs. For details, see What Do I Do If a Windows Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- Currently, only RAW and ZVHD2 files can be imported (maximum file size: 1 TB). In addition to the requirements described in Table 1, a bitmap file needs to be generated for each RAW image file. The bitmap file is uploaded together with the image file. For details, see Quickly Importing an Image File.

Table 1 Windows image file requirements
Image File Property | Requirement
--- | ---

OS

- Windows Server 2008, Windows Server 2012, Windows Server 2016
- 32-bit or 64-bit
- The OS cannot be bound to specific hardware.
- The OS must support full virtualization.

For details about the supported OS versions, see External Image File Formats and Supported OSs. These OSs support automatic configuration. For details, see What Will the System Do to an Image File When I Use the File to Register a Private Image? For other OSs, check and install the Guest OS driver. On the image registration page, select Other Windows. After the image is imported, whether the system is started depends on the driver integrity.

Image format | VMDK, VHD, QCOW2, RAW, VHDX, QED, VDI, QCOW, ZVHD2, and ZVHD

Image size

Maximum file size: 128 GB

If the image size is between 128 GB and 1 TB, convert the image file into the RAW or ZVHD2 format and import the image using fast import.

- For details about how to convert the image file format, see Converting the Image Format Using qemu-img-hw.
- For details about fast import, see fast image file import.

Network

The NIC must be set to DHCP. Otherwise, the ECS startup or network capability will be abnormal. For details, see:

Setting the NIC to DHCP

The following value-added operations are optional:

- Enabling NIC multi-queue

  NIC multi-queue enables multiple vCPUs to process NIC interruptions, thereby improving network PPS and I/O performance. For details, see How Do I Enable NIC Multi-Queue for an Image?

Tool

You are advised to install Cloudbase-Init.

Cloudbase-Init is an open-source tool for cloud instance initialization. When creating ECSs from an image with Cloudbase-Init, you can use user data injection to inject customized initialization details (for example, an ECS login password) to the ECSs. You can also configure and manage a running ECS by querying and using metadata. If Cloudbase-Init is not installed, you cannot apply custom configurations to the ECSs. You will have to use the original password in the image file to log in to the ECSs.

For details, see Installing and Configuring Cloudbase-Init.

Driver

- Installing the PV Driver
- Installing UVP VMTools

Other requirements

- Currently, images with data disks cannot be created. The image file must contain only the system disk, and the system disk size must be [1 GB, 1024 GB].
- The initial password in the image file must contain uppercase letters, lowercase letters, digits, and special characters (!@$%^-_=+[{}]:,./?).
- The boot partition and system partition must be on the same disk.
- For an external image file, you need an administrator account and password combination.
- Generally, the boot mode is BIOS in an image. Some OS images support the UEFI boot mode. For details, see "OSs Supporting UEFI Boot Mode" in Image Service Management User Guide.
- The image file cannot be encrypted, or ECSs created from the registered image may not work properly.

Parent topic: Creating a Windows System Disk Image from an External Image File