Skip to main content
The instance metadata service (IMDS) provides information about a running virtual machine (VM), including metadata, labels, resources, user and network data.
The legacy /mnt/cloud-metadata mount on older Nebius VM images is deprecated and will be removed on September 30, 2026. After that date, use only the HTTP-based IMDS described in this article. To migrate, replace any reads from /mnt/cloud-metadata with the equivalent HTTP requests to IMDS.

How to access IMDS

IMDS is available only from within a VM itself. Once you connect to a VM, use the following base URL to request metadata:
All IMDS requests must use the GET method and include the Metadata: true header. Requests without this header return 400 Bad Request. Requests that use any method other than GET return 405 Method Not Allowed.

Metadata updates

IMDS provides metadata captured at VM start time. The following endpoints are not refreshed in real time:
  • instance-data
  • parent-data
  • network-data
  • user-data
To get updated values from these endpoints after a change, stop and restart the VM.
Unlike the other endpoints, instance-events provides live updates and does not require a VM restart. A maintenance event may take up to five minutes to appear in the response.

Example requests

The following examples show how to retrieve different types of metadata from IMDS.

Getting all VM metadata

To get all available VM metadata in JSON format, run:
Example output:
labels is always returned as a JSON object. If no labels were set, IMDS returns an empty object. The following fields are optional and are returned only when available for the VM:
  • hostname
  • service_account_id
  • gpu_cluster_id
  • infiniband_fabric
  • infiniband_topology_path

Getting a specific metadata field

To get a specific metadata field as plain text, run:
Example:
Example output:

Getting VM labels

To get all labels for the VM, run:
Example output:
To get a specific label, run:
Example:
Example output:

Getting parent resource metadata

To get parent resource metadata in JSON format, run:
Example output:
To access parent-data, the VM must have an attached service account with permissions to read the parent resource metadata. Otherwise, the request returns 403 Forbidden.

Getting user data

To get the user data that was provided when the VM was created, run:
Example output:

Getting network data

To get the VM network data, run:
This request returns the network data that cloud-init used to initialize the VM during its first boot. Example output:

Getting service account information

To get information about the service account attached to the VM and its IAM token, run:
Example output:
To get only the IAM token object (the access token and its expiration time), run:
Example output:
To get only the raw access token string, run:
Example output:

Getting maintenance events

To check if a maintenance event is scheduled for the VM, run:
Example output:
If there are no active maintenance events, IMDS returns an empty array:

Request throttling

Nebius AI Cloud applies throttling to IMDS requests on a per-VM basis to reduce accidental overload and abuse:
  • 10 requests per second for regular requests
  • 20 requests per second for burst requests
If you exceed the limit, IMDS returns 429 Too Many Requests.

Status codes