Get VM Details
/v2.1/servers/{server_id}To get detailed information about a specific virtual machine (VM), you can send a GET request to the /v2.1/servers/{server_id} endpoint of the compute service, replacing {server_id} with the actual ID of the VM you want to retrieve. This request requires an authentication token, which you should include in the request headers.
Source: show-server-details
Request
Body Parameters
server_idstringrequiredThe UUID of the server.
Sample Request
- cURL
- HTTP
curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:8774/v2.1/servers/{server_id}
GET https://api.vietnix.cloud:8774/v2.1/servers/{server_id}
Response
Parameters
serverobjectrequiredA server object.
idstringrequiredThe UUID of the server.
linksarrayrequiredLinks to the resources in question. See API Guide / Links and References for more info.
namestringrequiredThe server name.
accessIPv4stringrequiredIPv4 address that should be used to access this server. May be automatically set by the provider.
accessIPv6stringrequiredIPv6 address that should be used to access this server. May be automatically set by the provider.
addressesobjectrequiredThe addresses for the server. Servers with status BUILD hide their addresses information.
security_groupsarrayOne or more security groups objects.
1 field
namestringrequiredbodyThe security group name.
config_drivestringrequiredIndicates whether a config drive was used for this server. True or empty string (empty means False).
createdstringrequiredWhen the resource was created (ISO 8601, CCYY-MM-DDThh:mm:ss±hh:mm).
flavorobjectrequiredBefore microversion 2.47: ID and links for the flavor (may be empty). As of 2.47: subset of the actual flavor info as a nested dictionary.
9 fields
idstringrequiredbodyThe ID of the flavor. Available until version 2.46.
linksarrayrequiredbodyLinks to the flavor resource. Available until version 2.46.
vcpusintegerrequiredbodyNumber of vCPUs allocated to the server. New in 2.47.
ramintegerrequiredbodyRAM in MiB. New in 2.47.
diskintegerrequiredbodyRoot disk size in GiB. New in 2.47.
ephemeralintegerrequiredbodyEphemeral disk size in GiB. New in 2.47.
swapintegerrequiredbodySwap disk size in MiB. New in 2.47.
original_namestringrequiredbodyDisplay name of the flavor. New in 2.47.
extra_specsobjectbodyFlavor extra-specs key/value pairs; included only if policy allows. New in 2.47.
2 fields
keystringrequiredbodyExtra spec key. New in 2.47.
valuestringrequiredbodyExtra spec value. New in 2.47.
guest_agentobjectrequiredThe guest tools connection state and version.
hci_infoobjectrequiredInformation about VM networks, disks, traits, and OS distribution.
hostIdstringrequiredHashed host identifier, unique per project; useful to check colocation within a project.
host_statusstringHost status: UP, UNKNOWN, DOWN, MAINTENANCE, or empty (no host). Appears only if policy permits. New in 2.16.
imageobjectrequiredUUID and links for the image. Empty string when booted from a volume.
image_metadataobjectImage metadata key/value pairs (max 255 bytes per key and per value).
key_namestringrequiredName of the associated key pair, if any.
lockedbooleanrequiredTrue if the instance is locked; otherwise False. New in 2.9.
locked_reasonstringrequiredReason behind locking a server. New in 2.73.
memory_mbintegerrequiredMemory of this hypervisor (MiB). Available until version 2.87.
metadataobjectrequiredMetadata key/value pairs (maintained for backward compatibility).
OS-DCF:diskConfigstringrequiredDisk configuration: AUTO or MANUAL.
OS-EXT-AZ:availability_zonestringrequiredAvailability zone name (VHI returns default or null).
OS-EXT-SRV-ATTR:hoststringrequiredCompute host on which this instance is running (admin only).
OS-EXT-SRV-ATTR:hostnamestringHostname set on the instance (admin only). New in 2.3.
OS-EXT-SRV-ATTR:hypervisor_hostnamestringrequiredHypervisor host name (Ironic: node UUID) (admin only).
OS-EXT-SRV-ATTR:instance_namestringrequiredInstance name generated by the template (admin only).
OS-EXT-SRV-ATTR:kernel_idstringKernel image UUID when using AMI; null otherwise (admin only). New in 2.3.
OS-EXT-SRV-ATTR:launch_indexintegerLaunch sequence index for multi-create (admin only). New in 2.3.
OS-EXT-SRV-ATTR:reservation_idstringReservation ID for the server (admin only). New in 2.3.
OS-EXT-SRV-ATTR:ramdisk_idstringRamdisk image UUID when using AMI; null otherwise (admin only). New in 2.3.
OS-EXT-SRV-ATTR:root_device_namestringRoot device name (admin only). New in 2.3.
OS-EXT-SRV-ATTR:user_datastringuser_data provided at create (admin only). New in 2.3.
OS-EXT-STS:power_stateintegerrequiredPower state: 0 NOSTATE, 1 RUNNING, 3 PAUSED, 4 SHUTDOWN, 6 CRASHED, 7 SUSPENDED, 8 SHUTDOWN_ACTIVE.
OS-EXT-STS:task_statestringrequiredTask state of the instance.
OS-EXT-STS:vm_statestringrequiredVM state.
os-extended-volumes:volumes_attachedarrayrequiredAttached volumes, if any.
2 fields
idstringrequiredbodyAttached volume ID.
delete_on_terminationbooleanrequiredbodyWhether the volume is deleted with the server (default False). New in 2.3.
OS-SRV-USG:launched_atstringrequiredWhen the server was launched (ISO 8601); null if not set.
OS-SRV-USG:terminated_atstringrequiredWhen the server was deleted (ISO 8601); null if not set.
descriptionstringrequiredServer description. New in 2.19.
server_groupsarrayrequiredUUIDs of server groups this server belongs to (max 1). New in 2.71.
tagsarrayrequiredList of tags (max 50). New in 2.26.
trusted_image_certificatesarrayrequiredTrusted certificate IDs used for image signature verification (max 50); null if not set. New in 2.63.
progressintegerPercent progress when status is ACTIVE, BUILD, REBUILD, RESIZE, VERIFY_RESIZE, or MIGRATING.
statusstringrequiredServer status.
tenant_idstringrequiredUUID of the tenant (project).
updatedstringrequiredWhen the resource was updated (ISO 8601, CCYY-MM-DDThh:mm:ss±hh:mm).
user_idstringrequiredID of the user who owns the server.
faultobjectFault object; shown when status is ERROR or DELETED and a fault occurred.
4 fields
codeintegerrequiredbodyError response code.
createdstringrequiredbodyWhen the exception was raised (ISO 8601).
messagestringrequiredbodyError message.
detailsstringbodyStack trace (available if response code is not 500 or you have admin privilege).
vcpu_modelobjectrequiredDescription of the used virtual CPU model.
vcpusintegerrequiredNumber of virtual CPUs the server uses.
Status Codes
Success
| Status Code | Description |
|---|---|
| 200 - OK | Request was successful. |
Error
| Status Code | Description |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |
| 403 - Forbidden | Policy does not allow current user to do this operation. |
| 404 - Not Found | The requested resource could not be found. |
Sample Response
Response body
{
"server": {
"id": "393210ad-152b-4ac3-a0f0-798ee4e93620",
"name": "Ubuntu22",
"status": "ACTIVE",
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"user_id": "64166c7effeb4a89b59c073588099640",
"metadata": {
"ha_enabled": "True"
},
"hostId": "8832df28df03a13573bd7478e79d31483ce42e75c8d1a291f2d9637a",
"image": "",
"flavor": {
"id": "dee219cf-cd93-41c1-bae7-0c9874a0cc31",
"links": [
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8774/flavors/dee219cf-cd93-41c1-bae7-0c9874a0cc31"
}
]
},
"created": "2025-09-22T02:43:51Z",
"updated": "2025-09-22T02:44:00Z",
"addresses": {
"test01": [
{
"version": 4,
"addr": "192.168.0.75",
"OS-EXT-IPS:type": "fixed",
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:26:de:79"
}
]
},
"accessIPv4": "",
"accessIPv6": "",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8774/v2.1/servers/393210ad-152b-4ac3-a0f0-798ee4e93620"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8774/servers/393210ad-152b-4ac3-a0f0-798ee4e93620"
}
],
"OS-DCF:diskConfig": "MANUAL",
"progress": 0,
"OS-EXT-AZ:availability_zone": "nova",
"config_drive": "",
"key_name": "Docs Writter",
"OS-SRV-USG:launched_at": "2025-09-22T02:43:59.000000",
"OS-SRV-USG:terminated_at": null,
"security_groups": [
{
"name": "default"
}
],
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"OS-EXT-STS:power_state": 1,
"OS-EXT-STS:power_state_reason": "unpaused",
"os-extended-volumes:volumes_attached": [
{
"id": "75a55d31-a6dc-48a2-82e2-3d6ac0f8a2bc",
"size": 10
}
],
"vcpu_model": {
"arch": null,
"vendor": null,
"topology": {
"nova_object.name": "VirtCPUTopology",
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"sockets": 1,
"cores": 2,
"threads": 1
},
"nova_object.changes": [
"threads",
"sockets",
"cores"
]
},
"features": [],
"mode": "host-model",
"model": null,
"match": "exact"
},
"image_metadata": {
"image_validated": "yes",
"os_distro": "ubuntu22.04",
"hci_allow_set_password": "True",
"os_admin_user": "root",
"min_ram": "0",
"min_disk": "10",
"disk_format": "qcow2",
"container_format": "bare",
"base_image_ref": "41ecdf81-c112-4231-9fea-049e70f3b564",
"hw_machine_type": "pc-q35-vz9.0.0",
"hw_vif_multiqueue_enabled": "True"
},
"required_traits": [],
"hci_info": {
"network": [
{
"mac": "fa:16:3e:26:de:79",
"emulation_type": "virtio",
"ips": [
"192.168.0.75"
],
"network": {
"id": "8ae2b710-ad3d-469e-a75a-c3e203887d2e",
"bridge": "br-int",
"label": "test01",
"subnets": [
{
"cidr": "192.168.0.0/24",
"dns": [
{
"address": "8.8.8.8",
"type": "dns",
"version": 4,
"meta": {}
}
],
"gateway": {
"address": "192.168.0.1",
"type": "gateway",
"version": 4,
"meta": {}
},
"ips": [
{
"address": "192.168.0.75",
"type": "fixed",
"version": 4,
"meta": {},
"floating_ips": []
}
],
"routes": [],
"version": 4,
"meta": {
"dhcp_server": "192.168.0.2"
}
}
],
"meta": {
"injected": true,
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"mtu": 8913,
"physical_network": null,
"tunneled": true
}
},
"port_security_enabled": true
}
],
"boot_order": [
"hd"
],
"vzhardware": "2.0.1",
"max_mem": null,
"max_vcpu": null,
"has_pci_devices": false
},
"memory_mb": 2048,
"vcpus": 2,
"root_gb": 0,
"guest_agent": {
"status": "connected",
"version": "7.22-1.vz7"
},
"username": "root",
"allow_set_password": true
}
}