Create an ECS instance by using Custom Launch

更新时间:
复制 MD 格式

Unlike quick launch, Custom Launch gives you full control over your instance configuration. You can select the image, instance type, storage, bandwidth, and security group to match your business needs. This topic shows you how to create an ECS instance by using Custom Launch.

Important

If you are new to ECS and want to create an instance quickly, see the simpler example in Create and use an ECS instance in the console to understand the basic process. Once you are familiar with ECS, you can use this topic for detailed configuration instructions.

Prerequisites

  • You have registered an Alibaba Cloud account for the China site and completed account verification. For more information, see Alibaba Cloud account registration process.

  • When you create pay-as-you-go ECS resources, the total value of your Alibaba Cloud account balance (including cash and vouchers) must be at least CNY 100.00. For information about how to top up your account, see Online top-up.

Procedure

  1. Go to the instance buy page.

  2. Click the Custom Launch tab.

  3. Configure settings such as the billing method, region, instance type, and image.

    For a detailed explanation of each parameter, see Parameters.

  4. Before you create the instance, review the overall configuration in the panel on the right. Configure options such as the usage duration to make sure that the settings meet your requirements.

  5. Read and accept service agreements such as the Elastic Compute Service (ECS) Terms of Service. If you have already accepted them, you are not prompted to accept them again. Then, click Confirm Order.

    Instance creation typically takes 3 to 5 minutes. You can go to the Instances page in the ECS console to check the status of the instance. When the instance status changes to Running, the instance is ready for use.

Parameters

Billing method

The billing method determines the charging rules for an instance and affects how its resource state can change.

Billing method

Description

Related topics

Subscription

Pay upfront before use, with a minimum duration of one week. This method is ideal for long-term, stable workloads, such as 24/7 web services and database services.

Subscription

Pay-as-you-go

Pay for what you use with per-second billing. This method allows you to purchase and release resources on demand. It is ideal for workloads with significant fluctuations, such as temporary scaling, testing, and flash sales.

Note

We recommend using savings plans and reserved instances to optimize your costs.

Spot Instance

A type of pay-as-you-go instance that allows you to bid for unused computing capacity. You can save up to 90% compared with regular pay-as-you-go instances. Spot Instances may be automatically released due to market price fluctuations or insufficient inventory of the specified instance type. This method is ideal for stateless, fault-tolerant, and interruption-tolerant applications, such as testing and real-time analytics.

Spot Instances

Region

A region is the geographical location of a data center. Select a region close to your users to reduce network latency. You cannot change the region after an instance is created. For more information, see Regions and zones.

Network and zone

We recommend using a Virtual Private Cloud (VPC). VPCs are logically isolated network environments that provide enhanced security and support features such as Elastic IP Addresses (EIPs), elastic network interfaces, and IPv6.

A zone is a physical area within a region that has independent power and networking. Instances in the same zone have lower network latency and provide faster access for users.

Network type

Description

Related topics

VPC

A VPC is an isolated network environment that you can define on Alibaba Cloud. You have full control over your VPC, such as specifying IP address ranges and configuring route tables and gateways.

If you do not need to customize VPC settings during instance creation, you can skip this step. The system automatically creates a default VPC and vSwitch.

Select an existing VPC and vSwitch, or click Create VPC or Create vSwitch to go to the VPC console and create them. After creating them, return to the ECS instance creation page and click the refresh icon to refresh the VPC and vSwitch lists.

Note

If you need to assign an IPv6 address to the instance, select a VPC and vSwitch for which an IPv6 CIDR block is enabled.

Instance and image

The instance type and image determine the basic attributes of an instance, such as vCPUs, memory, and the operating system.

Instance type

Available instance types vary by factors such as the region. Go to the Instance types available for purchase page to view the instance types that you can create.

If you have specific configuration requirements, such as attaching multiple elastic network interfaces, using ESSDs, or using local disks, make sure that the selected instance type supports these features. For more information about the features, use cases, and specifications of instance families, see Instance families.

