Changing VM computing resources

    After creating a VM, you can change its computing resources: the number and guaranteed performance of processor cores (vCPUs) and the amount of RAM.

    For more information about how to change the name, description, and tags of a VM, see the section Updating a VM.

    1. In the management console, select the folder the VM belongs to.
    2. Click on the Yandex Compute Cloud tile.
    3. Select the VM.
    4. Go to the VM's page.
    5. Click Stop in the top right corner of the page.
    6. Wait until the VM status changes to STOPPED and click Update VM in the top right corner of the page.
    7. Change the VM's configuration: in the Computing resources section:
    8. Click Save changes.
    9. Click Run in the top 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 flag.

    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 you need (for example, first-instance).

    4. Stop the VM:

      $ yc compute instance stop first-instance
      
    5. Get information about the VM with the 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 share: by 100%.
      • vCPU: by 4.
      • RAM: by 32 GB.
    7. Start the VM:

      $ yc compute instance start first-instance