13.3. Showing virtual machine details

GET /servers/{server_id}

Show details of a server with the specified ID.

Includes server details including configuration drive, extended status, and server usage information.

The extended status information appears in the OS-EXT-STS:vm_state, OS-EXT-STS:power_state, and OS-EXT-STS:task_state attributes.

The server usage information appears in the OS-SRV-USG:launched_at and OS-SRV-USG:terminated_at attributes.

Precondition: the server must exist.

Source: https://docs.openstack.org/api-ref/compute/?expanded=#show-server-details

13.3.1. Request

Name In Type Description
server_id path string The UUID of the server.

13.3.1.1. Example

# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:8774/v2.1/f5d834d636c642c7bfe8af86139c6f26/servers/bb4f4c8d-a6ca-4723-ace3-1683f54cca1e

13.3.2. Response

Name In Type Description
server body object A server object.
accessIPv4 body string IPv4 address that should be used to access this server. May be automatically set by the provider.
accessIPv6 body string IPv6 address that should be used to access this server. May be automatically set by the provider.
addresses body object The addresses for the server. Servers with status BUILD hide their addresses information.
config_drive body string Indicates whether or not a config drive was used for this server. The value is True or an empty string. An empty string stands for False.
created body string

The date and time when the resource was created. The date and time stamp format is ISO 8601

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

flavor body object

Before microversion 2.47 this contains the ID and links for the flavor used to boot the server instance. This can be an empty object in case flavor information is no longer present in the system.

As of microversion 2.47 this contains a subset of the actual flavor information used to create the server instance, represented as a nested dictionary.

flavor.id body string

The ID of the flavor. While people often make this look like an int, this is really a string.

Available until version 2.46

flavor.links body array

Links to the flavor resource. See API Guide / Links and References for more info.

Available until version 2.46

flavor.vcpus body integer

The number of virtual CPUs that were allocated to the server.

New in version 2.47

flavor.ram body integer

The amount of RAM a flavor has, in MiB.

New in version 2.47

flavor.disk body integer

The size of the root disk that was created in GiB.

New in version 2.47

flavor.ephemeral body integer

The size of the ephemeral disk that was created, in GiB.

New in version 2.47

flavor.swap body integer

The size of a dedicated swap disk that was allocated, in MiB.

New in version 2.47

flavor.original_name body string

The display name of a flavor.

New in version 2.47

flavor.extra_specs (Optional) body object

A dictionary of the flavor’s extra-specs key-and-value pairs. This will only be included if the user is allowed by policy to index flavor extra_specs.

New in version 2.47

flavor.extra_specs.key body string

The extra spec key of a flavor.

New in version 2.47

flavor.extra_specs.value body string

The extra spec value of a flavor.

New in version 2.47

hostId body string An ID string representing the host. This is a hashed value so will not actually look like a hostname, and is hashed with data from the project_id, so the same physical host as seen by two different project_ids, will be different. It is useful when within the same project you need to determine if two instances are on the same or different physical hosts for the purposes of availability or performance.
id body string The UUID of the server.
image body object The UUID and links for the image for your server instance. The image object will be an empty string when you boot the server from a volume.
key_name body string The name of associated key pair, if any.
links body array Links to the resources in question. See API Guide / Links and References for more info.
metadata body object A dictionary of metadata key-and-value pairs, which is maintained for backward compatibility.
name body string The server name.
OS-DCF:diskConfig body string

Disk configuration. The value is either:

  • AUTO. The API builds the server with a single partition the size of the target flavor disk. The API automatically adjusts the file system to fit the entire partition.
  • MANUAL. The API builds the server by using the partition scheme and file system that is in the source image. If the target flavor disk is larger, The API does not partition the remaining disk space.