If you set Billing Method to Spot Instance, configure the usage duration and maximum price.

  • Instance Usage Duration: specifies the protection period for a Spot Instance. After the protection period ends, the instance may be automatically released due to market price fluctuations or insufficient inventory of the instance type.

    Duration

    Description

    1 Hour

    The Spot Instance is protected for one hour after it is created and will not be automatically released during this period.

    None

    The Spot Instance has no protection period after creation but is more cost-effective than a Spot Instance with a protection period.

  • Highest Price per Instance:

    Maximum price

    Description

    Use Automatic Bid

    Always use the real-time market price for the instance type. The market price does not exceed the price of the corresponding pay-as-you-go instance. This option prevents the Spot Instance from being released because the market price exceeds your bid, but it does not prevent release due to insufficient inventory of the instance type.

    Set Maximum Price

    Enter a specific price cap. The Spot Instance is automatically released if the real-time market price exceeds your cap or if inventory becomes insufficient.

Image

An image provides the necessary information to run an instance. Alibaba Cloud offers the image sources described in the following table.

Image source

Description

Related topics

Public Images

Base images officially provided by Alibaba Cloud. All images are fully licensed and include Windows Server images and mainstream Linux distributions.

Note

If you select a g8y, c8y, or r8y (Yitian) instance family and an Alibaba Cloud Linux image, you can enable application acceleration for the instance to improve performance. For more information, see Application performance acceleration.

Public images

Custom Images

Images that you create or import. They contain initial system environments, application environments, and software configurations, which helps save time on repeated configurations.

Overview of custom images

Share an image

Custom images shared by other Alibaba Cloud accounts. This allows you to create instances from the same image across different accounts.

Share custom images

Marketplace Images

Alibaba Cloud Marketplace offers a variety of rigorously reviewed images that allow you to deploy ECS instances for website building or application development with a single click.

Marketplace images

Community Images

Publicly available images. You can publish your custom images as community images for others to use, or you can use community images published by others.

Community images

You can also use the global image search feature to find and filter images. Click the image icon to open the Image Catalog dialog box, where you can find the image that you need to create an ECS instance. For more information, see Image catalog.

Note

When you create an ECS instance, some images, including custom images, may not be visible due to incompatibilities between the image and the instance type features or processor. For troubleshooting, see Why am I unable to find specific images when I create an ECS instance?

Storage

Instances gain storage by adding system disks, data disks, elastic ephemeral disks, and Apsara File Storage NAS (NAS) file systems. ECS offers both cloud disks and local disks to meet the requirements of different scenarios.

  • Cloud disks can be used as system disks and data disks. Types include ESSDs, standard SSDs, and ultra disks. For more information, see Disks overview.

    Note

    A cloud disk created with an instance has the same billing method as the instance.

  • Local disks can be used only as data disks. If the instance type is equipped with local disks, such as local SSD or big data instance families, the local disk information is displayed on the page. For more information, see Local disks.

    Note

    You cannot manually attach local disks to an instance.

System disk

The system disk is used to install the operating system. The default capacity is 40 GiB, but the minimum configurable capacity depends on the image type, as shown in the following table.

Image

Capacity range (GiB)

Linux (excluding FreeBSD and Red Hat)

[max{20, image size}, 2048]

FreeBSD

[max{30, image size}, 2048]

Red Hat

[max{40, image size}, 2048]

Windows

[max{40, image size}, 2048]

(Optional) Data disk

Data disks are used to store application data. When you select a data disk, you can also encrypt the cloud disk to meet data security or regulatory compliance requirements. For more information about data encryption, see Encryption.

Note

The number of data disks that can be attached to a single instance is limited. For more information, see Block storage limits.

(Optional) Snapshots

A snapshot is a backup of a cloud disk's data at a specific point in time. Creating a cloud disk from a snapshot is an efficient way to import data. You can enable automatic backups for cloud disks during instance creation to protect against data loss from accidental deletion.

Select an existing automatic snapshot policy, or click Create Automatic Snapshot Policy to go to the Snapshot page and create one. For more information, see Create an automatic snapshot policy. After the policy is created, return to the ECS instance creation page and click the refresh icon to refresh the automatic snapshot policy list.

Important

Snapshots incur fees. For more information, see Snapshot billing.

(Optional) Elastic ephemeral disk

An elastic ephemeral disk is a block storage device that can be created with an instance or separately. You can customize its capacity for temporary data storage. It provides high performance and is cost-effective. For more information, see Elastic ephemeral disks.

(Optional) Apsara File Storage NAS

If you need to share a large amount of data among multiple instances, we recommend that you use a NAS file system to reduce data copying and synchronization costs.

