Compute
Module:
services/compute· Image:nebius-mocker-compute·NEBIUS_MOCKER_SERVICES=computeM1 tier: T2 · Endpoint:compute.api.nebius.cloud
Implementation status
| Piece | Status |
|---|---|
nebius.compute.v1.ImageService: Get, GetByName, GetLatestByFamily, List (paged), ListPublic (per region, paged), Create, Update (reset mask, resource_version, immutable fields), Delete, ListOperationsByParent |
✅ T2 |
Public image catalog per region in project-<routing code>public-images, seeded from a built-in or file catalog, payloads in the object store |
✅ |
Custom images imported from Object Storage (spec.source_storage), payload copied into the object store; size, checksum, format and minimum disk size derived from the bytes |
✅ |
spec.source_disk_id / spec.source_disk_snapshot_id |
✅ The source must exist, be READY and be in the image’s project. min_disk_size_bytes = disk size_bytes (snapshot: its source disk’s size if that still exists, else content_size_bytes), rounded up to a GiB. cpu_architecture defaults to the source’s. The payload is a 64 KiB qcow2 declaring that size (disks keep no data). While the image is CREATING the source disk carries it in status.lock_state.images (disk.proto: “locked for deletion and for read-write operations while image is being created”), so the disk cannot be deleted; the lock is released when the image becomes READY or ERROR, and on image delete. Snapshot sources are not locked (DiskSnapshot.lock_state only lists disks). Tests: domain, contract, SDK and CLI on RustFS, Terraform (nebius_compute_v1_disk resource + disk and image data sources) |
nebius.compute.v1.DiskService: Get, GetByName, List (paged; deprecated filter rejected), Create, Update (reset mask, resource_version, grow-only size, immutable type/block size/source/encryption), Delete, ListOperationsByParent |
✅ T2 (control plane only: no storage is allocated, nothing is attached) |
nebius.compute.v1.DiskSnapshotService: Get, GetByName, List, ListByDisk (paged), Create, Update, Delete |
✅ T2 (no data is copied) |
Disk/snapshot authorization: compute.disks.*, compute.disksnapshots.* on the project; ListByDisk checks compute.disksnapshots.list on the disk’s project |
✅ |
nebius_compute_v1_disk, nebius_compute_v1_disk_snapshot resources and data sources with the official Terraform provider |
✅ e2e: test/terraform/compute/disk_test.go (make e2e) |
nebius compute disk … / nebius compute disk-snapshot … CLI flows from the storage docs |
✅ e2e: test/computedisk (make e2e, no Docker) |
Authorization: public images readable by any authenticated principal; custom images by project roles (compute.images.*) |
✅ |
nebius_compute_v1_image data source (the provider has no image resource) with the official Terraform provider |
✅ e2e: public images in test/terraform/compute (make e2e); custom images in the same package under make e2e-images |
nebius compute image … CLI flows (list-public, get, get-by-name, get-latest-by-family, create from a bucket, list, update, list-operations-by-parent, delete) on RustFS |
✅ e2e: test/compute (make e2e-images) |
nebius.compute.v1.GpuClusterService: Get, GetByName, List (paged; deprecated filter rejected), Create (fabric checked against the catalog and the project’s region), Update (reset mask, resource_version; name and labels mutable, infiniband_fabric immutable), Delete (FAILED_PRECONDITION while status.instances is non-empty), ListOperationsByParent |
✅ T2 (inventory only: no GPUs, fabric or topology are simulated) |
GPU cluster membership port (domain.GpuClusterMembership: Join/Leave) for InstanceService spec.gpu_cluster: same project, fabric accepts the instance’s platform, synthetic deterministic infiniband_topology_path; Join and cluster Delete are atomic against each other |
✅ (domain + DAL tests; reachable over the API once InstanceService serves gpu_cluster) |
GPU cluster authorization: compute.gpuClusters.* on the project |
✅ |
nebius_compute_v1_gpu_cluster resource and data source with the official Terraform provider |
✅ e2e: test/terraform/compute/gpucluster_test.go (make e2e) |
nebius compute gpu-cluster … CLI flows |
✅ e2e: test/computegpucluster (make e2e, no Docker) |
nebius.compute.v1.NVLInstanceGroupService: Get, GetByName, List (paged), Create (spec.type GB200/GB300 required, spec.size > 0), Update (reset mask, resource_version; name and labels mutable, type and size immutable), Delete (FAILED_PRECONDITION while status.instances is non-empty) |
✅ T2 (inventory only: no NVLink domain is simulated; see NVL instance groups) |
NVL membership port (domain.NVLMembership: Join/Leave/Members) for InstanceService spec.nvl_instance_group_id: same project, platform of the group’s type, at most spec.size members; Join and group Delete are atomic against each other. status.instances[id].instance_state is read from the instances |
✅ domain, DAL, contract (test/contract/compute_nvl_test.go, compute_instance_nvl_test.go) |
NVL instance group authorization: compute.nvlInstanceGroups.* on the project; ListInstancesByNVLInstanceGroup needs compute.instances.list on the group’s project |
✅ |
nebius_compute_v1_nvl_instance_group resource and data source, and instances in a group, with the official Terraform provider |
✅ e2e: test/terraform/compute/nvl_test.go (make e2e) |
nebius compute nvl-instance-group … CLI flows |
✅ e2e: test/computenvl (make e2e, no Docker) |
nebius.compute.v1.InstanceService: Get, GetByName, BatchGet (per-ID authorization, error entries), List (paged), ListInstancesByNVLInstanceGroup (members in creation order, paged), Create, Update (reset mask, resource_version, immutable fields, stop/start by spec.stopped, preset change while stopped), Delete, Start, Stop, ListOperationsByParent |
✅ T2 (management plane only: nothing boots; see Instances) |
Instance disks: managed boot/secondary disks created and deleted with the instance (status.managed_by), existing disks attached with read_write_attachment / read_only_attachments and protected from deletion, existing ↔ managed switches |
✅ |
Instance network interfaces: VPC allocations assigned through peer.NetworkInterfaces (dynamic or user allocations, public and alias addresses, status.assignment, released on delete), default security group, MAC and FQDN in status |
✅ |
Instances in GPU clusters (spec.gpu_cluster, allow_gpu_clustering presets, status.infiniband_topology_path; cluster delete refused while it has instances) |
✅ contract (test/contract/compute_instance_gpucluster_test.go) and Terraform |
Instances in NVL instance groups (spec.nvl_instance_group_id on gpu-gb200 / gpu-gb300, immutable; recovery_policy = ALWAYS only in a group; group delete refused while it has instances) |
✅ domain, contract and Terraform |
Instances with shared filesystems (spec.filesystems through FilesystemAttachments; adding needs STOPPED, unique mount_tag, READ_WRITE only; removal and instance delete detach) |
✅ domain unit tests, contract (test/contract/compute_instance_filesystem_test.go), Terraform e2e (test/terraform/compute/instance_filesystem_test.go) |
Instances on capacity reservations (spec.reservation_policy AUTO/FORBID/STRICT, reservation_ids = capacity block group IDs, status.reservation_id; drawn on create/start through peer.CapacityReservations, held while stopped, released on delete) |
✅ domain, contract (test/contract/compute_instance_reservation_test.go), Terraform (test/terraform/compute/reservation_test.go), CLI (test/computeinstance/reservation_e2e_test.go) |
nebius.compute.v1.PlatformService: GetByName, List (paged) from a per-region catalog (NEBIUS_MOCKER_COMPUTE_PLATFORMS_FILE) |
✅ T2 |
Instance/platform authorization: compute.instances.{get,list,create,update,delete,start,stop}, compute.platforms.{get,list} on the project |
✅ |
nebius_compute_v1_instance resource and data source (CPU and GPU platforms, GPU cluster) with the official Terraform provider |
✅ e2e: test/terraform/compute/instance_test.go (make e2e) |
nebius compute instance … / nebius compute platform list CLI flows |
✅ e2e: test/computeinstance (make e2e, no Docker) |
Instance pricing model: on_demand, follows_spot_price, spot_pricing_policy (billing pricing policy of the project and platform; BLOCKED / not-ACTIVE policies keep the VM from starting; running_vm_count counted from compute’s store through peer.PricingPolicyVMs) |
✅ contract test/contract/compute_instance_spot_test.go, e2e test/terraform/compute/spot_pricing_test.go, CLI test/computeinstance/spot_e2e_test.go |
nebius.compute.v1.FilesystemService: Get, GetByName, List (paged; deprecated filter rejected), Create, Update (reset mask, resource_version, grow-only hot resize; name, type and block size immutable), Delete (FAILED_PRECONDITION while forbid_deletion, attached to instances or exposed by filesystem buckets), ListOperationsByParent |
✅ T2, with a real data plane: every filesystem is an object-store bucket (RustFS) |
Filesystem attachment port (domain.FilesystemAttachments: Attach/Detach) for InstanceService spec.filesystems: exists, same project, READY, READ_WRITE only; recorded in status.read_write_attachments in the same store transaction as the checks, so Attach and filesystem Delete never both win |
✅ (domain + DAL tests incl. an Attach-vs-Delete race; used by InstanceService) |
Mounting: Object Storage filesystem buckets (storage.v1 spec.filesystem_bucket) expose a filesystem through the S3 front; users mount them with rclone (FUSE). Writes beyond the filesystem size fail |
✅ e2e: test/filesystems (make e2e-filesystems, Docker: RustFS + rclone/rclone) |
nebius_compute_v1_filesystem resource + data source (with a nebius_storage_v1_bucket filesystem bucket in the same config) with the official Terraform provider |
✅ e2e: test/terraform/compute/filesystem_test.go (make e2e) |
nebius compute filesystem create/get/get-by-name/list/update/delete CLI flows |
✅ e2e: test/computefilesystem (make e2e, no Docker) |
| Maintenance, nodes | Planned |
Verified against: nebius/api@4522189, terraform-provider-nebius v0.6.91, gosdk v0.2.100 (filesystems: RustFS 1.0.6, rclone 1.71.2, nebius CLI 0.12.312).
Tests: domain unit tests with fakes (services/compute/domain, incl. a fuzzed payload inspector and the disk size/type/state rules), DAL tests on the
memory store, the blob adapter on the memory object store, gosdk contract tests (test/contract/compute_image_test.go,
memory object store, in make check; disks and snapshots in test/contract/compute_disk*_test.go), the Terraform suites, and the same gosdk scenarios plus the nebius
CLI against RustFS (make e2e-images, Docker).
The e2e suites put image files in the way users do (docs: compute/storage/import-image, object-storage/quickstart, object-storage/objects/upload-download); they never write into the object store, only read it to verify payloads:
- CLI (
TestCLICustomImage):nebius storage bucket create --name, thennebius iam service-account create,nebius iam group get-by-name --name editors,nebius iam group-membership create,nebius iam v2 access-key create --account-service-account-id,nebius iam v2 access-key get(secret), then the AWS CLI configured withaws configure set aws_access_key_id/aws_secret_access_key/region/endpoint_urlandaws s3 cp, thennebius compute image create --source-storage-bucket-name … --source-storage-object-name …(test/internal/awsclisandboxes~/.aws). - Go SDK and Terraform: the bucket via
BucketService.Create, an access key viaiam.v2 AccessKeyService, the upload via the AWS SDK for Go v2 against the S3 front (test/internal/s3upload), thenImageService.Create.
Image storage design
- Metadata (the
Imageproto) lives inpkg/storethroughservices/compute/dal, like every other resource. - Payloads live in the shared object store (
pkg/objstore: RustFS withNEBIUS_MOCKER_OBJSTORE=rustfs, memory by default), bucketnebius-mocker-compute-images(thenebius-mocker-prefix is reserved for internal buckets), keyimages/<image-id>. Each object carries user metadatasha256,format(qcow2|vmdk|vhd|raw),virtual-size,image-idand, for imports,source(s3://bucket/object). The adapter isservices/compute/backend/blobstore; the domain only sees itsBlobsport. - Import (
Createwithsource_storage):Preparechecks that the source object exists (otherwiseINVALID_ARGUMENTonspec.source_storage.object_name) and stores the image asCREATING(reconciling=true). The operation’sWorkreads the source once to hash and inspect it, then streams it into the image bucket with that metadata while hashing again; a source that changed in between fails the import. The image becomesREADYwithstorage_size_bytes= payload size andmin_disk_size_bytes= virtual size (from the qcow2/vmdk/vhd header; the byte size for raw) rounded up to a GiB. A failed import marks the imageERRORwithstate_descriptionand fails the operation. User buckets map 1:1 to object-store buckets, so an object uploaded through Object Storage (or straight to RustFS) is importable. Delete removes the payload, then the record. - Public catalog: for every region in
NEBIUS_MOCKER_REGIONSand every family version, aREADYimage named<family>-<version>inproject-<routing code>public-images(the upstream default parent ofGetLatestByFamilyisproject-{region}public-images). IDs are derived from (routing code, family, version), so they are stable across restarts. The payload is a small (32 KiB) deterministic synthetic qcow2 whose header declares the family’s minimum disk size; it is a real object with a real checksum. Seeding is idempotent: blobs with the right checksum are kept. Public images have nosource. They cannot be updated or deleted (PERMISSION_DENIED), and nobody can create images in a public-images project. - Families:
GetLatestByFamilypicks, amongREADYimages of the family in the parent (default: the first region’s public project), the highestversion(ties: newestcreated_at) whosestatus.image_family_deprecation.deprecated_atis not in the past. If every version is deprecated it returns the newest one, with its deprecation status, so callers can see the family is deprecated. Custom images may setimage_family/version; a (family, version) pair is unique per project (ALREADY_EXISTS). - Immutability:
image_family,version,cpu_architecture,image_family_human_readableand the source areIMMUTABLE. An Update that leaves them empty keeps them; one that changes them isINVALID_ARGUMENT.cpu_architecturedefaults toAMD64on Create. - Partial updates: the official CLI’s
updatesends only the changed fields with an empty reset mask, so the shared validation interceptor skips presence rules (required, required oneofs) on…/UpdateRPCs; value rules still apply. List.filteris deprecated upstream (“not implemented”) and rejected withINVALID_ARGUMENTnamingfilterwhen set (never silently ignored).ListOperationsByParentlists operations of a project’s images, newest first, including images deleted since (an index kept by the DAL).- Operations with
NEBIUS_MOCKER_OP_DELAYrun theirWorkon the engine’s single scheduler goroutine, so a large import delays other operations. Payloads in tests are small.
Not yet / approximations
- Catalog contents (versions, labels, sizes, dates, recommended platforms) are illustrative. The family names follow the docs; the real catalog should come from parity recording.
- The routing codes of regions other than
eu-north1(e00) are placeholders. - Payloads are never booted or converted; only their headers are read.
- No quota accounting for image storage (the public API cannot create images).
- Disks and snapshots: no
ERROR/BROKENstates, because nothing can fail without a data plane. - Instances: nothing boots or runs (no VM, no container, cloud-init is never executed); no
ERRORstate is ever reached; no capacity simulation (NotEnoughResources,RESOURCE_EXHAUSTED); no preemption, maintenance events (MaintenanceService,status.maintenance_event_id) or host recovery (sorecovery_policy = ALWAYShas nothing to retry);NodeServiceand local disk passthrough are not implemented (its spec field is rejected by name, see above). Spot prices are constant (billing has no moving market) and billing refusesmax_pricechanges while VMs run under a policy (proto), so a running VM under a pricing policy is never preempted: the docs’ preemption on a spot price rise has no trigger in the mock. Capacity reservations are implemented (see Scheduling fields), but reserved intervals that end while an instance holds GPUs do not evict or stop it. - Platform presets, GPU memory, quota type names and region availability are illustrative.
- Filesystems:
- no VM mounts (virtiofs with the
mount_tag): there are no VMs; mounts go through filesystem buckets and rclone; - no IOPS/throughput limits, no inode or max-file-size limits, no encryption settings (always on upstream);
READ_ONLYattachments (upstream supports onlyREAD_WRITE);- filesystem buckets: only the root
directoryand defaultuid/gid/file_mode/directory_mode(POSIX ownership and permissions are not emulated), and only in the filesystem’s project. Versioning, lifecycle rules, object tagging and anonymous access are refused for filesystem buckets, as the Nebius S3 compatibility page lists them as unsupported; checksums and ETags behave like regular buckets (RustFS); NETWORK_HDD,WEKA,VASTtypes (undocumented limits).
- no VM mounts (virtiofs with the
- NVL instance groups: no NVLink domain, rack or GPU is simulated, and no capacity: a group of any
sizecan be created. Nebius does not publish the GB200/GB300 platform and preset names, sogpu-gb200/gpu-gb300with preset4gpu-128vcpu-1600gb(one compute tray: 4 GPUs) and their regions are illustrative; replace them withNEBIUS_MOCKER_COMPUTE_PLATFORMS_FILE(nvl_instance_group_type). Assumptions where the docs are silent:spec.typeis required (UNSPECIFIEDisINVALID_ARGUMENT),spec.nvl_instance_group_idis immutable on an instance (likegpu_cluster, placement is decided at creation), instances of NVL platforms may also run outside a group, and a full group isFAILED_PRECONDITION. mk8s node groups withtemplate.nvlinkare still rejected by the mk8s module. - GPU clusters: no fabric or topology simulation (
infiniband_topology_pathis synthetic), no capacity modeling. The exact upstream error for an instance whose platform does not match the cluster’s fabric is undocumented; the mock answersINVALID_ARGUMENTonspec.gpu_cluster.id.
Overview
Compute covers VM and GPU instances, block disks and disk snapshots, shared filesystems, images (public catalog and custom), GPU clusters (InfiniBand fabrics), NVLink instance groups, the platform catalog (CPU/GPU types and presets), host maintenance events and bare-metal nodes.
| Resource kind | Message | NID prefix | Parent | States |
|---|---|---|---|---|
| Instance | Instance |
computeinstance |
project | CREATING, UPDATING, STARTING, RUNNING, STOPPING, STOPPED, DELETING, ERROR |
| Disk | Disk |
computedisk |
project | CREATING, READY, UPDATING, DELETING, ERROR, BROKEN |
| Disk snapshot | DiskSnapshot |
computedisksnapshot |
project | |
| Filesystem | Filesystem |
computefilesystem |
project | CREATING, READY, UPDATING, DELETING, ERROR; types NETWORK_SSD, NETWORK_HDD, WEKA, VAST |
| Image | Image |
computeimage |
project (project-{region}public-images for public) |
|
| GPU cluster | GpuCluster |
computegpucluster |
project | spec.infiniband_fabric*; status.instances[] |
| NVL instance group | NVLInstanceGroup |
computenvlinstancegroup |
project | |
| Platform | Platform |
computeplatform |
— (catalog) | read-only |
| Maintenance | MaintenanceEvent |
computemaintenance |
instance | read-only |
| Node | Node |
— | — | SetUnhealthy |
Emulation design
Catalogs (seed)
-
Platforms (
PlatformService.GetByName/List, implemented): the catalog of a project’s region. The region is the project’sspec.region(from IAM,peer.ProjectRegions); without IAM, the NID routing code. A platform that is not offered in that region isNOT_FOUNDonGetByName, absent fromList, andINVALID_ARGUMENTonspec.resources.platformwhen an instance asks for it. Names and presets follow docscompute/virtual-machines/types:cpu-e2,cpu-d3(160 vCPU and up not in eu-north1),gpu-h100-sxm,gpu-h200-sxm,gpu-b200-sxm,gpu-b200-sxm-a,gpu-b300-sxm,gpu-gb200andgpu-gb300(illustrative names, see NVL instance groups),gpu-rtx6000,gpu-rtx6000-a,gpu-l40s-a,gpu-l40s-d, presets like2vcpu-8gband8gpu-128vcpu-1600gb. Only the 8-GPU presets of H100/H200/B200/B300 haveallow_gpu_clustering; GPU platforms havestatus.allowed_for_preemptibles; every platform hasallow_preset_change. GPU memory, quota type names and region lists are illustrative. Platform IDs are stable per (region, name);metadata.parent_idis the requested project. The built-in catalog isservices/compute/domain/platforms.yaml; format ofNEBIUS_MOCKER_COMPUTE_PLATFORMS_FILE(YAML or JSON, replaces it):platforms: - name: gpu-h100-sxm human_readable_name: NVIDIA H100 NVLink with Intel Sapphire Rapids short_human_readable_name: H100 gpu_count_quota_type: gpu-h100 gpu_memory_gigabytes: 80 allow_preset_change: true allowed_for_preemptibles: true nvl_instance_group_type: "" # GB200 or GB300: instances may join NVL groups of that type regions: [eu-north1] # empty: every configured region presets: - { name: 8gpu-128vcpu-1600gb, vcpu_count: 128, memory_gibibytes: 1600, gpu_count: 8, allow_gpu_clustering: true } - { name: 1gpu-16vcpu-200gb, vcpu_count: 16, memory_gibibytes: 200, gpu_count: 1, exclude_regions: [] } -
Public images: a catalog under
project-<routing>public-imageswith families (ubuntu22.04-driverless,ubuntu22.04-cuda12,ubuntu24.04-driverless,mk8s-worker-node-…). Every family has at least one version.GetLatestByFamilyreturns the newest.ListPubliclists the catalog. Each image has a CPU architecture, a minimum disk size, and a status ofREADY. Implemented; see Image storage design. The built-in catalog isservices/compute/domain/catalog.yaml. The upstream Terraform example usesimage_family = "ubuntu22.04", which is not a real Nebius family (docscompute/storage/boot-disk-images), so the mock answersNOT_FOUNDfor it, as the cloud would; no alias is seeded. The example works verbatim with real IDs and a real family (e.g.ubuntu24.04-driverless), whichtest/terraform/computeproves.Catalog file format (
NEBIUS_MOCKER_COMPUTE_IMAGES_FILE, YAML or JSON; it replaces the built-in catalog):families: - name: acme-os # spec.image_family human_readable: Acme OS # spec.image_family_human_readable description: Acme OS base image cpu_architecture: AMD64 # or ARM64; default AMD64 min_disk_size_gibibytes: 20 # becomes status.min_disk_size_bytes labels: { os_name: Acme } recommended_platforms: [cpu-e2] unsupported_platforms: { gpu-l40s-a: "no drivers" } regions: [eu-north1] # default: every region deprecation: { at: 2026-01-01T00:00:00Z, message: "use acme-os2" } # whole family versions: - version: "20250101" # created_at = this date when it is YYYYMMDD - version: "20250601" released_at: 2025-06-01T12:00:00Z deprecation: { at: 2025-07-01T00:00:00Z, message: "bad build" } # this version only
Instances (implemented)
Management plane only: an instance is a record with a lifecycle, disk attachments and VPC addresses; nothing boots.
Rules come from docs compute/virtual-machines/{lifecycle,update,fqdn,network,preemptible,reservations,delete} and
compute/storage/{use,detach-volume}, and from the proto comments. The spec is echoed exactly as sent (the provider
marks no spec attribute computed); everything synthesized lives in status.
- Lifecycle: Create →
CREATING→RUNNING, orSTOPPEDwithspec.stopped.Stop(RUNNING→STOPPING→STOPPED) andStart(STOPPED→STARTING→RUNNING) are refused in other states (FAILED_PRECONDITION); they do not changespec.stopped. On Update, togglingspec.stoppedstops or starts the instance; other spec changes run asUPDATING; a metadata-only change has no transition. OnlyRUNNING/STOPPEDinstances can be updated, andRUNNING/STOPPED/ERRORones deleted.NEBIUS_MOCKER_OP_DELAYmakes the transitional states observable. - Resources: platform and preset must be offered in the project’s region (
INVALID_ARGUMENTonspec.resources.platform/.preset). The platform is immutable. The preset can change only while the instance isSTOPPED(FAILED_PRECONDITIONotherwise) and the platform hasallow_preset_change. - Immutable (
INVALID_ARGUMENT“field is immutable”):service_account_id,resources.platform,gpu_cluster,recovery_policy,preemptible(docs: it cannot be added or removed), and per interface (matched by name)subnet_idandip_address.service_account_idmust be an existing service account of the instance’s project. - Disks: the boot disk and
secondary_disksareexisting_disk{id}ormanaged_disk{name, labels, spec}.- A managed disk is a real
computediskcreated with the DiskService rules (type, size, source image/family/snapshot),READYat once (no data to copy), withstatus.managed_by= the instance. A name already used by a disk in the project fails withALREADY_EXISTS. Managed disks are matched by name on update: a new name creates a disk, a removed or renamed one is deleted (renaming replaces, as the proto says). Size may grow,forbid_deletionand labels may change; type, block size, source and encryption are immutable. DiskService.Update of a managed disk isFAILED_PRECONDITION(“Updates via DiskService are not allowed”). - An existing disk must be in the project and
READY, and not managed by another instance.READ_WRITEneeds no other attachment;READ_ONLYneeds no read-write attachment elsewhere (FAILED_PRECONDITION). The disk’sstatus.read_write_attachment/read_only_attachmentsrecord the instance, so it cannot be deleted while attached. - Switching
existing_disk→managed_diskof the same disk needs the disk’s name and its spec copied exactly (INVALID_ARGUMENTotherwise) and noforbid_deletion. Switching back (by the ID instatus.disk_attachments) clearsmanaged_by. - Omitting a secondary disk detaches it (existing) or deletes it (managed), in any state. The boot disk cannot be
detached or replaced (
INVALID_ARGUMENTonspec.boot_disk).device_idand disk IDs are unique per instance. status.disk_attachmentslists{id, name, is_managed}, boot disk first.
- A managed disk is a real
- Network interfaces (1–8, unique names): addresses are VPC allocations, assigned through
peer.NetworkInterfaces(provided by vpc) withstatus.assignment.network_interface{instance_id, name, type PRIMARY|PUBLIC|ALIAS}, stateASSIGNED.ip_address = {}creates a dynamic allocation (lowest free address in the subnet, named<instance>-<nic>-private,status.static=false);ip_address.allocation_idbinds a user allocation (same project, in the subnet’s space, unassigned).public_ip_address = {}is a dynamic public address. Per docscompute/virtual-machines/networkit is returned to the range once the instance has beenSTOPPEDfor more than one hour: until then the stopped instance keeps it (status shows it, the allocation staysASSIGNED) and a Start reuses it; after that it is released (the allocation is deleted, status has no public address) and the next Start assigns a new one. The period isNEBIUS_MOCKER_COMPUTE_PUBLIC_IP_RELEASE_AFTER(default1h), counted on the mock clock from when the instance settles inSTOPPED(updates while stopped do not restart it); a sweep releases due addresses every minute of that clock, and a Start or Update after the period releases them first.static = truekeeps it across stops; anallocation_idbinds a user allocation. Aliases bind user allocations. Security groups must belong to the subnet’s network; an empty list means the network’s default group, shown in status only. Delete releases everything: dynamic allocations are deleted, user allocations becomeALLOCATEDagain and survive. Interfaces may be added or removed on update. - Status: per interface
ip_address,public_ip_address{address, allocation_id, static},aliases.cidrs, a stable locally administered MAC02:4e:42:xx:xx:xx(from the instance and interface),fqdn<hostname or instance ID>.<network ID>.compute.internal.(docscompute/virtual-machines/fqdn; a hostname change updates it) and the effectivesecurity_groups. - GPU clusters:
spec.gpu_cluster.idneeds a preset withallow_gpu_clustering(INVALID_ARGUMENTonspec.gpu_cluster.id); Create joins the cluster (GpuClusterMembership: same project, fabric accepts the platform) and recordsstatus.infiniband_topology_path; Delete leaves it. - Filesystems:
existing_filesystem.idwith amount_tagunique per instance; attached on Create (FilesystemAttachments: same project,READY,READ_WRITEonly). Adding one on Update needs the instanceSTOPPED(docscompute/storage/use); removing one, or deleting the instance, detaches it (never deletes it). - Scheduling fields:
preemptibleneeds a platform withallowed_for_preemptiblesandrecovery_policy = FAIL(docs);on_preemptionisSTOP. Nothing is ever preempted (no capacity simulation, constant spot prices).recovery_policyRECOVER/FAILare echoed (hosts never fail). - Pricing model (
spec.pricing_model, docscompute/virtual-machines/preemptible,signup-billing/pricing-policy,domain/instance_pricing.go):on_demandis for regular VMs (INVALID_ARGUMENTonspec.on_demandwithpreemptible);follows_spot_priceandspot_pricing_policyneedpreemptible(INVALID_ARGUMENTnaming the field). The model may change on Update (docs: “select another pricing policy before starting it”).spot_pricing_policy.idis a billing pricing policy read throughpeer.PricingPolicies. A new reference (Create, or an Update that changes it) must exist (NOT_FOUND), belong to the instance’s project and price its platform (INVALID_ARGUMENTonspec.spot_pricing_policy.id), and not beDELETING(FAILED_PRECONDITION). An unchanged reference is not re-checked, so a stopped VM whose policy was deleted can still be updated.- Starting (Create without
stopped, Start, an Update that starts the VM or switches a running VM to another policy) needs the policyACTIVEwithscheduling_state = ALLOWED:CREATING/UPDATINGis a retryableABORTED,DELETINGorBLOCKED(max_price below the spot price) isFAILED_PRECONDITION, a deleted policyNOT_FOUND. A Create under a blocked policy fails its operation but leaves the VMSTOPPED(docs: “the request returns an error, but the VM is created in the stopped state”); Start and Update fail synchronously and change nothing. - Billing’s
status.running_vm_countis counted from compute’s store on every read (peer.PricingPolicyVMs): instances of the project under the policy that areSTARTING,RUNNING,STOPPING, orCREATING/UPDATINGwithoutspec.stopped(an instance stopped with Stop counts while an Update runs on it). It survives restarts and keeps the policy’smax_priceand deletion locked while VMs run. - Starts and policy changes are atomic with each other: compute checks the policy and writes the start inside
peer.PricingPolicies.Admit, which holds billing’s policy lock, the lock billing’s max_price change and Delete hold while they count and write. A Start racing a max_price change never has both succeed (test/contract/compute_instance_spot_race_test.go). Lock order: compute’s NIC lock, then billing’s policy lock, then compute’s store and the peers a start calls; billing, under its lock, only reads compute’s store.
- Capacity reservations (
reservation_policy, docscompute/virtual-machines/reservations;domain/instance_reservation.go):reservation_idsare capacity block group IDs (services/capacity), tried in order. GPUs are drawn throughpeer.CapacityReservations, which enforces the group’s current limit and the project’s capacity allowance, and shows up in the group’sstatus.usageandListResources.AUTO(default) draws from a reservation that fits (the named ones, else any active matching group of the tenant: region, platform, and the GPU cluster’s fabric) and otherwise runs in the common pool.FORBIDuses only the pool;reservation_idswithFORBIDisINVALID_ARGUMENT.STRICTfails the request withRESOURCE_EXHAUSTEDwhen no reservation fits (FAILED_PRECONDITIONwhen the capacity module is disabled).- An unknown ID is
NOT_FOUNDand one for another platform, region or fabric isINVALID_ARGUMENTonspec.reservation_policy.reservation_ids[i], underAUTOtoo: the docs only describe falling back for exhausted or inactive reservations. - Only regular GPU instances use reservations:
STRICTorreservation_idson a CPU or preemptible instance isINVALID_ARGUMENT. Quantity is the preset’s GPU count. - Drawn on Create and on Start (also an Update that starts the instance) when the instance holds none. Held while
STOPPED(docs: reserved GPUs “remain available, even if a VM is stopped”), released on Delete and on a failed Create.status.reservation_idis the block group drawn from (empty: the common pool). reservation_policycan change only whileSTOPPED(FAILED_PRECONDITIONotherwise, docs: stop the VM first); changing it or the preset drops the held reservation, and the next start draws again.
- NVL instance groups:
spec.nvl_instance_group_idjoins the group on Create (NVLMembership: same project, the platform’snvl_instance_group_typeequals the group’sspec.type, fewer thanspec.sizemembers, elseNOT_FOUND/INVALID_ARGUMENTonspec.nvl_instance_group_id/FAILED_PRECONDITION); Delete leaves it. The field is immutable on Update.recovery_policy = ALWAYSisINVALID_ARGUMENTwithout a group (instance.proto: “Available only for instances in nvlinstancegroup”). - Rejected by name (
INVALID_ARGUMENT, “… is not implemented in NebiusMocker yet”):local_disks.passthrough_group.requested = true. cloud_init_user_data(sensitive) is stored and echoed, redacted in audit events, and never executed.BatchGet(up to 1000 IDs) authorizes each ID (compute.instances.get) and returns agoogle.rpc.Status(NOT_FOUND,PERMISSION_DENIED) in place of each unreadable instance.ListInstancesByNVLInstanceGrouplists a group’s members in creation order (NOT_FOUNDfor an unknown group).ListOperationsByParentlists a project’s instance operations, newest first, including deleted instances.- Ordering: NIC addresses are bound first (VPC), then the GPU cluster, the NVL group and filesystems, then the capacity reservation, then disks and the instance in one store transaction; a failure undoes the earlier steps. The operations engine serializes per instance.
Managed node instances (mk8s)
The nodes of an mk8s node group are ordinary instances in the cluster’s project that the node group owns. The mk8s
module creates and deletes them through the in-process capability peer.ComputeNodes (provided by this module, no RPC
and no IAM check: mk8s authorized its own request):
CreateNodebuilds the instance spec a node template implies (preset, managed boot disk<node>-bootfrom an image family, one NICeth0with a dynamic private address and optionally a dynamic public one, service account, GPU cluster, filesystems, cloud-init, preemptible) and creates it RUNNING at once, with no operation: the node group’s operation is the visible one. It is idempotent per (node group, node name). Labels (the node-group and cluster labels are set by mk8s) are the instance labels. Ownership is a store index (computenode: instance to node group and cluster).CheckTemplateruns the same validation asCreatewithout storing anything and reports violations under the mk8s NodeTemplate’s field names (resources.preset,boot_disk.size_bytes,network_interfaces[0].subnet_id,service_account_id,gpu_cluster.id,filesystems[i].existing_filesystem.id). A READ_ONLY filesystem is rejected (filesystems[i].attach_mode): compute attaches READ_WRITE only. Whether the GPU cluster or filesystem exists is checked when a node is created, not byCheckTemplate.DeleteNoderemoves the instance with its boot disk, addresses, GPU cluster and filesystem attachments; a missing instance is not an error.- Reads (
Get,GetByName,List,BatchGet) are unchanged.Update,Delete,StartandStopof a node fail withFAILED_PRECONDITIONbefore an operation is created:instance <id> is a node of mk8s node group <node-group-id> (cluster <cluster-id>) and is managed by it: change the node group instead.
Disks and snapshots (implemented)
Management APIs only: a disk is a record with a lifecycle. No storage is allocated. Instances set
status.read_write_attachment / read_only_attachments / managed_by (see Instances). Rules come from docs compute/storage/types, compute/storage/manage and
compute/storage/disk-snapshots, and from the proto comments:
- Types:
NETWORK_SSD1–8192 GiB;NETWORK_SSD_NON_REPLICATEDandNETWORK_SSD_IO_M393–262,074 GiB in multiples of 93 GiB.NETWORK_HDDis in the enum, but the docs list no HDD disk type, so it is rejected withINVALID_ARGUMENT(“not available”) rather than given invented limits.UNSPECIFIEDisINVALID_ARGUMENT. - Size: exactly one of
size_bytes|kibibytes|mebibytes|gibibytes, normalized intostatus.size_bytes. The spec is echoed as sent, so Terraform round-trips without drift. Sizes are multiples of 4 MiB and of the block size. A disk holds at most 2^32 blocks (16 TiB with 4 KiB blocks). Boot disks (from an image) are at most 30,720 GiB. Size only grows on Update (INVALID_ARGUMENTotherwise). A grow runs asUPDATING→READY. - Block size: a power of two from 4 KiB to 128 KiB. It is immutable. If unset,
spec.block_size_bytesstays 0 andstatus.block_size_bytesis 4096. - Encryption:
DISK_ENCRYPTION_MANAGEDis accepted for NRD and IO M3 only (proto). Network SSD is always encrypted by the platform, soMANAGEDon it isINVALID_ARGUMENT. The setting is stored, echoed and immutable. - Sources (immutable):
source_image_idmust exist (NOT_FOUND), beREADY(FAILED_PRECONDITION) and be public or in the disk’s project (INVALID_ARGUMENT).source_image_familyresolves throughImageService.GetLatestByFamily(default parent: the first region’s public-images project). A deprecated family isFAILED_PRECONDITION.source_snapshot_idmust exist, be in the same project (docs: snapshots are usable only within their project) and beREADY.- The size must be at least the image’s
min_disk_size_bytesor the snapshot’scontent_size_bytes. status.source_image_idandstatus.source_image_cpu_architecturerecord the image used.- While a disk is
CREATINGfrom a snapshot, the snapshot’sstatus.lock_state.disksholds the disk, and the snapshot can’t be deleted.
- Delete:
FAILED_PRECONDITIONwithdisk cannot be deleted because forbid_deletion is set(the docs’ wording), or while the disk is attached, managed by an instance, or locked (status.lock_state.images|snapshots). Deleting a disk that has snapshots is allowed, and the snapshots stayREADYwith a stalesource_disk_id. The proto says this ID “may become stale if the disk is deleted”, and the docs describe no cascade or block. - forbid_deletion can be changed only on a standalone disk (docs). A disk with
managed_byisFAILED_PRECONDITION. - Snapshots:
source_disk_idmust exist (NOT_FOUND) and beREADY(FAILED_PRECONDITION).parent_idmust be the disk’s project (docs). A tenant parent is thereforeINVALID_ARGUMENT.- While
CREATING, the disk’sstatus.lock_state.snapshotsholds the snapshot, and the disk can’t be deleted. - Status:
content_size_bytes = storage_size_bytes =the disk’sstatus.size_bytes(no incremental snapshots), andsource_cpu_architecturecomes from the disk. The proto has no type field to copy. - Name, labels and
description(≤ 1024 characters) are mutable. ListByDiskneeds an existing disk and lists its snapshots in the disk’s project.
- Cross-resource checks and locks run in one store transaction (
Mutatein the DAL), so they don’t race with a concurrent delete. The operations engine only serializes per resource ID. DiskReader(domain/ports.go,dal.NewDiskReader) gives images read access for image-from-disk/snapshot.
Shared filesystems (implemented)
Rules from https://docs.nebius.com/compute/storage/types and /compute/storage/manage (read 2026-11-25):
- Types: only
NETWORK_SSDis documented.NETWORK_HDD,WEKAandVASTare in the proto enum (“the list of available types will be clarified later”) but have no documented limits, so they areINVALID_ARGUMENT(“not available”) rather than given invented ones. - Size: 1 GiB to 100 PiB (104,857,600 GiB), any unit of the
sizeoneof. The docs give no size multiple, so none is enforced.status.size_bytesis the normalized size. Sizes only grow; a grow is a hot resize (UPDATING, thenREADYwith the newstatus.size_bytes). - Block size: a power of two from 4 KiB to 128 KiB, default 4096 in
status.block_size_bytes;specechoes what was sent (no drift). - Immutable: type and block size (Terraform replaces), and the name (docs: “cannot be changed”; an Update with a
different name is
INVALID_ARGUMENT). Labels andforbid_deletionare mutable. - Delete is
FAILED_PRECONDITIONwhileforbid_deletionis set, while instances are attached (status.read_write_attachments), and while an Object Storage filesystem bucket exposes it (the docs don’t say what upstream does; refusing keeps the bucket from silently pointing at nothing). The operation then purges every file. Both references are atomic with deletion: bucket Create records itself on the filesystem (Expose, store kindcomputefilesystem.exposure) in the same compute store transaction as the filesystem’s READY/project checks, and Delete reads those records in the transaction that marks the filesystemDELETING, so a racing bucket Create and filesystem Delete never both succeed (DAL race tests, like Attach vs Delete). A bucket whose record cannot be stored is unexposed again; bucket delete unexposes. - Attachments (docs: compute/storage/use): one filesystem attaches to many VMs of its project,
READ_WRITEonly. InstanceService checks that the VM is stopped and thatmount_tagis unique per VM, then callsFilesystemAttachments.Attach. Instance delete detaches.
Data plane design
- Each filesystem is backed by its own internal object-store bucket
nebius-mocker-fs-<filesystem-id>(thenebius-mocker-prefix is reserved for internal buckets;services/compute/backend/fsstore). The Create operation provisions it in itsWork(a failure leaves the filesystemERRORwithstate_description); the Delete operation removes it with every file. A file is one object keyed by its path. WithNEBIUS_MOCKER_OBJSTORE=rustfsthis is RustFS; the default memory store keeps the same semantics for Docker-free tests. - Access path: Nebius exposes a filesystem over S3 with filesystem buckets
(https://docs.nebius.com/object-storage/buckets/filesystem-buckets: “the Object Storage interface to an existing
shared filesystem”, used with “AWS CLI, rclone, or s5cmd”). The mocker implements exactly that: a
storage.v1bucket withspec.filesystem_bucket.filesystem_idis a view of the filesystem’s store bucket. The S3 front (:4580) authenticates and authorizes it like any bucket (SigV4 with an iam.v2 access key,storage.*permits), then relays to the store bucket; response bodies name the Nebius bucket and report theFILESYSTEMstorage class. Storage reaches compute only throughpeer.FilesystemsKey(pkg/peer/filesystems.go:Filesystem,Expose,Unexpose); compute never calls storage. - Capacity: every write that adds bytes (PutObject, CopyObject, UploadPart, UploadPartCopy) is refused with S3
QuotaExceededwhen the stored bytes of the filesystem (all files plus in-flight multipart parts, shared by every bucket of the filesystem) plus the request would exceedstatus.size_bytes. An overwrite counts only the size difference, and deletes free space immediately (the store bucket is never versioned). Concurrent writes are not serialized, so the limit can be overshot by in-flight requests, as formax_size_bytes. - Deleting a filesystem bucket is immediate (no delayed deletion or restore) and keeps the files; a new filesystem bucket on the same filesystem shows them.
Mounting a shared filesystem (user guide)
There are no VMs, so you mount the filesystem from your machine or a container with rclone, through a filesystem
bucket. The mocker must run with NEBIUS_MOCKER_OBJSTORE=rustfs (the S3 front needs RustFS).
-
Create the filesystem and a filesystem bucket (Terraform, or
nebius compute filesystem create --parent-id <project> --name shared --type network_ssd --size-gibibytes 1andnebius storage bucket create --parent-id <project> --name shared-fs --filesystem-bucket-filesystem-id <filesystem-id>):resource "nebius_compute_v1_filesystem" "shared" { name = "shared" type = "NETWORK_SSD" size_gibibytes = 1 block_size_bytes = 4096 } resource "nebius_storage_v1_bucket" "shared" { name = "shared-fs" filesystem_bucket = { filesystem_id = nebius_compute_v1_filesystem.shared.id } }Only the filesystem root with default ownership can be exposed:
directorymay be empty or"/",uidandgid0,file_modeempty or"644",directory_modeempty or"755"(other values areINVALID_ARGUMENT, see Not yet). The filesystem must beREADYand in the bucket’s project, and the caller needscompute.filesystems.useViaObjectStorageon it. The roles are Nebius’s (IAM roles reference:editor,adminandcompute.use-via-object-storage, “access data stored on shared filesystems through filesystem buckets in Object Storage”, grant “Use through Object Storage”); the permission identifier is mock-specific, since the docs list only role names and permission labels. - Create a service account in the project’s
editorsgroup and an access key (nebius iam service-account create,nebius iam group-membership create --parent-id <editors-group-id> --member-id <sa-id>,nebius iam v2 access-key create --parent-id <project> --account-service-account-id <sa-id>), and read the secret withnebius iam v2 access-key get-secret --id <key-id>(orsecret_delivery_mode = "EXPLICIT"in Terraform and thenebius_iam_v2_access_key_secretephemeral resource). -
Configure rclone (
~/.config/rclone/rclone.conf; in the official image/config/rclone/rclone.conf):[nebius] type = s3 provider = Other access_key_id = <aws_access_key_id> secret_access_key = <secret> endpoint = http://localhost:4580 # from a container on Docker Desktop: http://host.docker.internal:4580 region = eu-north1 force_path_style = true - Mount:
- in a container (any host with Docker; this is what
make e2e-filesystemsruns):docker run --rm -it --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined -v ~/.config/rclone:/config/rclone --entrypoint sh rclone/rclone:1.71.2 -c 'mkdir -p /mnt/fs && rclone mount nebius:shared-fs /mnt/fs --daemon && sh'. Unmount withumount /mnt/fsbefore the container exits so pending writes finish; - on a Linux host with FUSE:
rclone mount nebius:shared-fs /mnt/fs(same remote; not covered by the e2e suite); - on macOS, rclone documents
rclone nfsmountas the variant that needs no macFUSE (not covered by the e2e suite).
Files written through any mount (or with
aws s3 cpto the bucket) are visible to every other mount. A write that would exceed the filesystem size fails (QuotaExceededfrom the S3 front; an I/O error in the mount). - in a container (any host with Docker; this is what
GPU clusters (implemented)
Management plane only (docs: compute/clusters/gpu). A cluster holds spec.infiniband_fabric and the IDs of its member
instances; nothing is allocated.
- Create:
spec.infiniband_fabricis required and must be a catalog fabric in the region of the parent project (peer.ProjectRegions, provided by IAM). Unknown or other-region fabrics →INVALID_ARGUMENTonspec.infiniband_fabric, listing the fabrics of the project’s region. The spec is echoed exactly as sent;status.reconcilingis true until the operation completes. - Update: name and labels change in place (reset-mask semantics,
resource_versionchecked and bumped). A differentinfiniband_fabric→INVALID_ARGUMENT(“field is immutable”); an unset one keeps the stored fabric. Terraform replaces the cluster on a fabric change (RequiresReplace). Status is server-owned and kept. - Membership: instances join only at creation through
GpuClusterMembership.Join(InstanceService). The cluster must exist (NOT_FOUND), be in the instance’s project, and its fabric must accept the instance’s platform (one fabric = one platform) — otherwiseINVALID_ARGUMENTonspec.gpu_cluster.id. Join appends tostatus.instancesand records a deterministic path[<fabric>, <fabric>-spine-NN, <fabric>-leaf-NNN](derived from the instance ID) instatus.infiniband_topology_path. Leave (instance delete) is idempotent; the topology is cleared with the last member. The “8-GPU presets only” rule is checked by InstanceService against the platform catalog. - Delete:
FAILED_PRECONDITIONwhilestatus.instancesis non-empty (“deleted or moved to another cluster”). The check and the removal run in one store transaction, so a Join racing a Delete either blocks it or fails withNOT_FOUND.
Fabric catalog file (NEBIUS_MOCKER_COMPUTE_FABRICS_FILE, YAML or JSON; it replaces the built-in
services/compute/domain/fabrics.yaml, taken from the public docs’ fabric table on 2026-11-25). Unknown keys are
rejected. Fabrics of regions the mocker does not emulate are kept but unusable:
fabrics:
- name: fabric-3 # spec.infiniband_fabric
region: eu-north1 # only projects of this region can use it
platforms: [gpu-h100-sxm] # platforms whose instances may join
NVL instance groups
Management plane only (nebius.compute.v1.NVLInstanceGroupService; proto: “NVLink InstanceGroup”, spec.type
“corresponds to the Compute platform”, spec.size “maximum number of instances”). A group is a GB200 or GB300 NVL72
NVLink domain; nothing is allocated.
- Create:
spec.typemust beGB200orGB300andspec.size> 0 (INVALID_ARGUMENTotherwise). The spec is echoed exactly as sent;status.reconcilingis true until the operation completes. - Update: name and labels change in place (reset-mask semantics,
resource_versionchecked and bumped); a differenttypeorsize→INVALID_ARGUMENT(“field is immutable”), an unset one keeps the stored value. The Terraform provider replaces the group on any change (name,labels,typeandsizeareRequiresReplace). - Membership: an instance joins at creation through
NVLMembership.Joinwhenspec.nvl_instance_group_idis set. The group must exist (NOT_FOUND) and be in the instance’s project, and the instance’s platform must have the group’s type (nvl_instance_group_typein the platform catalog:gpu-gb200→GB200,gpu-gb300→GB300), otherwiseINVALID_ARGUMENTonspec.nvl_instance_group_id. A group withsizemembers is full (FAILED_PRECONDITION). Instance delete leaves the group. - Status:
status.instancesmaps each member ID to its currentinstance_state, read from the instance on every Get/GetByName/List;status.reconcilingis also true while any member is in a transitional state. - Delete:
FAILED_PRECONDITIONwhile the group has instances; the check and the removal run in one store transaction, so a racing Join either blocks it or fails withNOT_FOUND. InstanceService.ListInstancesByNVLInstanceGrouplists the members in creation order (paged), authorized withcompute.instances.liston the group’s project.
Integrity
- An attached disk cannot be deleted. An instance in a GPU cluster or an NVL instance group blocks deletion of the cluster or group.
ListInstancesByNVLInstanceGroupreads the group’s member list;BatchGettakes up to the documented max IDs.
Permissions and quotas
- Permissions:
compute.instances.*(+start,stop),compute.disks.*,compute.disksnapshots.*,compute.filesystems.*(implemented; pluscompute.filesystems.useViaObjectStoragefor filesystem buckets),compute.images.*,compute.gpuClusters.*,compute.nvlInstanceGroups.*,compute.platforms.get/list. - Quotas (enforced, see quotas.md), charged to the project from creation until deletion, running
or stopped (the docs: “VMs count toward quota from creation to deletion”):
- instances:
compute.instance.count(orcompute.instance.preemptible.count), pluscompute.instance.non-gpu.vcpu= preset vCPUs on non-GPU platforms, orcompute.instance.gpu.<family>= preset GPUs on GPU platforms for regular VMs (gpu-h100-sxm→h100). Preset changes claim the delta. mk8s nodes and NVL group members are ordinary instances and count the same way; - disks, including managed boot disks:
compute.disk.countandcompute.disk.size.<type>(bytes); resizes claim the growth; - snapshots:
compute.disk.snapshot.countandcompute.disk.snapshot.size(the source disk’s size); - filesystems:
compute.filesystem.countandcompute.filesystem.size.<type>; resizes claim the growth; - GPU clusters:
compute.gpucluster.count.
The check runs in each create’s or update’s synchronous step, so an exceeded quota is the RPC’s
RESOURCE_EXHAUSTED. There is no memory quota (Nebius documents none). GPUs drawn from a capacity reservation (status.reservation_idset) are not charged tocompute.instance.gpu.<family>(docs: “GPUs allocated from reservations do not count towards quotas on the number of GPUs”); the reservation is decided before the quota claim, and a refused claim releases it. The instance and its disks are still charged. Changing the policy of a stopped reserved VM so that it leaves the reservation claims its GPUs. - instances:
Terraform
| Kind | Terraform type | Service | RPCs called | Tier |
|---|---|---|---|---|
| Resource | nebius_compute_v1_disk |
nebius.compute.v1.DiskService |
Get, GetByName, Create, Update, Delete + OperationService.Get | T2 |
| Resource | nebius_compute_v1_disk_snapshot |
nebius.compute.v1.DiskSnapshotService |
Get, GetByName, Create, Update, Delete + OperationService.Get | T2 |
| Resource | nebius_compute_v1_filesystem |
nebius.compute.v1.FilesystemService |
Get, GetByName, Create, Update, Delete + OperationService.Get | T2 |
| Resource | nebius_compute_v1_gpu_cluster |
nebius.compute.v1.GpuClusterService |
Get, GetByName, Create, Update, Delete + OperationService.Get | T2 |
| Resource | nebius_compute_v1_instance |
nebius.compute.v1.InstanceService |
Get, GetByName, Create, Update, Delete + OperationService.Get | T2 |
| Resource | nebius_compute_v1_nvl_instance_group |
nebius.compute.v1.NVLInstanceGroupService |
Create, Get, GetByName, Update, Delete + OperationService.Get | T2 |
| Data source | nebius_compute_v1_disk |
nebius.compute.v1.DiskService |
Get, GetByName | T2 |
| Data source | nebius_compute_v1_disk_snapshot |
nebius.compute.v1.DiskSnapshotService |
Get, GetByName | T2 |
| Data source | nebius_compute_v1_filesystem |
nebius.compute.v1.FilesystemService |
Get, GetByName | T2 |
| Data source | nebius_compute_v1_gpu_cluster |
nebius.compute.v1.GpuClusterService |
Get, GetByName | T2 |
| Data source | nebius_compute_v1_image |
nebius.compute.v1.ImageService |
Get, GetByName | T2 |
| Data source | nebius_compute_v1_instance |
nebius.compute.v1.InstanceService |
Get, GetByName | T2 |
| Data source | nebius_compute_v1_nvl_instance_group |
nebius.compute.v1.NVLInstanceGroupService |
Get, GetByName | T2 |
nebius_compute_v1_image is a data source only. It calls Get / GetByName, so public images need stable IDs and names,
plus status fields such as image_family_human_readable and image_family_deprecation. Family resolution
(GetLatestByFamily) is used server-side, when a disk or managed disk specifies source_image_family. The
upstream example examples/resources/nebius_compute_v1_instance (managed boot disk from image_family = "ubuntu22.04")
must work verbatim, so the default image catalog has to include whatever families the upstream examples use.
Configuration
| Env | Default | Description |
|---|---|---|
NEBIUS_MOCKER_COMPUTE_PLATFORMS_FILE |
built-in (services/compute/domain/platforms.yaml) |
Platform/preset catalog file (YAML/JSON, format above); replaces the built-in one. Implemented |
NEBIUS_MOCKER_COMPUTE_IMAGES_FILE |
built-in (services/compute/domain/catalog.yaml) |
Public image catalog file (YAML/JSON, format above); replaces the built-in one. Implemented |
NEBIUS_MOCKER_COMPUTE_FABRICS_FILE |
built-in (services/compute/domain/fabrics.yaml) |
InfiniBand fabric catalog of GPU clusters (YAML/JSON, format); replaces the built-in one. Implemented |
NEBIUS_MOCKER_REGIONS |
eu-north1=e00,eu-west1=e01,us-central1=u00,me-west1=m00 |
Regions with a public image catalog (ListPublic --region); the first is the GetLatestByFamily default. Implemented |
NEBIUS_MOCKER_OBJSTORE (+ _ENDPOINT, _ACCESS_KEY, _SECRET_KEY, _REGION) |
memory |
Where image payloads live: memory or rustfs (shared with Object Storage; see storage.md) |
NEBIUS_MOCKER_COMPUTE_BACKEND |
mock |
(later) container to run instances as containers with cloud-init |
Open questions
- Exact preset names per platform and the GPU quota type names.
- Whether resizing a managed boot disk through the instance spec is allowed in place.
- Instance
UPDATINGvs. a direct transition for label-only updates. BatchGetlimits and behavior on missing IDs.
API surface
nebius.compute.v1.DiskService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/disk_service.proto · used by Terraform
| RPC | Request | Response | TF |
|---|---|---|---|
Get |
GetDiskRequest |
Disk |
✅ |
GetByName |
common.v1.GetByNameRequest |
Disk |
✅ |
List |
ListDisksRequest |
ListDisksResponse |
|
Create |
CreateDiskRequest |
common.v1.Operation |
✅ |
Update |
UpdateDiskRequest |
common.v1.Operation |
✅ |
Delete |
DeleteDiskRequest |
common.v1.Operation |
✅ |
ListOperationsByParent |
ListOperationsByParentRequest |
common.v1.ListOperationsResponse |
nebius.compute.v1.DiskSnapshotService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/disk_snapshot_service.proto · used by Terraform
| RPC | Request | Response | TF |
|---|---|---|---|
Get |
GetDiskSnapshotRequest |
DiskSnapshot |
✅ |
GetByName |
common.v1.GetByNameRequest |
DiskSnapshot |
✅ |
List |
ListDiskSnapshotsRequest |
ListDiskSnapshotsResponse |
|
ListByDisk |
ListDiskSnapshotsByDiskRequest |
ListDiskSnapshotsByDiskResponse |
|
Create |
CreateDiskSnapshotRequest |
common.v1.Operation |
✅ |
Update |
UpdateDiskSnapshotRequest |
common.v1.Operation |
✅ |
Delete |
DeleteDiskSnapshotRequest |
common.v1.Operation |
✅ |
nebius.compute.v1.FilesystemService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/filesystem_service.proto · used by Terraform
| RPC | Request | Response | TF |
|---|---|---|---|
Get |
GetFilesystemRequest |
Filesystem |
✅ |
GetByName |
common.v1.GetByNameRequest |
Filesystem |
✅ |
List |
ListFilesystemsRequest |
ListFilesystemsResponse |
|
Create |
CreateFilesystemRequest |
common.v1.Operation |
✅ |
Update |
UpdateFilesystemRequest |
common.v1.Operation |
✅ |
Delete |
DeleteFilesystemRequest |
common.v1.Operation |
✅ |
ListOperationsByParent |
ListOperationsByParentRequest |
common.v1.ListOperationsResponse |
nebius.compute.v1.GpuClusterService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/gpu_cluster_service.proto · used by Terraform
| RPC | Request | Response | TF |
|---|---|---|---|
Get |
GetGpuClusterRequest |
GpuCluster |
✅ |
GetByName |
common.v1.GetByNameRequest |
GpuCluster |
✅ |
List |
ListGpuClustersRequest |
ListGpuClustersResponse |
|
Create |
CreateGpuClusterRequest |
common.v1.Operation |
✅ |
Update |
UpdateGpuClusterRequest |
common.v1.Operation |
✅ |
Delete |
DeleteGpuClusterRequest |
common.v1.Operation |
✅ |
ListOperationsByParent |
ListOperationsByParentRequest |
common.v1.ListOperationsResponse |
nebius.compute.v1.ImageService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/image_service.proto · used by Terraform
| RPC | Request | Response | TF |
|---|---|---|---|
Get |
GetImageRequest |
Image |
✅ |
GetByName |
common.v1.GetByNameRequest |
Image |
✅ |
GetLatestByFamily |
GetImageLatestByFamilyRequest |
Image |
|
List |
ListImagesRequest |
ListImagesResponse |
|
Create |
CreateImageRequest |
common.v1.Operation |
✅ |
Update |
UpdateImageRequest |
common.v1.Operation |
✅ |
Delete |
DeleteImageRequest |
common.v1.Operation |
✅ |
ListOperationsByParent |
ListOperationsByParentRequest |
common.v1.ListOperationsResponse |
|
ListPublic |
ListPublicRequest |
ListImagesResponse |
nebius.compute.v1.InstanceService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/instance_service.proto · used by Terraform
| RPC | Request | Response | TF |
|---|---|---|---|
Get |
GetInstanceRequest |
Instance |
✅ |
GetByName |
common.v1.GetByNameRequest |
Instance |
✅ |
BatchGet |
BatchGetRequest |
BatchGetResponse |
|
List |
ListInstancesRequest |
ListInstancesResponse |
|
ListInstancesByNVLInstanceGroup |
ListInstancesByNVLInstanceGroupRequest |
ListInstancesResponse |
|
Create |
CreateInstanceRequest |
common.v1.Operation |
✅ |
Update |
UpdateInstanceRequest |
common.v1.Operation |
✅ |
Delete |
DeleteInstanceRequest |
common.v1.Operation |
✅ |
Start |
StartInstanceRequest |
common.v1.Operation |
|
Stop |
StopInstanceRequest |
common.v1.Operation |
|
ListOperationsByParent |
ListOperationsByParentRequest |
common.v1.ListOperationsResponse |
nebius.compute.v1.MaintenanceService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/maintenance_service.proto
| RPC | Request | Response | TF |
|---|---|---|---|
GetByInstance |
GetMaintenanceEventByInstanceRequest |
MaintenanceEvent |
|
ListActive |
ListMaintenanceEventsRequest |
ListMaintenanceEventsResponse |
nebius.compute.v1.NVLInstanceGroupService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/nvlinstancegroup_service.proto · used by Terraform
| RPC | Request | Response | TF |
|---|---|---|---|
Create |
CreateNVLInstanceGroupRequest |
common.v1.Operation |
✅ |
Get |
GetNVLInstanceGroupRequest |
NVLInstanceGroup |
✅ |
GetByName |
common.v1.GetByNameRequest |
NVLInstanceGroup |
✅ |
List |
ListNVLInstanceGroupsRequest |
ListNVLInstanceGroupsResponse |
|
Update |
UpdateNVLInstanceGroupRequest |
common.v1.Operation |
✅ |
Delete |
DeleteNVLInstanceGroupRequest |
common.v1.Operation |
✅ |
nebius.compute.v1.NodeService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/node_service.proto
| RPC | Request | Response | TF |
|---|---|---|---|
SetUnhealthy |
NodeSetUnhealthyRequest |
NodeSetUnhealthyResponse |
nebius.compute.v1.PlatformService
Endpoint: compute.api.nebius.cloud:443 · Proto: nebius/compute/v1/platform_service.proto
| RPC | Request | Response | TF |
|---|---|---|---|
GetByName |
common.v1.GetByNameRequest |
Platform |
|
List |
ListPlatformsRequest |
ListPlatformsResponse |