vcenter vm hardware serial: get
Returns information about a virtual serial port.
Request:
HTTP request
GET https://{server}/rest/vcenter/vm/{vm}/hardware/serial/{port}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
vm | string | Virtual machine identifier. |
port | string | Virtual serial port identifier. |
Response:
HTTP Status Code: 200
Representations:
{
"value": {
"allow_guest_control": true,
"backing": {
"auto_detect": true,
"file": "string",
"host_device": "string",
"network_location": "http://myurl.com",
"no_rx_loss": true,
"pipe": "string",
"proxy": "http://myurl.com",
"type": "FILE"
},
"label": "string",
"start_connected": true,
"state": "CONNECTED",
"yield_on_poll": true
}
}
"value": {
"allow_guest_control": true,
"backing": {
"auto_detect": true,
"file": "string",
"host_device": "string",
"network_location": "http://myurl.com",
"no_rx_loss": true,
"pipe": "string",
"proxy": "http://myurl.com",
"type": "FILE"
},
"label": "string",
"start_connected": true,
"state": "CONNECTED",
"yield_on_poll": true
}
}
<?xml version="1.0" ?>
<ns0:Get-Result xmlns:ns0="http://vmware.com/vcenter/vm/hardware/serial" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>
<state>CONNECTED</state>
<label>string</label>
<allow_guest_control>true</allow_guest_control>
<yield_on_poll>true</yield_on_poll>
<backing>
<auto_detect>true</auto_detect>
<network_location>http://myurl.com</network_location>
<file>string</file>
<proxy>http://myurl.com</proxy>
<type>FILE</type>
<no_rx_loss>true</no_rx_loss>
<pipe>string</pipe>
<host_device>string</host_device>
</backing>
<start_connected>true</start_connected>
</value>
</ns0:Get-Result>
<ns0:Get-Result xmlns:ns0="http://vmware.com/vcenter/vm/hardware/serial" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>
<state>CONNECTED</state>
<label>string</label>
<allow_guest_control>true</allow_guest_control>
<yield_on_poll>true</yield_on_poll>
<backing>
<auto_detect>true</auto_detect>
<network_location>http://myurl.com</network_location>
<file>string</file>
<proxy>http://myurl.com</proxy>
<type>FILE</type>
<no_rx_loss>true</no_rx_loss>
<pipe>string</pipe>
<host_device>string</host_device>
</backing>
<start_connected>true</start_connected>
</value>
</ns0:Get-Result>
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | info | Information about the specified virtual serial port. |
value.label | string | Device label. |
value.yield_on_poll | boolean | CPU yield behavior. If set to true, the virtual machine will periodically relinquish the processor if its sole task is polling the virtual serial port. The amount of time it takes to regain the processor will depend on the degree of other virtual machine activity on the host. |
value.backing | backing_info | Physical resource backing for the virtual serial port. |
value.backing.type | string | Backing type for the virtual serial port. Defines the valid backing types for a virtual serial port. Value is one of: FILE: Virtual serial port is backed by a file. HOST_DEVICE: Virtual serial port is backed by a device on the host where the virtual machine is running. PIPE_SERVER: Virtual serial port is backed by a named pipe server. The virtual machine will accept a connection from a host application or another virtual machine on the same host. This is useful for capturing debugging information sent through the virtual serial port. PIPE_CLIENT: Virtual serial port is backed by a named pipe client. The virtual machine will connect to the named pipe provided by a host application or another virtual machine on the same host. This is useful for capturing debugging information sent through the virtual serial port. NETWORK_SERVER: Virtual serial port is backed by a network server. This backing may be used to create a network-accessible serial port on the virtual machine, accepting a connection from a remote system. NETWORK_CLIENT: Virtual serial port is backed by a network client. This backing may be used to create a network-accessible serial port on the virtual machine, initiating a connection to a remote system. |
value.backing.file | string | Path of the file backing the virtual serial port. Optional. It is only relevant when type has value FILE. This field is optional and it is only relevant when the value of type is FILE. |
value.backing.host_device | string | Name of the device backing the virtual serial port. Optional. It is only relevant when type has value HOST_DEVICE. This field will be unset if auto_detect is true and the virtual serial port is not connected or no suitable device is available on the host. |
value.backing.auto_detect | boolean | Flag indicating whether the virtual serial port is configured to automatically detect a suitable host device. Optional. It is only relevant when type has value HOST_DEVICE. This field is optional and it is only relevant when the value of type is HOST_DEVICE. |
value.backing.pipe | string | Name of the pipe backing the virtual serial port. Optional. It is only relevant when type has value [PIPE_SERVER, PIPE_CLIENT]. This field is optional and it is only relevant when the value of type is one of PIPE_SERVER or PIPE_CLIENT. |
value.backing.no_rx_loss | boolean | Flag that enables optimized data transfer over the pipe. When the value is true, the host buffers data to prevent data overrun. This allows the virtual machine to read all of the data transferred over the pipe with no data loss. Optional. It is only relevant when type has value [PIPE_SERVER, PIPE_CLIENT]. This field is optional and it is only relevant when the value of type is one of PIPE_SERVER or PIPE_CLIENT. |
value.backing.network_location | URI | URI specifying the location of the network service backing the virtual serial port.
type is one of NETWORK_SERVER or NETWORK_CLIENT. |
value.backing.proxy | URI | Proxy service that provides network access to the network backing. If set, the virtual machine initiates a connection with the proxy service and forwards the traffic to the proxy. Optional. It is only relevant when type has value [NETWORK_SERVER, NETWORK_CLIENT]. If unset, no proxy service is configured. |
value.state | string | Connection status of the virtual device. Defines the valid states for a removable device that is configured to be connected. Value is one of: CONNECTED: The device is connected and working correctly. RECOVERABLE_ERROR: Device connection failed due to a recoverable error; for example, the virtual device backing is currently in use by another virtual machine. UNRECOVERABLE_ERROR: Device connection failed due to an unrecoverable error; for example, the virtual device backing does not exist. NOT_CONNECTED: The device is not connected. UNKNOWN: The device status is unknown. |
value.start_connected | boolean | Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. |
value.allow_guest_control | boolean | Flag indicating whether the guest can connect and disconnect the device. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
404 | not_found | if the virtual machine or virtual serial port is not found. |
400 | resource_inaccessible | if the virtual machine's configuration state cannot be accessed. |
503 | service_unavailable | if the system is unable to communicate with a service to complete the request. |
401 | unauthenticated | if the user can not be authenticated. |
403 | unauthorized | if the user doesn't have the required privileges. |