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 regularly 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 image creation process
None Resources such as instances, cloud disks, and snapshots may incur fees. For more information, see Billing overview.
Easy operations in the ECS console
  • Image creation procedure becomes complex as more pre-installed software is added.
  • Difficult to ensure correct and consistent manual operations
  • High maintenance cost
Snapshots may incur fees. For more information, see Billing of snapshots.
Use Packer to create custom images Open-source tool that can be used by most cloud service providers
  • Installation and maintenance required
  • Script compilation required
Resources such as instances, cloud disks, and snapshots may incur fees. 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. Data stored in Object Storage Service (OSS) and snapshots may incur fees. For more information, see Billing of snapshots and Billing items and methodsin 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, making them more suitable for agile development.

The image creation procedure varies depending on the method you choose:
  • If you use OOS to create 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 image creation 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 compile scripts by using a JSON template such as the image builder.
  • If you plan to import a local custom image, you must first configure a virtual machine (such as VirtualBox VM) by following the custom image importing notes, and then use OSS to import the image into your ECS. For more information, see Instructions for importing images.