VK Cloud logo
Updated at March 27, 2024   03:20 PM

VM management

You can change the parameters and status of a virtual machine on the VK Cloud platform in personal account or using the OpenStack command line interface.

Getting a virtual machine ID

To manage a VM using the OpenStack CLI, you need a vm ID.

  1. Go to personal account VK Cloud.
  2. Go to Cloud Computing → Virtual machines.
  3. In the list of VMs, click on the name of the VM whose ID you want to find out.
  4. On the VM page, go to the General information tab.
  5. Find the row ID of the virtual machine in the table.

Starting, stopping, reboot the VM

  1. Go to personal account VK Cloud.

  2. Go to Cloud Computing → Virtual machines.

  3. Change the VM state in one of the ways.

    • Using group operations — for multiple VMs:

      1. In the list of virtual machines, select the VMs whose state you want to change.
      2. Above the list of VMs, click the button with the desired action.
      3. Confirm the action.
    • Through the context menu — for one VM:

      1. In the list of virtual machines, find the VM whose state you want to change.
      2. Expand the VM context menu.
      3. Select and confirm the action.
    • On the virtual machine page:

      1. In the list of virtual machines, click on the name of the VM whose state you want to change.
      2. On the VM page, go to the General information tab.
      3. To the right above the table with VM parameters, click on the icon of the desired action.
      4. Confirm the action.

Forced VM reboot

If the VM is not responding, use a forced reboot.

  1. Go to personal account VK Cloud.

  2. Go to Cloud Computing → Virtual machines.

  3. Force a VM restart in one of the ways.

    • Through the context menu:

      1. In the list of virtual machines, find the VM you need.
      2. Expand the VM context menu.
      3. Click Force reboot and confirm the action.
    • On the virtual machine page:

      1. In the list of virtual machines, click on the name of the VM whose state you want to change.
      2. On the VM page, go to the General information tab.
      3. Above the table with VM parameters, click More.
      4. Click Force reboot and confirm the action.

VM block and unblock

Block the VM if you need to prohibit changing its state and parameters.

A blocked virtual machine cannot be started or stopped, nor can it be restarted. It is not possible to replace disks and change the network interface settings of a blocked VM.

  1. Go to personal account VK Cloud.

  2. Go to Cloud Computing → Virtual machines.

  3. Block or unblock the VM in one of the ways.

    • Through the context menu:

      1. In the list of virtual machines, find the VM you need.
      2. Expand the VM context menu.
      3. Select and confirm the action.
    • On the virtual machine page:

      1. In the list of virtual machines, click on the name of the VM whose state you want to change.
      2. On the VM page, go to the General information tab.
      3. Above the table with VM parameters, click More.
      4. Select and confirm the action.

Deleting a VM

On the VK Cloud platform, the virtual machine is deleted by default along with the main disk (root disk). Deleting additional disks depends on the settings of the corresponding policy.

  1. Prepare the VM for deletion.

    • If you need to save the main disk, clone it or replace it with an unnecessary one.

    • Disconnect from the VM additional disks that need to be saved.

      Additional disks for which the delete_on_termination: False property is set in the deletion policy can not be disconnected from the VM.

  2. After saving the necessary data, delete the VM.

    1. Go to personal account VK Cloud.

    2. Go to Cloud Computing → Virtual machines.

    3. Delete the VM in one of the ways.

      • Using group operations — for multiple VMs:

        1. In the list of virtual machines, select the VMs that you want to delete.
        2. In the menu above the VM list, click Delete.
        3. Confirm the action.
      • Through the context menu — for one VM:

        1. In the list of virtual machines, find the VM that you want to delete.
        2. Expand the VM context menu.
        3. Click Delete and confirm the action.
      • On the virtual machine page:

        1. In the list of virtual machines, click on the name of the VM that you want to delete.
        2. On the VM page, go to the General information tab.
        3. To the right above the table with VM parameters, click on the trash icon.
        4. Confirm the action.

Renaming and changing the VM type

On the VK Cloud platform, you can rename a virtual machine, as well as change the type of VM — the number of processors (vCPU) and the amount of RAM.

  1. Go to personal account VK Cloud.

  2. Go to Cloud Computing → Virtual machines.

  3. Change the VM name or type in one of the ways.

    • Through the context menu:

      1. In the list of virtual machines, find the VM you need.
      2. Expand the VM context menu.
      3. Select an action.
      4. Fill in the input field and click Save.
    • On the virtual machine page:

      1. In the list of virtual machines, click on the name of the VM whose state you want to change.
      2. On the VM page, go to the General information tab.
      3. Above the table with VM parameters, click More.
      4. Select an action.
      5. Fill in the input field and click Save.

