Stopping and Starting Instances
You can stop a running instance at any time, and then start it again. Stopping an instance enables you, for example, to service the instance or to treat its root volume.
Stopping and Starting Instances Using Cockpit v1
Stopping an Instance
-
Click Compute > Instances.
-
Click the running instance you want to stop.
Multiselection is available.
The instance is selected.
-
Click Stop .
The STOP INSTANCE(S) confirmation dialog box appears. -
Click Stop to confirm the operation.
The state of the selected instance changes to stopping, and then to stopped once the operation is completed.If the instance does not stop, you can force it to stop. Beware that forcing an instance to stop may damage your instance system and lose data. Therefore, it is recommended to avoid using force stop. For more information about it and why the instance does not stop properly, see About Instance Lifecycle > Force Stop.
To force an instance to stop, click Stop , and then Force Stop.
Stopping and Starting VMs Using Cockpit v2-beta
Stopping a VM
-
Click inside the VMs dashboard to make checkboxes appear.
-
Check the box of the running VM you want to stop.
Multiselection is available.
The VM is selected and an action menu appears.
-
Click
Stop.
The STOP VMs confirmation dialog box appears. -
Click Submit to confirm the operation.
The state of the selected VM changes tostopping
, and then tostopped
once the operation is completed.If the VM does not stop, you can force it to stop. Beware that forcing a VM to stop may damage your VM system and lose data. Therefore, it is recommended to avoid using force stop. For more information about it and why the VM does not stop properly, see About Instance Lifecycle > Force Stop.
To force a VM to stop, click
Force Stop.
Starting a VM
-
Click inside the VMs dashboard to make checkboxes appear.
-
Check the box of the stopped VM you want to start.
Multiselection is available.
The VM is selected and an action menu appears.
-
Click
Start.
The state of the selected VM changes topending
, and then torunning
once the operation is completed.
Stopping and Starting Instances Using AWS CLI
Stopping Instances
To stop one or more instances, use the stop-instances command following this syntax:
$ aws ec2 stop-instances \
--profile YOUR_PROFILE \
--instance-ids i-12345678 \
--force \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
instance-ids
: One or more instance IDs. -
(optional)
force
: If set totrue
, forces the instance to stop without properly exiting running applications.Beware that forcing an instance to stop may damage your instance system and data. Therefore, it is recommended to avoid using force stop. For more information about it and why the instance does not stop properly, see About Instance Lifecycle > Force Stop.
-
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The stop-instances command returns the following elements:
-
StoppingInstances
: Information about one or more stopping instances. This element contains the following information for each instance:-
InstanceId
: The ID of the instance. -
CurrentState
: The current state of the instance, with the code and the name of the state. -
PreviousState
: The state of the instance before the action, with the code and the name of the state.
-
{
"StoppingInstances": [
{
"InstanceId": "i-12345678",
"CurrentState": {
"Code": 64,
"Name": "stopping"
},
"PreviousState": {
"Code": 16,
"Name": "running"
}
}
]
}
The state of the specified instances changes to stopping, and then to stopped once the operation is completed.
Starting Instances
To start one or more instances, use the start-instances command following this syntax:
$ aws ec2 start-instances \
--profile YOUR_PROFILE \
--instance-ids i-12345678 \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
instance-ids
: One or more instance IDs. -
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The start-instances command returns the following elements:
-
StartingInstances
: Information about one or more starting instances. This element contains the following information for each instance:-
InstanceId
: The ID of the instance. -
CurrentState
: The current state of the instance, with the code and the name of the state. -
PreviousState
: The state of the instance before the action, with the code and the name of the state.
-
{
"StartingInstances": [
{
"InstanceId": "i-12345678",
"CurrentState": {
"Code": 0,
"Name": "pending"
},
"PreviousState": {
"Code": 80,
"Name": "stopped"
}
}
]
}
The state of the specified instances changes to pending, and then to running once the operation is completed.
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.