This article describes how to create an ECS instance by using an existing image. If you want to create a custom image from a snapshot of a system disk, and then use the custom image to create an ECS instance, see Create an instance by using a custom image in the User Guide of Elastic Compute Service.
Before you start creating an ECS instance, you must:
- Sign up for Alibaba Cloud.
- Add a payment method.
- Register by using your real name if you want to create an ECS instance in a region inside mainland China.
- Create a VPC and VSwitch for creating an ECS instance of the VPC network. If you do not have a VPC and VSwitch, use the default one. For more information about the default VPC and VSwitch, see Default VPC and VSwitch.
- Create a security group and add security rules. If you do not have a security group, use the default one. For more information about the default security group, see Default security group rules.
- Create an SSH key pair for creating a Linux instance authenticated by using key pairs.
- Write the user-defined data for customizing the startup behaviors of an instance or passing in user-defined data.
- Create an instance RAM role and grant it permissions if you want to authorize instance to play a role.
To create an ECS instance, follow these steps:
Log on to the ECS console.
On the left-side navigation pane, select Instances.
On the Instance List page, select Create Instance.
Follow these steps to finish Basic Configurations:
Select a Billing Method: Subscription or Pay-As-You-Go. For more information about the billing methods, see Purchase ECS instances.
Select a region and a zone. For more information about regions and zones, see Regions and zones.
Select an Instance Type and specify the quantity of instances. The available instance type families are determined by the selected region. For the scenarios of each instance type family, see Instance type families.
- For the quota of Pay-As-You-Go instances for each account, see Limits.
- To use elastic network interfaces, select an enterprise-level instance type with no less than two vCPU cores or an entry-level instance type with no less than four vCPU cores. For more information about the number of elastic network interfaces supported by instance types, see Elastic network interfaces.
- To use an SSD Cloud Disk, select an I/O-optimized instance.
Select an Image. You can select an image from the list of Public Image, Custom Image, Shared Image, or Marketplace Image.
- To use an SSH key pair, select a Linux image.
- To use user-defined data, select an image according to the list described in the User-defined data.
System Disk: Required. A system disk is required for the image. You can specify the cloud disk category and size for the system disk. The available categories are determined by the selected region. The default size is 40 GB.
Data Disk: Optional. You can decide to add data disks now or after the instance is created. To add a data disk now, specify the category, size, and quantity of data disks. You can create an empty data disk or create a data disk from a snapshot. Up to 16 data disks can be added.
Note: The data disks added here have the same billing method with that of the instance. A Subscription data disk is released along with the instance, but a Pay-As-You-Go data disk can be set to be released along with the instance.
Local storage: If you have selected an instance type that has local disks, such as instance type of the i1, d1, or d1ne family, the local storage information is displayed. You cannot specify the quantity or category of local storage, which is determined by the selected instance type. For more information, see Instance type families.
Click Next: Networking to finish the networking and security group configuration:
Select a Network: Use the default VPC (Virtual Private Cloud), and then select a VPC and a VSwitch. If you do not have a VPC and a VSwitch, you can use the default ones.
Note: To improve the user experience on network, Alibaba Cloud initiated the default VPC strategy that VPC is set as the default network type since 12:00 June 16, 2016 (UTC+8). If the switch has not started in your region, you can still create ECS instances of the Classic network. Otherwise, the VPC is the only one option.
Configure Network Billing Method:
- To assign a public IP address to the instance, select Assign public IP and specify a non-zero value as the bandwidth. PayByTraffic is the only one option for the network billing method. You cannot unbind the assigned public IP address from the instance. For more information about network billing, see Billing of network bandwidth.
- To use elastic public IP (EIP) address for Internet access, do not select Assign public IP. You can unbind an EIP address from an instance.
Select a security group. You can use the default security group. For more information, see Default security group rules.
Add an elastic network interface. If your selected instance type supports elastic network interfaces, you can add one and specify a VSwitch for it. By default, the elastic network interface is released along with the instance. You can detach it from the instance in the ECS console or by using the DetachNetworkInterface interface.
(Optional) Click Next: System Configurations to finish the following configuration:
Select and set Log on Credentials. You can select a password or an SSH key pair as a credential for a Linux instance, but only a password for a Windows instance. You can set the credential after the instance is created.
Specify the instance name, which is displayed in the ECS console, and the host name, which is displayed inside the guest operating system.
Set Advanced configurations, such as instance RAM role and user-defined data.
(Optional) Click Next: Grouping. You can add tags to the instance to simplify future management.
Click Next: Preview to confirm the order:
(Optional) In the Configurations Selected area, confirm all the configurations. You can change settings.
(Optional) If you are creating a Pay-As-You-Go instance, you can select Auto Release Schedule and set the release plan.
(Optional) If you are creating a Subscription instance, you can specify the Purchase cycle and select Auto-Renew.
Confirm Instance Cost, which is the sum of the cost of the instance type (vCPU + RAM), the system disk, the data disks (if any), and the local disks (if any). If a public IP address is assigned, Public traffic fee is displayed.
Confirm ECS Service Terms and Product Terms of Service.
Click Create Order and activate the instance by following the prompts.
When the instance is activated, you can go to the ECS console to view the instance details, such as the instance name, the public IP address, and the private IP address.
You can create an FTP site on the instance for transferring files. For more information, see Build an FTP site on an ECS instance.
If a data disk is created along with the instance, you must partition the disk and format the partitions. If the instance is based on a Linux OS, see Format and mount a data disk. If the instance is based on a Windows OS, see Format a data disk. If you create a data disk separately, you must attach the disk, and then partition and format the disk.