All Products
Search
Document Center

Elastic Compute Service:Initialization tools

Last Updated:Apr 27, 2026

ECS instances use initialization tools to auto-configure networking, hostnames, and scripts on creation or startup. Linux uses cloud-init; Windows uses Vminit.

Cloud-init

Linux instances use the open source cloud-init tool for automatic initialization. See Cloud-init documentation.

  • Cloud-init defines modules, each with a name, running frequency, and configuration parameters. The two main frequencies are once-per-instance (runs only on first startup) and always (runs on every startup). See Module reference.

  • Cloud-init uses /etc/cloud/cloud.cfg to control initialization behavior, such as which modules to run. Modules retrieve metadata (instance ID, hostname, etc.) from the metadata service. For example, the Set Hostname module obtains and applies the hostname from the metadata service on startup.

Note

Cloud-init is preinstalled in all Alibaba Cloud public images and custom images derived from them. For custom images based on on-premises devices, you must manually install cloud-init. See Install cloud-init.

Vminit

Windows instances use Vminit for automatic initialization. Vminit runs a series of plug-ins sequentially: some run only on first startup, others run on every startup. All plug-ins run automatically when an instance is created from a Windows image.

Note

Vminit is preinstalled in Windows public images released since September 2023 and custom images derived from them. For custom images based on on-premises devices, you must manually install Vminit. See Install Vminit.

The following table describes the 10 Vminit plug-ins.

Note

This plug-in list applies to Windows public images released since September 2023 and custom images derived from them. Other images may include different plug-ins.

Vminit plug-ins

Plug-in name

Execution frequency

Feature

Description

Plugin_Main_StartDepend

First startup only.

Starts the IP Helper service, DHCP client, and Windows Time service (W32Time).

These services are enabled by default in Windows images. If disabled in custom images, the plug-in re-enables them to prevent network and NTP exceptions.

Plugin_Main_OpenRDP

Enables Remote Desktop Protocol (RDP) connections to the instance.

RDP is enabled by default. The plug-in re-enables RDP if it was disabled in a custom image.

Plugin_Main_NetworkClean

Initializes network configurations. Uses DHCP to obtain IP addresses and DNS settings for all network interfaces.

If the IP Helper or DHCP services are not running, this plug-in may fail, preventing access to instance metadata over the internal network.

Plugin_Main_ConfigDisk

Initializes data disks created with the instance: partitions the disk and assigns drive letters. Uses GPT partition format by default.

  • If a new (empty) data disk is attached during instance creation, the plug-in automatically initializes and brings it online.

  • If a data disk with existing data is attached during instance creation, Vminit skips initialization.

Plugin_Main_ExtendVolume

Detects available space on the system disk and runs diskpart to extend it.

None.

Plugin_Main_CloudinitUserData

Retrieves instance user data from the metadata service and executes the user data script under the system account.

Plugin_Main_ConfigHostname

Every startup.

Assigns a hostname to the instance. If you specify a hostname during instance creation, that hostname is used. Otherwise, a random hostname is assigned.

  • The OS restarts immediately after this plug-in runs.

  • If the auto-assigned hostname matches the specified hostname, no redundant assignment occurs.

  • To prevent hostname conflicts with a custom image's own startup script, disable this plug-in in the custom image.

Plugin_Main_ConfigWsus

Retrieves the WSUS address from the metadata service and configures it on the instance. Skips configuration if the address is already set.

Requires internal network access.

Plugin_Main_ConfigKms

Retrieves the KMS endpoint from the metadata service and activates KMS. Skips activation if KMS is already active with the same endpoint.

Requires internal network access.

Plugin_Main_ConfigNtp

Retrieves the NTP server address from the metadata service and configures time synchronization. Skips configuration if the address is already set.

  • Requires internal network access.

  • Requires the W32Time service.

Release notes

The following table lists Vminit version history.

Vminit version

Release content

Release date

2.0.1.8

  • Fixed several issues to improve stability and reliability.

  • Added support for Windows desktop operating systems: Windows 7, Windows 8, Windows 10, and Windows 11.

July 2025

2.0.1.6

  • Reduced the number of restarts during instance creation from an Alibaba Cloud image.

  • Fixed an issue where instances could continuously reboot if a custom image included a startup script that modifies the hostname.

September 2024

2.0.1.2

  • Cleared error alerts in Windows Event Manager.

  • Added support for delay variables in user data batch scripts.

January 2024

2.0.1.0

First release. Introduced configurable plug-ins.

September 2023

References

Initialize with instance user data to configure an instance at creation time.

To install and configure initialization tools for custom images, see Install cloud-init and Install Vminit.