Stopping, starting, or restarting a VM
Stop
This Stop command shuts down the VM. Once shut down, the VM status changes to Stopped
. While the VM is stopped, no fee is charged for its use. You are charged for using disks whether the VM is running or not.
You can restart a VM at any time to continue using it. All the data and changes you have made are saved.
Certain VM parameters can only be modified when the VM is stopped.
To stop a VM:
- In the management console
, select the folder the VM belongs to. - Select Compute Cloud.
- To stop a single VM, select the VM, click
, and then click Stop. - In the window that opens, click Stop.
To perform this action with multiple VMs, select the relevant VMs in the list, click Stop at the bottom of the screen, and then, in the window that opens, click Stop.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
See the description of the CLI command to stop a VM:
yc compute instance stop --help
-
Get a list of all VMs in the default folder:
yc compute instance list
Result:
+----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4******** | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7g******** | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+
-
Select the
ID
orNAME
of the VM, e.g.,first-instance
. -
Stop the VM:
yc compute instance stop first-instance
Use the stop REST API method for the Instance resource or the InstanceService/Stop gRPC API call.
When a VM stops, the hypervisor sends a shutdown signal to the VM operating system. The OS needs to terminate the current processes nice and easy within the next 30 seconds to avoid data loss. After this time elapses, the VM process is forced to stop.
Start
The Start command starts a previously stopped VM. Once the VM is started, its status changes to Running
, and the operating system starts loading. From this point on, you will be charged for using the VM.
To start a VM:
- In the management console
, select the folder the VM belongs to. - Select Compute Cloud.
- To start a single VM, select the VM, click
, and then click Start. - In the window that opens, click Start.
To perform this action with multiple VMs, select the relevant VMs in the list, click Start at the bottom of the screen, and then, in the window that opens, click Start.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the CLI command that starts a VM:
yc compute instance start --help
-
Get a list of all VMs in the default folder:
yc compute instance list
Result:
+----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4******** | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7g******** | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+
-
Select the
ID
orNAME
of the VM, e.g.,first-instance
. -
Run the VM:
yc compute instance start first-instance
Use the start REST API method for the Instance resource or the InstanceService/Start gRPC API call.
Restart
The Restart command restarts a VM.
To restart a VM:
- In the management console
, select the folder the VM belongs to. - Select Compute Cloud.
- To restart a single VM, select the VM, click
, and then click Restart. - In the window that opens, click Restart.
To perform this action with multiple VMs, select the relevant VMs in the list, click Restart at the bottom of the screen, and then, in the window that opens, click Restart.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the CLI command that restarts a VM:
yc compute instance restart --help
-
Get a list of all VMs in the default folder:
yc compute instance list
Result:
+----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4******** | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7g******** | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+
-
Select the
ID
orNAME
of the VM, e.g.,first-instance
. -
Restart the VM.
yc compute instance restart first-instance
Use the restart REST API method for the Instance resource or the InstanceService/Restart gRPC API call.