You may need to restart Elastic Compute Service (ECS) instances, usually for maintenance purposes, such as to apply system updates or to save and apply configurations. This topic describes how to restart an instance in the ECS console or by calling an API operation.
The restart operation stops the instance for a short period of time and may interrupt services that are running on the instance. We recommend that you restart the instance during off-peak hours.
Prerequisites
The instances that you want to restart are in the Running state.
We recommend that you restart an instance in the ECS console or calling an API operation instead of running the reboot command in the operating system of the instance. In specific scenarios, such as offline resizing, hostname modification, and reporting of system O&M events, the reboot command is invalid when you run this command to restart an ECS instance.
Restart an instance in the ECS console
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Restart one or more instances based on your business requirements.
To restart a single instance, find the instance and choose
in the Actions column.To restart multiple instances, select one or more instances and click
in the lower part of this page.
In the Restart Instance dialog box, select or unselect Force Restart, and then click Confirm.
If you select Force Restart, the instances are forcefully restarted. This may result in the loss of unsaved data.
If you do not select Force Restart, the instances are normally restarted.
Restart an instance by calling an API operation
You can restart one or more ECS instances by calling the following OpenAPI operations. For information about OpenAPI, see Integration overview.
To restart a single ECS instance that is in the Running state, call the RebootInstance operation.
To restart one or more ECS instances that are in the Running state, call the RebootInstances operation.
To reactivate a pay-as-you-go ECS instance that has expired or has been recycled due to overdue payments, see ReActivateInstances.