Alibaba Cloud offers a variety of methods for you to create custom images. You can import a local custom image or create custom images by using Operation Orchestration Service (OOS), snapshots, ECS instances, or Packer. If you frequently use custom images, we recommend that you update them on a regular basis to ensure data security. For example, you can upgrade the OS patches, update the middleware or certificates, or install the latest third-party software for custom images.

Image creation methods

The following table compares the image creation methods offered by Alibaba Cloud.

Method Advantage Disadvantage Billing
Use OOS to update custom images
  • Official templates, no coding required
  • Online operation, installation-free
  • Password-free logon, secure and reliable
  • Visualized execution process
None. You may be charged for resources such as instances, disks, and snapshots. For more information, see Billing overview.
Easy operations in the ECS console
  • The image creation procedure becomes complex as more pre-installed software is added.
  • Difficult to ensure correct and consistent manual operations.
  • High maintenance cost.
You may be charged for snapshots. For more information, see Snapshot billing.
Create a custom image by using Packer Open source tool that can be used by most cloud service providers
  • Installation and maintenance required.
  • Script writing required.
You may be charged for resources such as instances, disks, and snapshots. For more information, see Billing overview.
Create and import a custom image On-cloud application deployment Difficult operations. You must know how to use the GUI and configure virtualization platform drivers. You may be charged for data stored in Object Storage Service (OSS) and snapshots. For more information, see Snapshot billing and Overview in OSS documentation.

Image creation procedure

The preceding image creation methods (except importing a local custom image) depend on the status and application data of an ECS instance at a specific point in time. OOS and Packer automate the image creation procedure by automatically creating a temporary instance and releasing it after the creation, making them more suitable for agile development.

The image creation procedure varies depending on the method you choose:
  • If you use OOS to update a custom image, you must select a public template (such as ACS-ECS-UpdateImage) or customize an O&M task template. You can view the process on the YAML, JSON, or Graphical Template tab of OOS in the ECS console.
  • If you plan to create a custom image by using a snapshot or an ECS instance, you must use an existing snapshot or a running ECS instance in the ECS console. After the image is created, you must release the temporary ECS instance you created for building the custom image.
  • If you use Packer to create a custom image, you must write scripts by using a JSON template such as the image builder.
  • If you plan to create and import a local custom image, you must first configure a virtual machine (such as VirtualBox VM) by following the custom image importing instructions, and then use OSS to import the image to ECS. For more information, see Instructions for importing images.