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:
- It must be 2 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
Note
The VM name is used to generate an internal FQDN, which is set only once, when you create the VM. If the internal FQDN is important to you, make sure to choose an appropriate name for your VM.
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 select a Yandex Cloud availability zone to place it in.
To move a VM to a different availability zone, use a special CLI command or create a VM copy in the destination availability zone and then delete the source VM.
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 are attaching an empty disk, partition and mount it manually. Alternatively, rather than attaching an empty disk, you can create a snapshot of the boot disk and use it to create a VM.
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.