OS-EXT-AZ:availability_zone body string The availability zone name.
OS-EXT-SRV-ATTR:host body string The name of the compute host on which this instance is running. Appears in the response for administrative users only.
OS-EXT-SRV-ATTR:hypervisor_hostname body string The hypervisor host name provided by the Nova virt driver. For the Ironic driver, it is the Ironic node uuid. Appears in the response for administrative users only.
OS-EXT-SRV-ATTR:instance_name body string The instance name. The Compute API generates the instance name from the instance name template. Appears in the response for administrative users only.
OS-EXT-STS:power_state body integer

The power state of the instance. This is an enum value that is mapped as:

0: NOSTATE
1: RUNNING
3: PAUSED
4: SHUTDOWN
6: CRASHED
7: SUSPENDED
OS-EXT-STS:task_state body string The task state of the instance.
OS-EXT-STS:vm_state body string The VM state.
os-extended-volumes:volumes_attached body array The attached volumes, if any.
os-extended-volumes:volumes_attached.id body string The attached volume ID.
os-extended-volumes:volumes_attached.delete_on_termination body boolean

A flag indicating if the attached volume will be deleted when the server is deleted. By default this is False.

New in version 2.3

OS-SRV-USG:launched_at body string

The date and time when the server was launched.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The hh±:mm value, if included, is the time zone as an offset from UTC. If the deleted_at date and time stamp is not set, its value is null.

OS-SRV-USG:terminated_at body string

The date and time when the server was deleted.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. If the deleted_at date and time stamp is not set, its value is null.

status body string The server status.
tenant_id body string The UUID of the tenant in a multi-tenancy cloud.
updated body string

The date and time when the resource was updated. The date and time stamp format is ISO 8601

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

user_id body string The user ID of the user who owns the server.
fault (Optional) body object A fault object. Only displayed when the server status is ERROR or DELETED and a fault occurred.
fault.code body integer The error response code.
fault.created body string

The date and time when the exception was raised. The date and time stamp format is ISO 8601

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

fault.message body string The error message.
fault.details (Optional) body string The stack trace. It is available if the response code is not 500 or you have the administrator privilege
progress (Optional) body integer A percentage value of the operation progress. This parameter only appears when the server status is ACTIVE, BUILD, REBUILD, RESIZE, VERIFY_RESIZE or MIGRATING.
security_groups (Optional) body array One or more security groups objects.
security_group.name body string The security group name.
OS-EXT-SRV-ATTR:hostname (Optional) body string

The hostname set on the instance when it is booted. By default, it appears in the response for administrative users only.

New in version 2.3

OS-EXT-SRV-ATTR:reservation_id (Optional) body string

The reservation id for the server. This is an id that can be useful in tracking groups of servers created with multiple create, that will all have the same reservation_id. By default, it appears in the response for administrative users only.

New in version 2.3

OS-EXT-SRV-ATTR:launch_index (Optional) body integer

When servers are launched via multiple create, this is the sequence in which the servers were launched. By default, it appears in the response for administrative users only.

New in version 2.3

OS-EXT-SRV-ATTR:kernel_id (Optional) body string

The UUID of the kernel image when using an AMI. Will be null if not. By default, it appears in the response for administrative users only.

New in version 2.3

OS-EXT-SRV-ATTR:ramdisk_id (Optional) body string

The UUID of the ramdisk image when using an AMI. Will be null if not. By default, it appears in the response for administrative users only.

New in version 2.3

OS-EXT-SRV-ATTR:root_device_name (Optional) body string

The root device name for the instance By default, it appears in the response for administrative users only.

New in version 2.3

OS-EXT-SRV-ATTR:user_data (Optional) body string

The user_data the instance was created with. By default, it appears in the response for administrative users only.

New in version 2.3

locked body boolean

True if the instance is locked otherwise False.

New in version 2.9

host_status (Optional) body string

The host status. Values where next value in list can override the previous:

  • UP if nova-compute up.
  • UNKNOWN if nova-compute not reported by servicegroup driver.
  • DOWN if nova-compute forced down.
  • MAINTENANCE if nova-compute is disabled.
  • Empty string indicates there is no host for server.

