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:

  1. Open the folder that the VM belongs to.
  2. Select Yandex Compute Cloud.
  3. Click on the VM name.
  4. Click Stop in the upper-right corner of the page.
  5. Wait until the VM status changes to STOPPED, then click Update VM in the upper-right corner of the page.
  6. Change the configuration of the VM and do the following in the Computing resources section:
    • Choose the platform.
    • Specify the necessary number of vCPUs and amount of RAM.
  7. Click Save changes.
  8. Click Run in the upper-right corner of the page.

If you don't have the Yandex.Cloud command line interface yet, install 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.

  1. See the description of the CLI's update VM parameter command:

    $ yc compute instance update --help
    
  2. 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 |
    +----------------------+-----------------+---------------+---------+----------------------+
    
  3. Select the ID or NAME of the VM (for example, first-instance).

  4. Stop the VM:

    $ yc compute instance stop first-instance
    
  5. Get the current VM configuration with metadata:

    $ yc compute instance get --full first-instance
    
  6. 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.
  7. 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:

  1. Open the folder that the VM belongs to.
  2. Select Yandex Compute Cloud.
  3. Click on the VM name.
  4. Click Stop in the upper-right corner of the page.
  5. Wait until the VM status changes to STOPPED, then click Update VM in the upper-right corner of the page.
  6. Change the configuration of the VM and do the following in the Computing resources section:
    • Choose the platform Intel Broadwell with NVIDIA Tesla V100.
    • Specify the required number of GPUs.
  7. Click Save changes.
  8. Click Run in the upper-right corner of the page.

If you don't have the Yandex.Cloud command line interface yet, install 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.

  1. See the description of the CLI's update VM parameter command:

    $ yc compute instance update --help
    
  2. 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 |
    +----------------------+-----------------+---------------+---------+----------------------+
    
  3. Select the ID or NAME of the VM (for example, first-instance).

  4. Stop the VM:

    $ yc compute instance stop first-instance
    
  5. Get the current VM configuration with metadata:

    $ yc compute instance get --full first-instance
    
  6. 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.
  7. 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:

  1. Open the folder that the VM belongs to.
  2. Select Yandex Compute Cloud.
  3. Click on the VM name.
  4. Click Stop in the upper-right corner of the page.
  5. Wait until the VM status changes to STOPPED, then click Update VM in the upper-right corner of the page.
  6. Change the configuration of the VM. Under Computing resources, specify the required number of GPUs.
  7. Click Save changes.
  8. Click Run in the upper-right corner of the page.

If you don't have the Yandex.Cloud command line interface yet, install 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.

  1. See the description of the CLI's update VM parameter command:

    $ yc compute instance update --help
    
  2. 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 |
    +----------------------+-----------------+---------------+---------+----------------------+
    
  3. Select the ID or NAME of the VM (for example, first-instance).

  4. Stop the VM:

    $ yc compute instance stop first-instance
    
  5. Get the current VM configuration with metadata:

    $ yc compute instance get --full first-instancegit
    
  6. 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.

  7. Start the VM:

    $ yc compute instance start first-instance
    

To change the number of GPUs, use the Update method for the Instance resource.