Select an existing NAS file system, or click Create File System to go to the NAS console and create one. For more information, see Create a General-purpose NAS file system in the console. After the file system is created, return to the ECS instance creation page and click the refresh icon to refresh the NAS file system list. For information about how to mount a NAS file system, see Mount a NAS file system when you purchase an ECS instance.

Bandwidth and security groups

Network and security group settings provide public network access, communication with other Alibaba Cloud resources, and network security for your instance.

(Optional) Public IP

An instance must have a public IP address to communicate with the internet. You can automatically assign a fixed public IP address when you create the instance, or configure one later using an EIP or NAT gateway. EIPs and NAT gateways must be purchased separately. For more information, see What is an Elastic IP Address? and What is a NAT Gateway?.

Select Assign Public IPv4 Address, and set Bandwidth Billing Method and Bandwidth or Maximum Bandwidth.

For detailed rules on public bandwidth billing, see Public bandwidth billing.

Billing method

Description

Pay-by-bandwidth

Charges are based on a fixed bandwidth that you specify. The actual outbound bandwidth does not exceed this value.

  • This method is suitable for business scenarios with stable network bandwidth requirements.

  • If your ECS instance has high usage, requires prolonged bandwidth, or has a bandwidth utilization rate that is higher than 10%, we recommend that you select this billing method.

Pay-by-traffic

Charges are based on the actual data transferred. To avoid high traffic fees, you can set a peak outbound bandwidth.

  • This method is suitable for business scenarios with highly variable network bandwidth demands.

  • If your public bandwidth utilization is not higher than 10% and traffic is low during off-peak hours but fluctuates significantly during peak hours, we recommend that you select this billing method.

(Optional): Select Upgrade to CDT for Data Transfer Billing. Cloud Data Transfer (CDT) provides an efficient and economical solution for managing public bandwidth costs with flexible billing, free data transfer quotas, tiered pricing, and unified billing across multiple products. It offers discounts compared with the standard pay-as-you-go method. For more information, see What is Cloud Data Transfer (CDT)?

Important
  • Beginning 00:00:00 on December 12, 2024, you can use CDT without the need to activate CDT.

  • After you enable CDT for cloud services, all existing and new pay-by-data-transfer instances are billed by CDT. Pay-by-bandwidth instances continue to be billed by the original Alibaba Cloud services. You can query your CDT bills on the Bill Details page in the Expenses and Costs console.

  • After you activate CDT, CDT allocates you a quota on free Internet data transfers of 220 GB per month. Among the 220 GB of free Internet data transfers, 20 GB can be used in regions in the Chinese mainland, and the other 200 GB can be used only in regions outside the Chinese mainland.

Security group

A security group acts as a virtual firewall that controls inbound and outbound traffic for instances within the group. For more information, see Security groups overview.

If no security group exists in the selected VPC, the system creates a default security group. By default, the security group allows inbound traffic on ports 22 and 3389, and via the ICMP protocol. You can also allow traffic on ports 80 and 443 as needed, or modify the security group rules after creation.

You can also select an existing security group or create a Create Security Group. When you create a new security group, you must configure the Security Group Name, Security Group Type, and Open IPv4 Ports/Protocols.

Note

For a detailed description of security group settings, see Create a security group.

(Optional) Elastic Network Interface (ENI)

An elastic network interface can be a primary ENI or a secondary ENI. The primary ENI cannot be unbound from the instance and is created and released with the instance. Secondary ENIs can be freely bound to and unbound from instances, allowing you to shift network traffic between them. To create a secondary ENI along with the instance, click the add-nic icon and select the vSwitch for the secondary ENI.

Note

You can add only one secondary ENI during instance creation. You can create and bind additional secondary ENIs after the instance is created. For the number of ENIs supported by each instance type, see Instance families.

(Optional) IPv6

IPv6 provides a vast number of addresses, solving IP address exhaustion and removing connection barriers for various devices.

Select Assign IPv6 Address Free of Charge. After an IPv6 address is assigned, you must log on to the instance and configure the IPv6 address in the operating system to use it. For instructions, see IPv6 communication.

Management settings

Management settings, including logon credentials and tags, are used for remote connections and for searching and managing resources.

Logon credentials

Logon Credential are used to securely log on to an instance. For more information about instance connection methods, see Connect to an ECS instance.

