Stopping, starting, or restarting a VM
Stop
The Stop command shuts down the VM. After the VM is shut down, its status changes to STOPPED
. While the VM is stopped, no fee is charged for it.
You can enable the VM at any time to continue working with it. All data and changes you've made are saved.
Some VM parameters (such as its boot disk) 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 machine → click → select Stop.
To do this with multiple VMs, select the VMs you need to stop from the list → click Stop at the bottom of the screen.
If you don't 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's stop VM command:
$ yc compute instance stop --help
-
Get a list of all VMs in the default folder:
$ yc compute instance list +----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4tkoa3jl6 | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7gcoji2f8s | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+
-
Select the
ID
orNAME
of the VM you need (for example,first-instance
). -
Stop the VM:
$ yc compute instance stop first-instance
Start
The Start command starts a previously stopped VM. After 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 machine → click → select Start.
To do this with multiple VMs, select the VMs you need to start from the list → click Start at the bottom of the screen.
If you don't 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's start VM command:
$ yc compute instance start --help
-
Get a list of all VMs in the default folder:
$ yc compute instance list +----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4tkoa3jl6 | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7gcoji2f8s | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+
-
Select the
ID
orNAME
of the VM you need (for example,first-instance
). -
Start the VM:
$ yc compute instance start first-instance
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 machine → click → select Restart.
To do this with multiple VMs, select the VMs you need to restart from the list → click Restart at the bottom of the screen.
If you don't 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's restart VM command:
$ yc compute instance restart --help
-
Get a list of all VMs in the default folder:
$ yc compute instance list +----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4tkoa3jl6 | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7gcoji2f8s | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+
-
Select the
ID
orNAME
of the VM you need (for example,first-instance
). -
Restart the VM:
$ yc compute instance restart first-instance