Changing VM computing resources
After you create a VM, you can change its computing resources. For more information about how to change a VM name, description, and tags, see Updating a VM.
Changing the vCPU and RAM configuration
This section provides guidelines for changing the number and performance of vCPUs and the amount of RAM.
To change vCPU and RAM of a VM:
- Open the folder that the VM belongs to.
- Select Yandex Compute Cloud.
- Click on the VM name.
- Click Stop in the upper-right corner of the page.
- Wait until the VM status changes to
STOPPED
, then click Update VM in the upper-right corner of the page. - Change the configuration of the VM and do the following in the Computing resources section:
- Choose a platform.
- Specify the necessary number of vCPUs and amount of RAM.
- Click Save changes.
- Click Run in the upper-right corner of the page.
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.
-
See the description of the CLI's update VM parameter command:
$ yc compute instance update --help
-
Get a list of 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 VM
ID
orNAME
(for example,first-instance
). -
Stop the VM:
$ yc compute instance stop first-instance
-
Get the current VM configuration with metadata:
$ yc compute instance get --full first-instance
-
Change the VM's configuration:
$ yc compute instance update first-instance \ --memory 32 \ --cores 4 \ --core-fraction 100
This command will change the configuration of the VM:
- Guaranteed vCPU level to 100%.
- Number of vCPUs to 4.
- RAM to 32 GB.
-
Start the VM:
$ yc compute instance start first-instance
To change the vCPU and RAM of a VM, use the Update method for the Instance
resource.
Adding a GPU to an existing VM
To add a GPU to an existing VM, change the platform and specify the number of GPUs.
To change the number of GPUs on the VM:
- Open the folder that the VM belongs to.
- Select Yandex Compute Cloud.
- Click on the VM name.
- Click Stop in the upper-right corner of the page.
- Wait until the VM status changes to
STOPPED
, then click Update VM in the upper-right corner of the page. - Change the configuration of the VM and do the following in the Computing resources section:
- Choose a platform Intel Broadwell with NVIDIA® Tesla® V100.
- Specify the required number of GPUs.
- Click Save changes.
- Click Run in the upper-right corner of the page.
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.
-
See the description of the CLI's update VM parameter command:
$ yc compute instance update --help
-
Get a list of 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 VM
ID
orNAME
(for example,first-instance
). -
Stop the VM:
$ yc compute instance stop first-instance
-
Get the current VM configuration with metadata:
$ yc compute instance get --full first-instance
-
Change the VM's configuration:
$ yc compute instance update first-instance \ --platform-id=gpu-standard-v1 \ --cores=8 \ --memory=96 \ --gpus=1
This command changes the following VM characteristics:
- Platform to Intel Broadwell with NVIDIA® Tesla® V100.
- Number of vCPUs to 8.
- RAM to 96 GB.
- GPU to 1.
-
Start the VM:
$ yc compute instance start first-instance
To change the VM platform and configuration, use the Update method for the Instance
resource.
Changing the number of GPUs
To change the number of GPUs on an existing VM:
- Open the folder that the VM belongs to.
- Select Yandex Compute Cloud.
- Click on the VM name.
- Click Stop in the upper-right corner of the page.
- Wait until the VM status changes to
STOPPED
, then click Update VM in the upper-right corner of the page. - Change the configuration of the VM. Under Computing resources, specify the required number of GPUs.
- Click Save changes.
- Click Run in the upper-right corner of the page.
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.
-
See the description of the CLI's update VM parameter command:
$ yc compute instance update --help
-
Get a list of 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 VM
ID
orNAME
(for example,first-instance
). -
Stop the VM:
$ yc compute instance stop first-instance
-
Get the current VM configuration with metadata:
$ yc compute instance get --full first-instancegit
-
Change the VM's configuration:
$ yc compute instance update first-instance \ --gpus=2 \ --cores=16 \ --memory=192
This command changes the number of GPUs to 2.
-
Start the VM:
$ yc compute instance start first-instance
To change the number of GPUs, use the Update method for the Instance
resource.