Creating a VM from a public image
To create a VM:
-
At the top right in the management console
, click Create resource. -
In the list that opens, select Virtual machine instance.
-
Under Basic parameters:
-
Enter the VM name. 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.
-
Select an availability zone to place your VM in.
-
-
Under Image/boot disk selection, select a public image with the software you want to use.
-
(Optional) If you want to add more disks to the VM, select them under Disks by clicking the Disks tab.
-
(Optional) If you want to add more file storages to the VM, add them under Disks and file storages by clicking the File storages tab. Create the storages first.
-
Under Computing resources:
- Choose a platform.
- Specify the required number of vCPUs as well as the amount of RAM.
Note
Each public image has its own minimum requirements for a VM. A GitLab image from Nebius AI Marketplace, for instance, requires at least 4 virtual cores and 8 GB of RAM.
-
Under Network settings:
- 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.
- In the SSH key field, paste the contents of the public key file.
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.
VM creation takes several minutes. When the VM status changes to RUNNING
, you can proceed to using the VM. You can monitor VM statuses on the list of VMs in the folder.
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 the key pair (public and private keys) for SSH access to the VM.
-
Select one of the Nebius AI Marketplace public images.
You can view image IDs in the management console
when creating a VM or in Marketplace on the image page under Product IDs.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 operating system from the specified family. -
nat-ip-version=ipv4
: Public IP address. To create a VM without a public IP address, disable this parameter. -
ssh-key
: Path to the public SSH key. The VM will automatically create a user namedyc-user
for this key.
-
Once you are done, all the resources you need will be created in the specified folder. You can verify that the resources are there and their configuration is correct using the management console
ncp compute instance list
When a VM is created, it is assigned an IP address and hostname (FQDN). This data can be used for SSH access.