This attribute appears in the response only if the policy permits. By default, only administrators can get this parameter.

New in version 2.16

description body string

The description of the server. Before microversion 2.19 this was set to the server name.

New in version 2.19

tags body array

A list of tags. The maximum count of tags in this list is 50.

New in version 2.26

trusted_image_certificates body array

A list of trusted certificate IDs, that were used during image signature verification to verify the signing certificate. The list is restricted to a maximum of 50 IDs. The value is null if trusted certificate IDs are not set.

New in version 2.63

server_groups body array

The UUIDs of the server groups to which the server belongs. Currently this can contain at most one entry.

New in version 2.71

locked_reason body string

The reason behind locking a server.

New in version 2.73

13.3.2.1. Status codes

13.3.2.1.1. Success

Code Reason
200 - OK Request was successful.

13.3.2.1.2. Error

Code Reason
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.

13.3.2.2. Example

{
  "server": {
    "OS-EXT-STS:task_state": null,
    "addresses": {
      "public": [
        {
          "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:a9:fc:e7",
          "version": 4,
          "addr": "10.94.139.170",
          "OS-EXT-IPS:type": "fixed"
        }
      ],
      "private": [
        {
          "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:a0:2c:b8",
          "version": 4,
          "addr": "192.168.128.243",
          "OS-EXT-IPS:type": "fixed"
        }
      ]
    },
    "links": [
      {
        "href": "https://<node_IP_addr>:8774/v2.1/f5d834d636c642c7bfe8af86139c6f26/servers/bb4f4c8d-a6ca-4723-ace3-1683f54cca1e",
        "rel": "self"
      },
      {
        "href": "https://<node_IP_addr>:8774/f5d834d636c642c7bfe8af86139c6f26/servers/bb4f4c8d-a6ca-4723-ace3-1683f54cca1e",
        "rel": "bookmark"
      }
    ],
    "image": "",
    "hci_info": {
      "os_distro": "linux",
      "network": [
        {
          "port_security_enabled": true,
          "mac": "fa:16:3e:a9:fc:e7",
          "emulation_type": "virtio",
          "network": {
            "bridge": "br-int",
            "label": "public",
            "meta": {
              "injected": true,
              "tunneled": false,
              "mtu": 1500,
              "physical_network": "Public",
              "tenant_id": "f5d834d636c642c7bfe8af86139c6f26"
            },
            "id": "17062703-8551-46e3-bf37-5509d9f93462",
            "subnets": [
              {
                "ips": [
                  {
                    "meta": {},
                    "type": "fixed",
                    "version": 4,
                    "address": "10.94.139.170",
                    "floating_ips": []
                  }
                ],
                "version": 4,
                "meta": {
                  "dhcp_server": "10.94.139.168"
                },
                "dns": [
                  {
                    "meta": {},
                    "type": "dns",
                    "version": 4,
                    "address": "10.30.0.27"
                  }
                ],
                "routes": [],
                "cidr": "10.94.0.0/16",
                "gateway": {
                  "meta": {},
                  "type": "gateway",
                  "version": 4,
                  "address": "10.94.0.1"
                }
              }
            ]
          },
          "ips": [
            "10.94.139.170"
          ]
        },
        {
          "port_security_enabled": true,
          "mac": "fa:16:3e:a0:2c:b8",
          "emulation_type": "virtio",
          "network": {
            "bridge": "br-int",
            "label": "private",
            "meta": {
              "injected": true,
              "tunneled": true,
              "mtu": 1450,
              "physical_network": null,
              "tenant_id": "f5d834d636c642c7bfe8af86139c6f26"
            },
            "id": "56b9b3ab-219a-41a5-a9f0-ebf5ee74f827",
            "subnets": [
              {
                "ips": [
                  {
                    "meta": {},
                    "type": "fixed",
                    "version": 4,
                    "address": "192.168.128.243",
                    "floating_ips": []
                  }
                ],
                "version": 4,
                "meta": {
                  "dhcp_server": "192.168.128.1"
                },
                "dns": [
                  {
                    "meta": {},
                    "type": "dns",
                    "version": 4,
                    "address": "0.0.0.0"
                  }
                ],
                "routes": [],
                "cidr": "192.168.128.0/24",
                "gateway": {
                  "meta": {},
                  "type": "gateway",
                  "version": null,
                  "address": null
                }
              }
            ]
          },
          "ips": [
            "192.168.128.243"
          ]
        }
      ],
      "boot_order": [
        "hd"
      ],
      "vzhardware": "1.0.1",
      "disks": [
        {
          "bus": "virtio",
          "address": "0000:00:07.0",
          "readonly": false,
          "physical_block_size": "4096",
          "device_type": "disk",
          "logical_block_size": "512",
          "serial": "aa4f9318-3a7f-4d6d-81b6-3de3e2428177"
        }
      ],
      "required_traits": [],
      "os_type": "linux"
    },
    "OS-EXT-STS:vm_state": "active",
    "OS-EXT-SRV-ATTR:instance_name": "instance-00000001",
    "OS-SRV-USG:launched_at": "2020-01-31T12:57:48.000000",
    "flavor": {
      "id": "100",
      "links": [
        {
          "href": "https://<node_IP_addr>:8774/f5d834d636c642c7bfe8af86139c6f26/flavors/100",
          "rel": "bookmark"
        }
      ]
    },
    "id": "bb4f4c8d-a6ca-4723-ace3-1683f54cca1e",
    "security_groups": [
      {
        "name": "default"
      },
      {
        "name": "default"
      }
    ],
    "memory_mb": 512,
    "user_id": "eb481bff7b7c4ec6a686646957d8064b",
    "OS-DCF:diskConfig": "MANUAL",
    "accessIPv4": "",
    "accessIPv6": "",
    "progress": 0,
    "OS-EXT-STS:power_state": 1,
    "OS-EXT-AZ:availability_zone": "nova",
    "config_drive": "True",
    "status": "ACTIVE",
    "updated": "2020-01-31T12:57:49Z",
    "hostId": "07a515b19bd643cd2422089ea20d5043e1161004b62e297f4e52196f",
    "OS-EXT-SRV-ATTR:host": "node1.vstoragedomain",
    "OS-SRV-USG:terminated_at": null,
    "vcpu_model": {
      "vendor": null,
      "features": [],
      "mode": "host-model",
      "model": null,
      "arch": null,
      "match": "exact",
      "topology": {
        "nova_object.version": "1.0",
        "nova_object.changes": [
          "cores",
          "threads",
          "sockets"
        ],
        "nova_object.name": "VirtCPUTopology",
        "nova_object.data": {
          "cores": 1,
          "threads": 1,
          "sockets": 1
        },
        "nova_object.namespace": "nova"
      }
    },
    "key_name": "key1",
    "image_metadata": {
      "os_distro": "linux",
      "image_validated": "yes",
      "container_format": "bare",
      "min_ram": "0",
      "disk_format": "qcow2",
      "base_image_ref": "c92d820c-50dc-4fd1-a0bc-2f1071487b67",
      "min_disk": "1",
      "os_type": "linux",
      "hw_disk_bus": "virtio"
    },
    "root_gb": 0,
    "OS-EXT-SRV-ATTR:hypervisor_hostname": "node1.vstoragedomain",
    "name": "vm1",
    "created": "2020-01-31T12:57:06Z",
    "tenant_id": "f5d834d636c642c7bfe8af86139c6f26",
    "os-extended-volumes:volumes_attached": [
      {
        "id": "aa4f9318-3a7f-4d6d-81b6-3de3e2428177"
      }
    ],
    "guest_agent": {
      "status": "disconnected",
      "version": null
    },
    "vcpus": 1,
    "metadata": {
      "ha_enabled": "True"
    }
  }
}