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:
-
In the management console
, select the folder the VM belongs to. -
In the list of services, select Compute Cloud.
-
Click the VM name.
-
Click Stop in the top-right corner of the page.
-
In the window that opens, click Stop.
-
Wait until the VM status changes to
Stopped
, then click Edit VM in the top-right corner of the page. -
Change the configuration of the VM in the Computing resources section. To do this:
- Go to the Custom tab.
- Choose a platform.
- Specify the guaranteed share and required number of vCPUs, as well as RAM size.
- If required, make your VM preemptible.
-
Click Save changes.
-
Click Start in the top-right corner.
-
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 for updating VM parameters:
yc compute instance update --help
-
Get a list of 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
-
Get the current VM configuration with metadata:
yc compute instance get --full first-instance
-
Change the VM 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.
-
Run the VM:
yc compute instance start first-instance
To change vCPU and RAM of a VM, use the update REST API method for the Instance resource or the InstanceService/Update gRPC API call.
Warning
When you edit VM resources, the PCI topology might change. Keep this in mind when working with operating systems that are sensitive to such changes. For example, if you make substantial changes in network settings in Windows Server, you may lose network connectivity and access to the VM.
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:
-
In the management console
, select the folder the VM belongs to. -
In the list of services, select Compute Cloud.
-
Click the VM name.
-
Click Stop in the top-right corner of the page.
-
In the window that opens, click Stop.
-
Wait until the VM status changes to
Stopped
, then click Edit VM in the top-right corner of the page. -
Under Computing resources:
-
Go to the GPU tab.
-
Choose a platform:
- Intel Broadwell with NVIDIA® Tesla® V100
- Intel Cascade Lake with NVIDIA® Tesla® V100
- AMD EPYC™ with NVIDIA® Ampere® A100
- Intel Ice Lake with NVIDIA® Tesla® T4
-
Select one of the available configurations, with the needed GPUs, vCPUs, and the amount of RAM.
-
-
Click Save changes.
-
Click Start in the top-right corner of the page.
-
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 for updating VM parameters:
yc compute instance update --help
-
Get a list of 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
-
Get the current VM configuration with metadata:
yc compute instance get --full first-instance
-
Change the VM configuration:
yc compute instance update first-instance \ --platform=standard-v3-t4 \ --cores=8 \ --memory=32 \ --gpus=1
This command changes the following VM specs:
- Platform to Intel Ice Lake with NVIDIA® Tesla® T4.
- Number of vCPUs to 8.
- RAM to 32 GB.
- GPU to 1.
-
Run the VM:
yc compute instance start first-instance
To change a VM's platform and configuration, use the update REST API method for the Instance resource or the InstanceService/Update gRPC API call.
Changing the number of GPUs
To change the number of GPUs on an existing VM:
-
In the management console
, select the folder the VM belongs to. -
In the list of services, select Compute Cloud.
-
Click the VM name.
-
Click Stop in the top-right corner of the page.
-
In the window that opens, click Stop.
-
Wait until the VM status changes to
Stopped
, then click Edit VM in the top-right corner of the page. -
Under Computing resources:
-
Go to the GPU tab.
-
Choose a platform:
- Intel Broadwell with NVIDIA® Tesla® V100
- Intel Cascade Lake with NVIDIA® Tesla® V100
- AMD EPYC™ with NVIDIA® Ampere® A100
- Intel Ice Lake with NVIDIA® Tesla® T4
-
Select one of the available configurations, with the needed GPUs, vCPUs, and the amount of RAM.
-
-
Click Save changes.
-
Click Start in the top-right corner of the page.
-
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 for updating VM parameters:
yc compute instance update --help
-
Get a list of 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
-
Get the current VM configuration with metadata:
yc compute instance get --full first-instancegit
-
Change the VM configuration:
yc compute instance update first-instance \ --gpus=2 \ --cores=56 \ --memory=238
This command changes the number of GPUs to 2.
The values of the
--cores
(number of vCPUs) and--memory
(RAM size in GB) parameters depend on the platform and the number of GPUs. For more information, see the list of available configurations. -
Run the VM:
yc compute instance start first-instance
To change the number of GPUs, use the update REST API method for the Instance resource or the InstanceService/Update gRPC API call.
Enabling a software-accelerated network
Warning
This feature is only available upon agreement with your account manager.
To enable a software-accelerated network on an existing VM:
- In the management console
, select the folder the VM belongs to. - In the list of services, select Compute Cloud.
- Click the VM name.
- Click Stop in the top-right corner of the page.
- In the window that opens, click Stop.
- Wait until the VM status changes to
Stopped
, then click Edit VM in the top-right corner of the page. - Under Computing resources, open the Custom tab and enable the Software network acceleration option.
- Click Save changes.
- Click Start in the top-right corner of the page.
- In the window that opens, click Start.