All Products
Search
Document Center

Elastic Compute Service:Stop an instance

Last Updated:Feb 21, 2025

You can stop Elastic Compute Service (ECS) instances in standard mode or economical mode.

Important

If you stop an instance, services that are running on the instance are interrupted. Proceed with caution when you perform this operation.

Stop an instance in the ECS console

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Use one of the following methods to stop one or more instances:

    • To stop a single instance, find the instance that you want to stop and choose icon1 > Instance Status > Stop in the Actions column.

      image

    • To stop one or more instances at a time, select the instances that you want to stop and choose More > Instance Status > Stop in the lower part of the Instance page.

      image

  1. Configure the Stopped By or Stop Mode parameter and click OK.

    Parameter

    Description

    Stopped By

    • Stop: stops the instance by properly shutting down the instance.

    • Force Stop: forcefully stops the instance. A force stop is equivalent to a physical shutdown and may cause data loss if instance data was not written to disks.

    Stop Mode

    Important

    Only pay-as-you-go instances that reside in virtual private clouds (VPCs) support this parameter.

    • Standard Mode: The resources of the instance are retained and continue to be billed after you stop the instance.

    • Economical Mode: After you stop the instance, the following events occur:

      • Billing for the following resources of the instance stops: computing resources (vCPUs and memory), images, and public bandwidth of the static public IP address (if any) that uses the pay-by-bandwidth metering method.

      • Billing for the following resources of the instance continues: system disk, data disks, and public bandwidth of the elastic IP address (EIP) (if any) that uses the pay-by-bandwidth metering method.

      • The vCPUs, memory, and static public IP address of the instance are reclaimed. The private IP address of the instance is retained. When you restart the instance, the restart operation may fail and the static public IP address of the instance may change.

        Important
        • The restart operation may fail. The vCPUs and memory of an instance are reclaimed when you stop the instance in economical mode. The instance may fail to restart due to insufficient resources or overdue payments. If the instance fails to restart due to insufficient resources, try again later or change the instance type of the instance. If the instance fails to be restarted due to overdue payments, add funds to your account to complete the payments. For more information, see the Risks section of the "Economical mode" topic and Overdue payments.

        • The auto-assigned public IP address of the instance may change. If an instance uses a static public IP address, the auto-assigned public IP address is reclaimed when you stop the instance in economical mode. When you restart the instance, a new public IP address is assigned to the instance, which may be different from the reclaimed auto-assigned public IP address.

    When the instance is stopped, the instance enters the Stopped state.

Stop instances by calling API operations

You can stop one or more ECS instances by calling the following API operations. For information about how to call API operations, see Integration overview.

  • StopInstance: stops an ECS instance that is in the Running state.

  • StopInstances: stops one or more ECS instances that are in the Running state.

FAQ

What do I do if an ECS instance remains in the Stopping state for an extended period of time?

If your ECS instance remains in the Stopping state for an extended period of time, the instance may be in a normal or abnormal stop process. Check the stop progress of the operating system and resolve the preceding issue based on the stop status of the operating system.

  • Normal stop: The ECS instance is being stopped as expected, and the stop process is relatively long because the operating system is installing system patches or the low operating system specifications cause the delayed stop response.

  • Abnormal stop: An instance stop exception occurs. For example, the stop process does not start because an error occurs in the operating system when you stop the instance.

Solution:

  1. View the screenshots of the ECS instance to obtain the stop progress of the operating system.

    For more information, see View system logs and screenshots.

  2. If you cannot identify the issue, connect to the instance by using Virtual Network Computing (VNC) and view the stop progress of the operating system.

    For more information, see Connect to an instance by using VNC.

  3. Select a handling method based on the stop status of the operating system.

    • Normal stop: Wait for the operating system stop process to complete.

    • Abnormal stop: If an exception occurs, connect to the instance by using VNC and manually handle the stop issue.

    You can also forcefully stop an instance based on your business requirements. For more information, see Stop an instance.

    Important

    A force stop operation is equivalent to a physical shutdown and may cause data loss if instance data is not written to disks.