Assigning tags

Tags allow you to filter the list of virtual machines and find the right VM faster. Use existing tags or create your own tag and choose a color for it.

  1. Go to personal account VK Cloud.
  2. Go to Cloud Computing → Virtual machines.
  3. Expand the VM context menu.
  4. Check the tags or click Create a new tag.
  5. To add a new tag, enter its name, select a color, and click Add tag.

Setting and changing a password

In the operating system of the VK Cloud virtual machine, you can set or change the default password for the user.

Conditions for setting a password:

  • the virtual machine is running and the OS boot process has finished;
  • the QEMU guest agent is installed and running (state — running).

Command to check the status of the QEMU guest agent:

sc query qemu-ga
  1. Go to personal account VK Cloud.

  2. Go to Cloud Computing → Virtual machines.

  3. Set the password in one of the ways.

    • Through the context menu:

      1. In the list of virtual machines, find the VM you need.
      2. Expand the VM context menu.
      3. Choose Set password.
      4. Enter a new password or click Generate.
      5. Click Set password.
    • On the virtual machine page:

      1. In the list of virtual machines, click on the name of the VM whose state you want to change.
      2. On the VM page, go to the General information tab or to the Console.
      3. Above the table with VM parameters or above the console window, click Set password.
      4. Enter a new password or click Generate.
      5. Click Set password.

Password recovery

Password recovery generated for the default user is available only for Windows virtual machines created on a private network. To get a password, you need the private key of the key pair selected when creating the VM.

  1. Go to personal account VK Cloud.

  2. Go to Cloud Computing → Virtual machines.

  3. Open the password receipt window using one of the following methods.

    • Through the context menu:

      1. In the list of virtual machines, find the VM you need.
      2. Expand the VM context menu.
      3. Choose Get password.
    • On the virtual machine page:

      1. In the list of virtual machines, click on the name of the VM whose state you want to change.
      2. On the VM page, go to the General information tab.
      3. Above the table with VM parameters, click More.
      4. Choose Get password.
  4. In the window that opens, click Private key file or paste the contents of the key into the Private key field.

  5. Click Decrypt password.

  6. A field will appear in the window Password. Copy the password by clicking the icon in the field.

Restoring VM access by key

To restore access to a Linux virtual machine via SSH using a key pair, you need to know the password of the OS user.

  1. Get a public key.

    • If the public key file is lost, go to the directory with the private key file and run the command:

      ssh-keygen -y -f <filename with the private key> > <filename with the public key>
    • If the private key file is lost, create a new key pair.

  2. Create a link to the file with the public key.

    1. Go to personal account VK Cloud.
    2. Go to Object storage → Buckets.
    3. Use an existing package or create a new one.
    4. Add file with a public key in the bucket.
    5. Enable access by the link to this file.
    6. Copy the link to the file with the public key.
  3. Upload the public key to the VM.

    1. Go to Cloud Computing → Virtual machines.

    2. In the list of virtual machines, click on the name of the VM you need.

    3. On the VM page, go to the tab Console.

    4. Use the default username and password to log in to the VM OS.

    5. Download the file with the public key:

      wget <link to a file with a public key>
    6. Copy the public key to the file authorized_keys:

      cat <file with a public key> >> ~/.ssh/authorized_keys
  4. Check the possibility of key access.

    1. Go to the terminal of the computer where the private key is stored.

    2. Connect to the VM via SSH:

      ssh -i <the path to the file with the private key> <login>@<external IP address of the VM>

Viewing the event log

The event log contains information about changes in the VM state and user actions.

  1. Make sure that OpenStack client is installed and authenticate to the project.

  2. Run the appropriate command.

    • View the event log (extended format):

      openstack server event list --long <virtual machine ID>
    • View the event log (short format):

      openstack server event list <virtual machine ID>
    • Use the event ID from the Request ID column to display detailed information about the event:

      openstack server event show <virtual machine ID> <event ID>

Examples of events:

  • start / stop — starting / stopping a VM;
  • resize / confirmResize — starting VM type change / confirmation;
  • extend_volume — increasing the disk size;
  • create — creating a VM;
  • live-migration — VM migration.