Method

Description

Key Pair

Note

Only Linux instances support key pair authentication.

Select a username for logon and an existing key pair, or click Create Key Pair to create one. After creating the key pair, return to the ECS instance creation page and click the refresh icon to refresh the list. For instructions, see Create an SSH key pair.

You can set the username to root or ecs-user.

Warning

The root user has the highest operating system privileges. Using root as the username can pose security risks. We recommend that you use the standard user ecs-user.

Use Predefined Password

Note

This authentication method is supported only for Custom Image and Shared Image.

You can use the preset password of the selected image for logon. Make sure that a password is set in the selected image.

Password

Enter and confirm a password. The username for password-based logon is determined as follows:

  • Linux instances: You can set the username to root or ecs-user.

    Warning

    The root user has the highest operating system privileges. Using root as the username can pose security risks. We recommend that you use the standard user ecs-user.

  • Windows instances: The default username is administrator.

Set Later

After the instance is created, you can bind a key pair or reset the instance password. For instructions, see Bind an SSH key pair to an instance and Reset the logon password of an instance.

(Optional) Tags

A Tag is a key-value pair for identifying the created instances, cloud disks, and primary ENIs. Tags make resources easier to search for and manage. You can select an existing tag or enter a tag key and value to create one. For more information about tags, see Tags.

(Optional) Advanced options

Advanced options, including hostname, instance metadata, and user data, are used to customize how the instance is displayed and used in the console and operating system.

Parameter

Description

Instance Name, Description, Host Name, and Sequential Suffix

When you create multiple instances, you can set sequential instance names and hostnames to easily identify them. For rules on setting sequential names, see Batch configure sequential names or hostnames for multiple instances.

Instance RAM Role

An instance RAM role grants the instance permissions to access specified cloud service APIs and manage specified cloud resources by using a temporary Security Token Service (STS) token. This method is more secure.

Select an existing instance RAM role, or click Create Instance RAM Role to go to the RAM console and create one. After the role is created, return to the ECS instance creation page and click the refresh icon to refresh the list. For instructions, see Create an instance RAM role and grant permissions to the role.

Metadata Access Mode

Instance metadata contains information about the instance in the Alibaba Cloud system. You can view instance metadata from within a running instance and use it to configure or manage the instance. For information about how to view instance metadata, see Instance metadata.

User Data

User data can be passed to an instance as a script to be executed upon startup for automated configuration, or it can be passed as regular data. For more information, see Customize the initialization configuration for an instance.

Enter your user data. If the user data is Base64-encoded, select Enter Based64-encoded Content.

Resource Group

Resource groups allow you to manage resources across regions and products from a business perspective and to manage permissions for each group. For more information, see Resource groups.

Select an existing resource group, or click Create Resource Group to go to the Resource Management console and create one. After the group is created, return to the ECS instance creation page and click the refresh icon to refresh the list. For instructions, see Create a resource group.

Deployment Sets

Deployment sets provide high availability by distributing instances across different physical servers. This approach ensures business continuity and supports disaster recovery.

Select an existing deployment set, or click Manage Deployment Sets to create one. After the set is created, return to the ECS instance creation page and click the refresh icon to refresh the list. For instructions, see Deployment sets.

Dedicated Hosts

A Dedicated Host is a physical server that is exclusively used by a single tenant. It offers advantages such as meeting strict security and compliance requirements and allowing you to bring your own licenses (BYOL).

Select an existing Dedicated Host, or click Create Dedicated Host to create one. After the host is created, return to the ECS instance creation page and click the refresh icon to refresh the list. For instructions, see Create a DDH.

Private Pool Type

After creating an elasticity assurance or capacity reservation, the system automatically generates a private pool to reserve a specified number of instances with specific attributes. Creating instances from an associated private pool ensures resource availability. For more information, see Overview of Resource Advisor.

Note

Elasticity assurances and capacity reservations only guarantee resource availability for pay-as-you-go instances.

  • Open: The system prioritizes using capacity from an open-type private pool. If the open-type private pool has no available capacity, the system attempts to use capacity from the public pool.

  • Do Not Use: The system does not use capacity from any private pool.

  • Targeted: You must specify the ID of a dedicated or open-type private pool. The system uses capacity from this pool to create the instance. If the specified private pool has no available capacity, the instance fails to be created.

Next steps