1. Operations
2. vcenter
3. vm
4. hardware
5. ethernet

## vcenter vm hardware ethernet: get

Returns information about a virtual Ethernet adapter.

### Request:

#### HTTP request

GET https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet/{nic}

#### Path Parameters

Name | Type | Description
--- | --- | ---
Required
vm | string | Virtual machine identifier.
nic | string | Virtual Ethernet adapter identifier.

### Response:

#### HTTP Status Code: 200

#### Representations:

- JSON
- XML

{
"value": {
"allow_guest_control": true,
"backing": {
"connection_cookie": 1,
"distributed_port": "string",
"distributed_switch_uuid": "string",
"host_device": "string",
"network": "obj-103",
"network_name": "string",
"opaque_network_id": "string",
"opaque_network_type": "string",
"type": "STANDARD_PORTGROUP"
},
"label": "string",
"mac_address": "string",
"mac_type": "MANUAL",
"pci_slot_number": 1,
"start_connected": true,
"state": "CONNECTED",
"type": "E1000",
"upt_compatibility_enabled": true,
"wake_on_lan_enabled": true
}
}
<?xml version="1.0" ?>
<ns0:Get-Result xmlns:ns0="http://vmware.com/vcenter/vm/hardware/ethernet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>
<pci_slot_number>1</pci_slot_number>
<mac_address>string</mac_address>
<upt_compatibility_enabled>true</upt_compatibility_enabled>
<mac_type>MANUAL</mac_type>
<state>CONNECTED</state>
<label>string</label>
<allow_guest_control>true</allow_guest_control>
<type>E1000</type>
<backing>
<connection_cookie>1</connection_cookie>
<opaque_network_type>string</opaque_network_type>
<distributed_switch_uuid>string</distributed_switch_uuid>
<network_name>string</network_name>
<distributed_port>string</distributed_port>
<type>STANDARD_PORTGROUP</type>
<opaque_network_id>string</opaque_network_id>
<network>obj-103</network>
<host_device>string</host_device>
</backing>
<wake_on_lan_enabled>true</wake_on_lan_enabled>
<start_connected>true</start_connected>
</value>
</ns0:Get-Result>

#### Response Type:

Name | Type | Description
--- | --- | ---
bold = required
value | info | Information about the specified virtual Ethernet adapter.
value.label | string | Device label.
value.type | string | Ethernet adapter emulation type. Defines the valid emulation types for a virtual Ethernet adapter. Value is one of: E1000: E1000 ethernet adapter. E1000E: E1000e ethernet adapter. PCNET32: AMD Lance PCNet32 Ethernet adapter. VMXNET: VMware Vmxnet virtual Ethernet adapter. VMXNET2: VMware Vmxnet2 virtual Ethernet adapter. VMXNET3: VMware Vmxnet3 virtual Ethernet adapter.
value.upt_compatibility_enabled | boolean | Flag indicating whether Universal Pass-Through (UPT) compatibility is enabled on this virtual Ethernet adapter. Optional. It is only relevant when type has value VMXNET3. This field is optional and it is only relevant when the value of `type` is VMXNE_t3.
value.mac_type | string | MAC address type. Defines the valid MAC address origins for a virtual Ethernet adapter. Value is one of: MANUAL: MAC address is assigned statically. GENERATED: MAC address is generated automatically. ASSIGNED: MAC address is assigned by vCenter Server.
value.mac_address | string | MAC address. Optional. May be unset if vcenter.vm.hardware.ethernet.info.mac_type is MANUAL and has not been specified, or if vcenter.vm.hardware.ethernet.info.mac_type is GENERATED and the virtual machine has never been powered on since the Ethernet adapter was created.
value.pci_slot_number | long | Address of the virtual Ethernet adapter on the PCI bus. If the PCI address is invalid, the server will change it when the VM is started or as the device is hot added. Optional. May be unset if the virtual machine has never been powered on since the adapter was created.
value.wake_on_lan_enabled | boolean | Flag indicating whether wake-on-LAN is enabled on this virtual Ethernet adapter.
value.backing | backing_info | Physical resource backing for the virtual Ethernet adapter.
value.backing.type | string | Backing type for the virtual Ethernet adapter. Defines the valid backing types for a virtual Ethernet adapter. Value is one of: STANDARD_PORTGROUP: vSphere standard portgroup network backing. HOST_DEVICE: Legacy host device network backing. Imported VMs may have virtual Ethernet adapters with this type of backing, but this type of backing cannot be used to create or to update a virtual Ethernet adapter. DISTRIBUTED_PORTGROUP: Distributed virtual switch backing. OPAQUE_NETWORK: Opaque network backing.
value.backing.network | string | Identifier of the network backing the virtual Ethernet adapter. Optional. It is only relevant when type has value [STANDARD_PORTGROUP, DISTRIBUTED_PORTGROUP, OPAQUE_NETWORK]. If unset, the identifier of the network backing could not be determined.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: `Network`. When operations return a value of this structure as a result, the field will be an identifier for the resource type: `Network`.
value.backing.network_name | string | Name of the standard portgroup backing the virtual Ethernet adapter. Optional. It is only relevant when type has value STANDARD_PORTGROUP. This field is optional and it is only relevant when the value of `type` is STANDARD_PORTGROUP.
value.backing.host_device | string | Name of the device backing the virtual Ethernet adapter. 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.distributed_switch_uuid | string | UUID of the distributed virtual switch that backs the virtual Ethernet adapter. Optional. It is only relevant when type has value DISTRIBUTED_PORTGROUP. This field is optional and it is only relevant when the value of `type` is DISTRIBUTED_PORTGROUP.
value.backing.distributed_port | string | Key of the distributed virtual port that backs the virtual Ethernet adapter. Optional. It is only relevant when type has value DISTRIBUTED_PORTGROUP. This field will be unset if the virtual Ethernet device is not bound to a distributed virtual port; this can happen if the virtual machine is powered off or the virtual Ethernet device is not connected.
value.backing.connection_cookie | long | Server-generated cookie that identifies the connection to the port. This ookie may be used to verify that the virtual machine is the rightful owner of the port. Optional. It is only relevant when type has value DISTRIBUTED_PORTGROUP. This field will be unset if the virtual Ethernet device is not bound to a distributed virtual port; this can happen if the virtual machine is powered off or the virtual Ethernet device is not connected.
value.backing.opaque_network_type | string | Type of the opaque network that backs the virtual Ethernet adapter. Optional. It is only relevant when type has value OPAQUE_NETWORK. This field is optional and it is only relevant when the value of `type` is OPAQUE_NETWORK.
value.backing.opaque_network_id | string | Identifier of the opaque network that backs the virtual Ethernet adapter. Optional. It is only relevant when type has value OPAQUE_NETWORK. This field is optional and it is only relevant when the value of `type` is OPAQUE_NETWORK.
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 Ethernet adapter 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.