Creating a VM with a GPU
This section provides guidelines for creating a VM with a GPU. For more information about VM configurations, see Graphics accelerators (GPUs).
By default, many quotas for creating VMs with GPUs are set to zero. You can generate a request for a quota increaseeditors
or admins
group.
-
In the management console
, select the folder to create the virtual machine in. -
In the list of services, select Compute Cloud.
-
At the top right, 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 your virtual machine in.
-
-
Under Image/boot disk selection, select a boot disk image.
For VMs with GPUs, you can use products with pre-installed NVIDIA drivers available from Nebius AI Marketplace or install the drivers on another standard image yourself.
-
(Optional) Configure the boot disk under Disks:
- Select the disk type.
- Specify the required disk size.
-
Under Computing resources:
-
Choose a VM platform with GPU. See the list of platforms.
-
Select a VM configuration specifying the required number of GPUs.
-
Make your VM preemptible, if required.
-
-
Under Network settings:
- (Optional) Select the Public IP checkbox to assign the VM a public IP address.
-
Under Access, specify the data required to access the VM:
For VMs with a Linux-based operating system:
-
Enter username in the Login field.
Alert
Do not use the
root
username or other names reserved by the operating system. To perform operations that require superuser permissions, use thesudo
command. -
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.
The virtual machine will appear in the list.
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 public image.
To get a list of available images, run the following command:
ncp compute image list --folder-id standard-images +----------------------+----------------------------------+-----------------------+----------------------+--------+ | ID | NAME | FAMILY | PRODUCT IDS | STATUS | +----------------------+----------------------------------+-----------------------+----------------------+--------+ ... | fdv7ooobjfl3ts9gqp0q | windows-2016-gvlk-gpu-1548913814 | windows-2016-gvlk-gpu | dqnnc72gj2ist3ktjj1p | READY | | fdv4f5kv5cvf3ohu4flt | ubuntu-1604-lts-gpu-1549457823 | ubuntu-1604-lts-gpu | dqnnb6dc7640c5i968ro | READY | ... +----------------------+----------------------------------+-----------------------+----------------------+--------+
For VMs with GPUs, you can use products with pre-installed NVIDIA drivers available from Nebius AI Marketplace or install the drivers on another standard image yourself.
-
Create a VM:
ncp compute instance create \ --name gpu-instance \ --zone eu-north1-c \ --platform=gpu-standard-v3 \ --cores=28 \ --memory=119 \ --gpus=1 \ --network-interface subnet-name=default-eu-north1-c,nat-ip-version=ipv4 \ --create-boot-disk image-folder-id=standard-images,image-family=ubuntu-2204-lts-cuda-12 \ --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. -
platform
: ID of the VM platform. See [the list of platforms with GPU(../../../compute/concepts/vm-platforms.md#gpu-platforms). -
cores
,memory
,gpus
: The VM configuration – the number of vCPUs, the amount of RAM, and the number of GPUs, respectively. See the list of available configurations. -
preemptible
: If you need to make the VM preemptible. -
create-boot-disk
: Image of the OS.For VMs with GPUs, you can use products with pre-installed NVIDIA drivers available from Nebius AI Marketplace or install the drivers on another standard image yourself.
-
nat-ip-version=ipv4
: Public IP address. To create a VM without a public IP address, disable this parameter.
Get a description of the created VM:
ncp compute instance get --full gpu-instance
Result:
name: gpu-instance zone_id: eu-north1-c platform_id: gpu-standard-v3 resources: memory: "127775277056" cores: "28" core_fraction: "100" gpus: "1" status: RUNNING ...
-
When a VM is created, it is assigned an IP address and hostname (FQDN). This data can be used for SSH access.