Name
nebius compute instance create
Creates a new VM instance based on the provided specification.
For details, see https://docs.nebius.com/compute/virtual-machines/manage.
Synopsis
Options
--boot-disk-attach-mode (string)
A value must be one of:
unspecifiedread_onlyread_write
--boot-disk-device-id (string)
Specifies the user-defined identifier, allowing to use ‘/dev/disk/by-id/virtio-’ as a device path in mount command.
--boot-disk-existing-disk-id (string)
--cloud-init-user-data (string)
Data in cloud-init format for customizing instance initialization.
For details, see https://docs.nebius.com/compute/virtual-machines/manage#user-data.
--filesystems (json)
List of Shared Filesystems attached to the instance.
(structure)
attach_mode -> (string)[required]
A value must be one of:
“unspecified""read_only""read_write”
existing_filesystem -> (structure)
id -> (string)[required]
mount_tag -> (string)[required]
Specifies the user-defined identifier, allowing to use it as a device in mount command.
JSON Schema:
--gpu-cluster-id (string)
If you want to interconnect several instances in a GPU cluster via NVIDIA InfiniBand,
set the ID of an existing GPU cluster.
You can only add the VM to the cluster when creating the VM.
For details, see https://docs.nebius.com/compute/clusters/gpu.
--hostname (string)
Instance’s hostname. Used to generate default DNS record in format <hostname>.<network_id>.compute.internal.
or <instance_id>.<network_id>.compute.internal. if hostname is not specified.
--labels (string->string)
Labels associated with the resource.
--local-disks-passthrough-group-requested (bool)
Passthrough local disks from the underlying host.
Devices are expected to appear in the guest as NVMe devices (nvme0, nvme1, …),
but the exact number depends on the preset.
Enabled only when this field is explicitly set.
--name (string)
Human readable name for the resource.
--network-interfaces (json) [required]
List of network interfaces attached to the instance.
(structure)
aliases -> (structure)
Assign ranges of IP addresses as aliases.
allocation_id -> (string)[required]
ID of allocation.
ip_address -> (structure)[required] [immutable] [meaningful_empty_value]
Private IPv4 address associated with the interface.
allocation_id -> (string)
Allocation identifier if it was created before.
name -> (string)[required] [immutable]
Interface name
Value of this field configures the name of the network interface inside VM’s OS.
Longer values will persist in the specification but will be truncated to 15 symbols before being passed to VM configuration.
public_ip_address -> (structure)[meaningful_empty_value]
Public IPv4 address associated with the interface.
allocation_id -> (string)
Allocation identifier if it was created before.
static -> (bool)
If false - Allocation will be created/deleted during NetworkInterface.Allocate/NetworkInterface.Deallocate
If true - Allocation will be created/deleted during NetworkInterface.Create/NetworkInterface.Delete
False by default.
security_groups -> (structure)
Security groups associated with the network interface.
If an empty list is provided, the default security group for the network will be used.
Effective security groups can be seen in the status.
id -> (string)
Security group identifier.
subnet_id -> (string)[required] [immutable]
Subnet ID.
JSON Schema:
--parent-id (string) [required]
Identifier of the parent resource to which the resource belongs.
--preemptible-on-preemption (string)
Specifies what happens when the VM is preempted. The only supported value is STOP:
Compute stops the VM without deleting or restarting it.
A value must be one of:
unspecifiedstop
--preemptible-priority (int32)
The value can range from 1 to 5, where 5 indicates the highest priority.
Affects the order in which Compute tries to preempt VMs, but does not guarantee the exact order.
--recovery-policy (string)
Recovery policy defines how the instance will be treated in case of a failure.
Common source of failure is a host failure, but it can be any other failure.
Instance undergoing a guest shutdown (poweroff, etc.) will be subject to recovery policy, meaning that it could
be restarted and billed accordingly. Stop instance via API or UI to stop it to avoid recovering.
- If set to RECOVER, instance will be restarted, if possible. It could be restarted on the same host or on another host.
- If set to FAIL, instance will be stopped and not restarted.
A value must be one of:
recoverfail
--reservation-policy-policy (string)
A value must be one of:
autoforbidstrict
--reservation-policy-reservation-ids (string array)
Capacity block groups, order matters.
--resource-version (int64)
Version of the resource for safe concurrent modifications and consistent reads.
Positive and monotonically increases on each resource spec change (but not on each change of the
resource’s container(s) or status).
Service allows zero value or current.
--resources-platform (string) [required]
--resources-preset (string) [required]
--secondary-disks (json)
List of additional data disks attached to the instance beyond the boot disk.
(structure)
attach_mode -> (string)[required]
A value must be one of:
“unspecified""read_only""read_write”
device_id -> (string)
Specifies the user-defined identifier, allowing to use ‘/dev/disk/by-id/virtio-’ as a device path in mount command.
existing_disk -> (structure)
Attach an existing disk.
Lifecycle:
- The disk is preserved when the instance is deleted (it will be detached).
- To delete the disk together with the instance, switch to ManagedDisk in the instance spec.
- For the switch,
ManagedDisk.nameMUST match the current diskname
(see DiskService.Get for the disk referenced byExistingDisk.id). - When converting an ExistingDisk to a ManagedDisk, you must provide
ManagedDisk.nameandManagedDisk.spec
exactly as they are currently defined in the disk resource.
Obtain the current values viaDiskService.Getand copy them verbatim.
IfManagedDisk.specdiffers from the current disk spec, the instance update will fail.
id -> (string)[required]
JSON Schema:
--service-account-id (string)
Unique identifier of the service account associated with this instance.
For details, see https://docs.nebius.dev/en/iam/about-iam/concepts/service-accounts.
--stopped (bool)
Indicates whether the instance should be stopped.
--async (bool)
If set, returns operation id. Otherwise, waits for the operation to complete and returns its resource.
-i, --interactive (bool)
If set, suggests to insert field values in interactive mode.
Global Options
-h, --help (bool)
Show this message.
-p, --profile (string)
Set a profile for interacting with the cloud.
--format (string)
Output format. Supported values: yaml|json|jsonpath|table|text.
-f, --file (string)
Input file. For ‘update’ commands automatically set —full=true.
-c, --config (string)
Provide path to config file.
--debug (bool)
Enable debug logs.
--color (bool)
Enable colored output.
--no-browser (bool)
Do not open browser automatically on auth.
--insecure (bool)
Disable transport security.
--auth-timeout (duration: 2h30m10s)
Set the timeout for the request including authentication process, default is 15m0s.
--per-retry-timeout (duration: 2h30m10s)
Set the timeout for each retry attempt, default is 20s.
--retries (uint)
Set the number of retry attempts, 1 is disable retries, default is 3.
--timeout (duration: 2h30m10s)
Set the timeout for the main request, default is 1m0s.
--no-check-update (bool)
Suppress check for updates.