This topic describes how to create an ECS instance by using the wizard in the ECS console. To create an ECS instance, you must specify the instance type, image, storage, network, and security group. The wizard provides a variety of extended configuration functions to meet your custom deployment and management requirements.

Prerequisites

You must complete the following preparations to create an ECS instance:
  1. Create an account and complete the account information.
  2. Alibaba Cloud provides a default Virtual Private Cloud (VPC). If you do not want to use the default VPC, you can create a VPC and a VSwitch in the target region. For more information, see Create an IPv4 VPC.
  3. Alibaba Cloud provides a default security group. If you do not want to use the default security group, you can create a security group in the target region where the instance is created. For more information, see Create a security group.
If you need other extended functions, you must complete corresponding preparations:
  • To specify an SSH key pair when creating a Linux instance, you must create an SSH key pair in the target region. For more information, see Create an SSH key pair.
  • To configure user data, you must first prepare user data. For more information about how to prepare user data, see User data.
  • To associate an ECS instance with an instance RAM role, you must create the instance RAM role, assign a permission policy to the role, and bind the role to the instance. For more information, see Bind an instance RAM role.

Procedure

  1. Go to the ECS Custom Launch tab.
  2. Perform the following steps in the Basic Configurations section:
    1. Set Billing Method to Subscription, Pay-As-You-Go, or Preemptible Instance.
      Note For information about how to create a preemptible instance, see Create a preemptible instance.
    2. Select a region and zone.

      By default, a zone is randomly assigned by the system. You can select a zone based on your business requirements. For more information about how to select a region and zone, see Regions and zones.

      Note You cannot change the region or zone after the instance is created.
    3. Select an instance type and specify the number of instances.

      Instance types that are available are determined by the region that you select. You can go to the ECS Instance Types Available for Each Region page to view the instance types available in each region. For information about the scenarios for each instance type, see Instance families.

      Note
      • The quota of pay-as-you-go or preemptible instances for your account is displayed on the page.
      • To use Elastic Network Interfaces (ENIs), select an enterprise-level instance type with no less than two vCPUs, or an entry-level instance type with no less than four vCPUs. For more information about the maximum number of ENIs that can be attached to instances of each instance type, see Instance families.
      • To use a standard SSD, select an I/O optimized instance.
    4. Select an image. You can select an image from the Public Image, Custom Image, Shared Image, or Marketplace Image tab.
      Note
      • To use an SSH key pair, you must select a Linux image.
      • To configure user data, you can select only specified images. For more information, see User data.
      • To use a Red Hat images of public images, you must make sure that the instance family supports Red Hat images. For more information, see the "Which instance families are supported by Red Hat Enterprise Linux (RHEL) images?" topic in Which instance families do Red Hat Enterprise Linux (RHEL) images support?.
      • Public images contain only an initial system environment. You can find more images in Alibaba Cloud Marketplace.
    5. Select a storage space.
      • System Disk: Required. You must create a system disk for the operating system. Select a disk category and specify the size for the system disk.
        • Disk category: Categories are available based on the selected region and instance type.
        • Size: The default size of the system disk is 40 GiB. If the selected image file is greater than 40 GiB, the disk size is increased to support the image file. The minimum size of the system disk is related to the image. The actual size is displayed on the buy page.
          Image Range of the system disk size (GiB)
          Linux (excluding CoreOS and Red Hat) [max{20, Image file size}, 500]
          FreeBSD [max{30, Image file size}, 500]
          CoreOS [max{30, Image file size}, 500]
          Red Hat [max{40, Image file size}, 500]
          Windows [max{40, Image file size}, 500]
      • Data Disk: Optional. To create a data disk while you are creating an instance, you must select the disk type, and specify the size and quantity of the disk. You must also determine whether to encrypt the disk. For more information, see Encryption overview. You can create an empty data disk or create a data disk from a snapshot. A maximum of 16 data disks can be added each time that you create an instance.
        Note
        The data disks that are created with the instance have the following features:
        • The billing method is the same as that of the instance.
        • A subscription data disk must be released together with its instance, while a pay-as-you-go data disk can be released either separately or together with its instance.
      • If you have selected an instance family with local disks (such as i1, d1, or d1ne), the local disk information is displayed. You cannot specify the quantity or category of local disks because these settings depend on the selected instance type. For more information about the local disks that are supported by each instance type, see Instance families.
  3. Click Next: Networking to configure networking and security group for the instance.
    1. Select the network type.
      • VPC: You must select a VPC and a VSwitch. If you do not have a VPC and a VSwitch, you can use the default ones.
      • Classic: If you purchase an ECS instance for the first time after 12:00, June 16, 2016 (UTC+8), you can no longer select the classic network.
    2. Set the network billing method.
      • To assign a public IP address to the instance, you must select Assign Public IP Address. Then, select Pay-By-Traffic or Pay-By-Bandwidth as the network billing method and specify the bandwidth. Public IP addresses that are assigned this way cannot be detached from the instance. For more information about the billing methods of public bandwidth, see Billing methods of public bandwidth.
      • If your instances do not need to access the Internet or your VPC-type instances use an Elastic IP Address (EIP) to access the Internet, you do not need to assign a public IP address. You can associate an EIP with or disassociate an EIP from an instance at any time.
    3. Select a security group.
      If you have not created any security groups, you can use the default security group. For more information about rules of the default security group, see Security group overview.
    4. Add an ENI.
      If the instance type that you selected supports ENIs, you can add an ENI and specify a VSwitch.
      Note By default, the added ENI is released together with the instance. You can use the ECS console or call the DetachNetworkInterface operation to detach the ENI from the instance.
  4. Optional: Click Next: System Configurations to complete the following configurations:
    1. Select and set logon credentials.
      Select a credential based on the image:
      • Linux: You can select a password or an SSH key pair as the logon credential.
      • Windows: You can select only a password as the logon credential.

      You can also set the logon credential for an instance after the instance is created. For more information, see Reset the logon password of an instance.

    2. Specify the instance name that you want to display in the ECS console, and the hostname that can be obtained from within the guest operating system.
    3. Set advanced options.
      • RAM Role: Assign a RAM role to the instance.
      • User Data: Customize the startup behavior of the instance or pass data into the instance.
  5. Optional: Click Next: Grouping to group the instance you have created.
    1. Add tags.
      If you have created multiple instances, you can use tags to facilitate management. For more information, see Overview.
    2. Select a deployment set.
      Deployment sets are designed to manage the deployment of instances. Instances in the same deployment set are assigned to different physical servers. This policy can ensure high availability of services and is used to support the disaster recovery capability of the infrastructure. For more information, see Create a deployment set.
    3. Select a dedicated host.
      You can select Allow Automatic Deployment /AutoPlacement or specify a dedicated host.

      A dedicated host is flexible and elastic. It provides exclusive access to the resources on the cloud host. For more information, see Features.

  6. Confirm the order.
    1. In the Configurations Selected section, confirm all the configurations. You can also click the Edit icon to change the configurations.
      • Optional. Click Save as Launch Template to save your configurations as a launch template that can be used later. For more information, see Launch templates.
      • Optional. Click View Open API to view best-practice API scripts. On the left side of the page, the API Workflow section describes the API operations related to the current operation and lists the request parameters and their values. On the right side of the page, the programming language-specific SDK examples are provided. Java and Python examples are available. For more information, see Introduction.
    2. Optional: If the billing method is Pay-As-You-Go, you can set Automatic Release.
    3. Optional: If the billing method is Subscription, you can specify the duration and select whether to enable Auto-renewal.
    4. Confirm the configuration fees.
      The following table lists the billing methods for instances and instance public bandwidth that are used to calculate the fees you need to pay.
      Instance billing method Billing method for public bandwidth Billed items
      Pay-as-you-go or preemptible instance Pay-by-data-transfer Internet traffic fee and configuration fee. The configuration fee includes fees for the instance type (vCPUs and memory), the system disk, data disks (if any), and local disks (if any).
      Pay-by-bandwidth Configuration fee, including fees for the instance type (vCPUs and memory), the system disk, data disks (if any), local disks (if any), and the public bandwidth.
      Subscription Pay-by-bandwidth Configuration fee, including fees for the instance type (vCPUs and memory), the system disk, data disks (if any), local disks (if any), and the public bandwidth.
      Pay-by-data-transfer Internet traffic fee and configuration fee. The configuration fee includes fees for the instance type (vCPUs and memory), the system disk, data disks (if any), and local disks (if any).
    5. Read and confirm ECS Terms of Service.
  7. Confirm instance creation based on the instance billing method.
    • Subscription instance: Click Create Order.
    • Pay-as-you-go instance: Click Create Instance.

Result

After the instance is activated, click Console to view the instance details in the ECS console. In the Instances list of the region, you can view the information of the new instance, such as the instance name, public IP address, internal IP address, and private IP address.

What to do next