This topic describes how to create and configure Elastic Compute Service (ECS) instances on a dedicated host.

Prerequisites

Before you create ECS instances on a dedicated host, the following conditions must be met:
  • A dedicated host is created. For more information, see Create a dedicated host.
  • To create ECS instances for a region in mainland China, you must complete the real-name verification. For more information, see Real-name verification FAQ.
  • An IPv4 virtual private cloud (VPC) is created in the region where the dedicated host resides. For more information, see Create an IPv4 VPC network.
  • If you do not use the default security group, you must create a security group in the target region and add rules to the created security group. For more information, see Create a security group and Add security group rules.
  • If you need to associate an SSH key pair with a Linux ECS instance, you must create an SSH key pair in the region where the dedicated host resides. For more information, see Create an SSH key pair.
  • If you need to configure user data, you must prepare scripts about the startup behavior of the instances. For more information, see Prepare user data.
  • Before an ECS instance can assume a RAM role, you must create the RAM role and authorize the ECS instance to assume the role. For more information, see Bind an instance RAM role.

Background information

Only VPC-connected ECS instances can be created on a dedicated host. The ECS instances on a dedicated host have different features from the ECS instances on a shared host. For more information, see Comparisons of ECS instances on a dedicated host and a shared host.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Dedicated Hosts.
  3. In the top navigation bar, select a region.
  4. Find the dedicated host on which you want to create ECS instances. In the Actions column, click Create Instance.
  5. Specify the parameters in the Basic Configurations step.
    1. Select a Dedicated Host.
      By default, the dedicated host that you previously selected on the Dedicated Hosts page is used. You can select a different dedicated host.
    2. Select or clear the Associate with DDH option. This option specifies whether the instance is still deployed on the current dedicated host if the instance is stopped, released, or restarted.
      • If you select the Associate with DDH option, the instance is deployed on the current dedicated host. If the resources of the dedicated host are insufficient, the instance fails to be restarted.
      • If you clear the Associate with DDH option, the instance is deployed on another dedicated host of your Alibaba Cloud account if the resources of the current dedicated host are insufficient. The dedicated host must be available for automatic instance deployment. For more information, see Host association.
    3. Select a Billing Method.

      Select a billing method for the ECS instances based on the billing method of the dedicated host. You can select Subscription or Pay-As-You-Go as the billing method of ECS instances that run on a subscription dedicated host.

    4. Specify the type and quantity of the ECS instances.
      The region and zone of the ECS instance must be the same as those of the dedicated host. The available instance types depend on the type and available computing resources of the dedicated host. For more information about dedicated host types, see Dedicated host types.
      • If the dedicated host supports only predefined instance types, click Predefined Instance Type. Then, select the instance type in the Instance Type section.ECS instance type
      • If the dedicated host supports custom instance types, click Custom Instance Type. Then, you can adjust the sliders to specify the number of vCPUs and the size of the memory. The minimum number of vCPUs is 1. If more than one vCPUs are required, you must set this parameter to an even number, for example, 2 or 4. The minimum size of the memory is 1 GiB. Custom instance type
    5. Select an image.
      You can select a public image, custom image, shared image, or an image that is purchased from Alibaba Cloud Marketplace. For more information, see Select an image.
      Note
      • To associate the SSH key pair with the ECS instance, you must select a Linux operating system from the drop-down list for the image.
      • To configure user data of the instance, you must select an image that supports user data. For more information, see Manage user data.
    6. Configure the storage.
      • System Disk: Required. The system disk is used to install the operating system. You must specify the type and capacity of the system disk.
        • Disk Type: All available types of disks in the target region are listed in this section.
        • Capacity: The default capacity of the system disk is 40 GiB. The maximum capacity is 500 GiB. If the size of the selected image is larger than 40 GiB, the image size is the default value. The minimum size of the system disk is related to the image that you selected. The minimum size is displayed on the buy page.
          Operating system image System disk capacity (GiB)
          Linux (excluding CoreOS and Red Hat Enterprise Linux) [max{20, image size}, 500]
          FreeBSD [max{30, image size}, 500]
          CoreOS [max{30, image size}, 500]
          Red Hat [max{40, image size}, 500]
          Windows [max{40, image size}, 500]
      • Data Disk: To add data disks, you must specify the disk type, capacity, and quantity. You must also specify whether to enable disk encryption. You can add an empty data disk or use a snapshot to add a data disk. You can add up to 16 data disks.
        Note The data disk has the following features:
        • The billing method of the data disk is the same as that of the instance.
        • If the data disk is a subscription data disk, it can be released only when the instance is released. If the data disk is a pay-as-you-go data disk, it can be released separately or when the instance is released.
      • If you create an instance from an instance family with local SSDs (such as the i2 type), the information of the local SSDs is displayed and cannot be modified. For more information about the local SSDs of an instance family, see Instance families.
    7. Click Next: Networking.
  6. Specify the parameters in the Networking step.
    1. Select a Network Type.
      You can select only VPC as the network type. Select a VPC and VSwitch from the drop-down lists. If no VPC or VSwitch is created, you can use the default VPC or VSwitch.
    2. Specify whether to assign a Public IP Address to the instance.
      • If you want 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 billing method of the public bandwidth, and specify the bandwidth. The public IP address cannot be detached from the instance. For more information about the billing method of public bandwidth, see Billing methods of public bandwidth.
      • If the instance does not need to access the public network or the instance uses an Elastic IP address to access the public network, do not select Assign Public IP Address.
    3. Select a Security Group.
      Select a security group whose rules meet your business requirements.
      Note If no security group is created, you can use the default security group. For more information, see Default security group rules.
    4. Add an Elastic Network Interface.
      If the selected instance type supports Elastic Network Interface (ENI), you can add an ENI and select a VSwitch for the ENI.
      Note By default, the ENI is released together with the instance. You can also call the DetachNetworkInterface operation to detach the ENI from the instance.
    5. Click Next: System Configurations.
  7. Optional:Specify the parameters in the System Configurations step.
    1. Select and configure Logon Credentials.
      You can specify a key pair and password. You can also select Set Later to configure the logon credential after the instance is created. Select a logon credential based on the operating system of the image.
      • Linux: You can use a key pair or password as the logon credential.
      • Windows: You can use only a password as the logon credential.
    2. Specify the Instance Name and Host.
    3. Set the parameters in the Advanced section.
      • RAM Role: You can assign a RAM role to the instance.
      • User Data: You can customize the startup behavior of the instance or transfer data to the instance.
    4. Click Next: Grouping.
  8. Optional:Specify the parameters in the Grouping step.
    • If you have multiple instances, we recommend that you tag the instances for easy identification.
    • If you are an enterprise user, and you have activated Resource Management and created resource groups, you can manage instances by using the resource groups.
  9. Confirm the order and create the ECS instances.
    1. In the Configurations Selected section, confirm the configurations of the instances.
      You can click the icon to modify the configurations.
    2. Configure the release or renewal of the ECS instances based on the billing method.
      • If the billing method of the instances is Subscription, you must specify the duration, and specify whether to turn on the Enable Auto-renewal switch.
        Note The expiration date of the subscription instances cannot be later than that of the subscription dedicated host.
      • If the billing method of the instances is Pay-As-You-Go, you can select Automatic Release and specify the time to automatically release the instances.
    3. Confirm the Total cost in the lower-right corner of the page. The total cost includes the cost of the image, data disks, and public network bandwidth.
    4. Read and accept the ECS Terms of Service.
    5. Proceed based on the billing method of the ECS instances:
      • If the billing method of the ECS instances is Subscription, click Create Order.
      • If the billing method of the ECS instances is Pay-As-You-Go, click Create Instance.

Result

After the instances are created, click Console in the upper-right corner of the page to go back to the ECS console. On the Instances page, select the region where the created instances reside. Then, you can view the instance ID, public IP address, and private IP address of the created instances. To view the information of the dedicated host where each ECS instance is created, perform the following operations: Click the Column Filters button. In the Column Filters dialog box, select the Dedicated Host option and click OK.
Note For more information about Column Filters, see Migrate ECS instances between different dedicated hosts.

What to do next