All Products
Search
Document Center

Elastic Compute Service:Import an image

Last Updated:Feb 28, 2026

You can import an on-premises image file to Alibaba Cloud to create a custom image. Use the custom image to launch new ECS instances or replace the operating system on the system disk of existing ECS instances. This supports diverse business requirements and application scenarios.

Import a Linux image

image
  1. Review the Alibaba Cloud Linux image requirements.

  2. Prepare a valid on-premises image file.

    1. Create a virtual machine and install an operating system: Install VirtualBox on the server where you build the image. In VirtualBox, create a virtual machine and install an operating system.

    2. Install required plug-ins in the virtual machine.

      • Install cloud-init: To ensure that instances created from the image initialize successfully.

      • Install the virtio driver: To ensure that ECS instances created from the image start properly.

      • Customize a Linux image (Optional): If your image's OS is not on the list of supported platforms and you cannot install cloud-init, select the Customized Linux option during import.

    3. Check and fix the image: Use the image compliance tool to check for and fix compliance issues.

    4. Obtain the Linux image file.

    5. Convert the image format: ECS only supports images in RAW, VHD, QCOW2, and VMDK formats. If your image uses a different format, you must convert it first.

  3. Import the custom image: Upload the image file to Object Storage Service (OSS) and then import it to ECS.

  4. Use a custom image to create one or more instances.

Import a Windows image

image
  1. Review the Alibaba Cloud Windows image requirements.

  2. Prepare a valid on-premises image file.

    1. Create a virtual machine and install an operating system: Install VirtualBox on the server where you build the image. In VirtualBox, create a virtual machine and install an operating system.

    2. Install required plug-ins in the virtual machine.

    3. Obtain the Windows image file.

    4. Convert the image format: ECS only supports images in RAW, VHD, QCOW2, and VMDK formats. If your image uses a different format, you must convert it first.

  3. Import the custom image: Upload the image file to OSS and then import it to ECS.

  4. Use a custom image to create one or more instances.