VMs in Compute Cloud
A VM is similar to a server in the cloud infrastructure.
VMs as a Yandex Cloud resource
A VM is created in a folder within your cloud and inherits access rights from it. You can read more about the Yandex Cloud resource hierarchy here.
Each VM has a unique ID and name. The name is unique within the folder. The naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
Note
The VM name is used to generate an internal FQDN only once: when creating a VM. If the internal FQDN is important to you, choose an appropriate name for the VM at the creation stage.
The ID is generated automatically when the VM is being created and is unique within Yandex Cloud.
You can move a VM to another folder within a single cloud.
Availability zone
When creating a VM, you can choose the Yandex Cloud availability zone where it will be located.
To move a VM instance to a different availability zone, use a special CLI command or create the VM's copy in the destination availability zone and then delete the original one.
Computing resources
When creating a VM, you need to specify the amount of computing resources to allocate to it; this includes the number and performance of processor cores (vCPUs) and the amount of RAM. You can choose the computing resources that are appropriate for the expected load. For more information, see vCPU performance levels.
Disks
A VM must have at least one disk attached, which is a boot disk. Currently, you can only attach a boot disk when creating a VM.
You can also attach additional disks to your VM. You can either attach a previously created disk or create one with a new VM. You can create an empty disk or restore it from a snapshot or an image.
Note
Empty disks do not have a file system. If you attach an empty disk, partition and mount it manually. Alternatively, instead of attaching an empty disk, you can create a snapshot of the boot disk and create a VM based on such a snapshot.
You can attach and detach additional disks even after you created the VM.
You can read more about disks here.
Statuses
The status of a VM determines which operations you can currently perform on it.
For example, the
STOPPED
status means that the VM is stopped and you cannot connect to it. To connect to such a VM, you must start it first. After the status changes toRUNNING
and the OS loads, you will be able to connect to the VM.
For more information about statuses, see the VM statuses section.
Metadata
You can specify your own metadata when creating or updating VMs. For example, to connect to a Linux VM, you need to provide an SSH key to it. which can be done using the metadata service. For more information, see VM metadata.
Network
When creating a VM, you need to specify its network interface settings by selecting the subnet to connect the VM to, configuring an internal and public IP address, and adding the required security groups. This will allow the VM to work with other services on the intranet and internet.
For more information, see VM network interfaces.