Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Compute Cloud
  • Getting started
    • Overview
    • Creating a Linux VM
    • Creating a Windows VM
    • Creating instance groups
  • Step-by-step instructions
    • All instructions
    • Creating VMs
      • Creating a Linux VM
      • Creating a Windows VM
      • Creating a VM from a set of disks
      • Creating a VM with disks restored from snapshots
      • Creating a VM from a custom image
      • Creating a preemptible VM
      • Creating a VM with a GPU
    • DSVM
      • Overview
      • Creating a VM from a public DSVM image
    • Placement groups
      • Creating a placement group
      • Deleting a placement group
      • Creating a VM in a placement group
      • Adding a VM to a placement group
      • Removing a VM instance from a placement group
    • Images with pre-installed software
      • Creating a VM from a public image
      • Configuring software
      • Working with a VM based on a public image
      • Getting a list of public images
    • Getting information about a VM
      • Getting information about a VM
      • Viewing serial port output
    • Managing VMs
      • Stopping and starting a VM
      • Attaching a disk to a VM
      • Detaching a disk from a VM
      • Moving a VM to a different availability zone
      • Making a VM's public IP address static
      • Updating a VM
      • Changing VM computing resources
      • Deleting a VM
    • Working on VMs
      • Connecting to a VM via SSH
      • Connecting to a VM via RDP
      • Working with Yandex.Cloud from inside a VM
      • Installing NVIDIA drivers
    • Creating new disks
      • Creating an empty disk
      • Create an empty disk with a large block
    • Disk management
      • Creating a disk snapshot
      • Updating a disk
      • Deleting a disk
      • Deleting a disk snapshot
    • Creating new images
      • Uploading your image
    • Managing images
      • Deleting a disk image
    • Managing the serial console
      • Getting started
      • Connecting to a serial console via SSH
      • Connecting to a serial console via CLI
      • Start your terminal in the Windows SAC
      • Disabling access to the serial console
    • Creating instance groups
      • Creating a fixed-size instance group
      • Creating a fixed-size instance group with a network load balancer
      • Creating an automatically scaled instance group
      • Creating an instance group from Container Optimized Image
    • Getting information about instance groups
      • Getting a list of instance groups
      • Getting information about an instance group
      • Getting a list of instances in a group
    • Managing instance groups
      • Editing an instance group
      • Configuring application health check on the VM
      • Updating a instance group
        • Incremental updates
        • Uninterrupted updates
      • Stopping an instance group
      • Starting an instance group
      • Deleting an instance group
    • Dedicated hosts
      • Creating a VM in a group of dedicated hosts
      • Creating a VM on a dedicated host
  • Yandex Container Optimized Solutions
  • Scenarios
    • Configuring NTP time synchronization
    • Running instance groups with auto scaling
  • Concepts
    • Relationship between resources
    • Virtual machines
      • Overview
      • Platforms
      • vCPU performance levels
      • Graphics accelerators (GPUs)
      • Preemptible VMs
      • Network on a VM
      • Live migration
      • Placement groups
      • Statuses
      • Metadata
    • Disks
      • Overview
      • Disk snapshots
    • Images
    • Instance groups
      • Overview
      • Access
      • Instance template
      • Variables in an instance template
      • Policies
        • Overview
        • Allocation policy
        • Deployment policy
        • Scaling policy
      • Scaling types
      • Auto-healing
      • Updating
        • Overview
        • Allocating instances across zones
        • Deployment algorithm
        • Rules for updating instance groups
      • Statuses
    • Dedicated host
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1 to May 1, 2019
  • Compute API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DiskPlacementGroupService
      • DiskService
      • DiskTypeService
      • HostGroupService
      • HostTypeService
      • ImageService
      • InstanceService
      • PlacementGroupService
      • SnapshotService
      • ZoneService
      • InstanceGroupService
      • OperationService
    • REST
      • Overview
      • Disk
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • DiskPlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listDisks
        • listOperations
        • update
      • DiskType
        • Overview
        • get
        • list
      • HostGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listInstances
        • listOperations
        • update
      • HostType
        • Overview
        • get
        • list
      • Image
        • Overview
        • create
        • delete
        • get
        • getLatestByFamily
        • list
        • listOperations
        • update
      • Instance
        • Overview
        • addOneToOneNat
        • attachDisk
        • create
        • delete
        • detachDisk
        • get
        • getSerialPortOutput
        • list
        • listOperations
        • removeOneToOneNat
        • restart
        • start
        • stop
        • update
        • updateMetadata
        • updateNetworkInterface
      • PlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listInstances
        • listOperations
        • update
      • Snapshot
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • Zone
        • Overview
        • get
        • list
      • Operation
        • Overview
        • get
      • InstanceGroup
        • Overview
        • createFromYaml
        • update
        • list
        • get
        • delete
        • start
        • stop
        • create
        • listAccessBindings
        • setAccessBindings
        • updateFromYaml
        • listLogRecords
        • listInstances
        • updateAccessBindings
        • listOperations
  • Questions and answers
    • General questions
    • Virtual machines
    • Disks and snapshots
    • Licensing
    • All questions on the same page
  1. Step-by-step instructions
  2. Managing VMs
  3. Changing VM computing resources

Changing VM computing resources

  • Changing the vCPU and RAM configuration
  • Adding a GPU to an existing VM
  • Changing the number of GPUs

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.

Management console
CLI
API

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 a 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 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.

  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 VM ID or NAME (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.

Management console
CLI
API

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 a 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 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.

  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 VM ID or NAME (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

Management console
CLI
API

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 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.

  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 VM ID or NAME (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.

In this article:
  • Changing the vCPU and RAM configuration
  • Adding a GPU to an existing VM
  • Changing the number of GPUs
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC