Creating a VM from a public Linux image
-
In the list of services in the management console
, select Compute Cloud. -
Click Create VM.
-
Under Basic parameters:
-
Enter a name for the VM. The naming requirements are as follows:
- The length can be from 3 to 63 characters.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter. The last character can't 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.
-
Select an availability zone to place the VM in.
-
-
Under Image/boot disk selection, select an image and a Linux-based OS version.
-
(Optional) Under Disks, select the Disks tab and configure a boot disk:
-
Select disk type.
-
Specify the required disk size.
If you want to create a VM from an existing disk, under Disks, add a disk:
-
Click Add disk.
-
Enter the disk name.
-
Select disk type.
-
Specify the desired disk size.
-
(Optional) Enable the Advanced option in the Delete with the VM field if you need to automatically delete the disk when deleting the VM it will be attached to.
-
In the Contents field, select
Disk
. -
Click Add.
-
-
-
Under Computing resources:
- Choose a platform.
- Specify the required number of vCPUs, as well as the amount of RAM.
- If required, make your VM preemptible.
-
Under Network settings:
- (Optional) Select the Public IP checkbox to assign the VM a public IP address.
-
Under Access, specify the information required to access the instance:
-
Enter username in the Login field.
Alert
Do not use the
root
username or other names reserved by the OS. To perform operations that require superuser permissions, use thesudo
command. -
In the SSH key field, paste the contents of the public key file. You need to create a key pair for the SSH connection yourself.
In public Linux images provided by Nebius AI, the functionality of connecting over SSH using login and password is disabled by default.
-
-
Click Create VM.
The VM appears in the list. Once created, the VM is assigned an IP address and a host name (FQDN).
If you don't have the Nebius AI 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.
-
View a description of the CLI create VM command:
ncp compute instance create --help
-
Prepare a key pair (public and private keys) for SSH access to the VM.
-
Select a Linux-based public image from Nebius AI Marketplace, e.g., CentOS 7.
To get a list of available images using the Nebius AI CLI, run this command:
ncp compute image list --folder-id standard-images
Result:
+----------------------+-------------------------------------+--------------------------+----------------------+--------+ | ID | NAME | FAMILY | PRODUCT IDS | STATUS | +----------------------+-------------------------------------+--------------------------+----------------------+--------+ ... | fdvk34al8k5n******** | centos-7-1549279494 | centos-7 | dqni65lfhvv2den5gtv9 | READY | | fdv7ooobjfl3******** | windows-2016-gvlk-1548913814 | windows-2016-gvlk | dqnnc72gj2ist3ktjj1p | READY | | fdv4f5kv5cvf******** | ubuntu-1604-lts-1549457823 | ubuntu-1604-lts | dqnnb6dc7640c5i968ro | READY | ... +----------------------+-------------------------------------+--------------------------+----------------------+--------+
-
Create a VM:
ncp compute instance create \ --name first-instance \ --zone eu-north1-c \ --network-interface subnet-name=default-eu-north1-c,nat-ip-version=ipv4 \ --create-boot-disk image-folder-id=standard-images,image-family=centos-7 \ --ssh-key ~/.ssh/id_ed25519.pub
Where:
-
name
: VM name.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.
-
zone
: Availability zone that corresponds to the selected subnet. -
subnet-name
: Name of the subnet. -
image-family
: Image family, such ascentos-7
. This option allows you to install the latest version of the OS from the specified family. -
nat-ip-version=ipv4
: Public IP address. To create a VM without a public IP, disable this parameter. -
ssh-key
: Path to the public SSH key. The VM will automatically create a user namedyc-user
for this key.
-
When a VM is created, it is assigned an IP address and hostname (FQDN). This data can be used for SSH access.