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

## vcenter vm hardware parallel: create

Adds a virtual parallel port to the virtual machine.

### Request:

#### HTTP request

POST https://{server}/rest/vcenter/vm/{vm}/hardware/parallel

#### Path Parameters

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

#### Request Body Structure:

- JSON
- XML

{
"spec": {
"allow_guest_control": true,
"backing": {
"file": "string",
"host_device": "string",
"type": "FILE"
},
"start_connected": true
}
}
<?xml version="1.0" ?>
<ns0:Create-Input xmlns:ns0="http://vmware.com/vcenter/vm/hardware/parallel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spec>
<allow_guest_control>true</allow_guest_control>
<backing>
<file>string</file>
<type>FILE</type>
<host_device>string</host_device>
</backing>
<start_connected>true</start_connected>
</spec>
</ns0:Create-Input>

#### Request Body Parameters:

Name | Type | Description
--- | --- | ---
bold = required
spec | create_spec | Specification for the new virtual parallel port.
spec.backing | backing_spec | Physical resource backing for the virtual parallel port. Optional. If unset, defaults to automatic detection of a suitable host device.
spec.backing.type | string | Backing type for the virtual parallel port. Defines the valid backing types for a virtual parallel port. Value is one of: FILE: Virtual parallel port is backed by a file. HOST_DEVICE: Virtual parallel port is backed by a device on the host where the virtual machine is running.
spec.backing.file | string | Path of the file that should be used as the virtual parallel port backing. 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.
spec.backing.host_device | string | Name of the device that should be used as the virtual parallel port backing. Optional. It is only relevant when type has value HOST_DEVICE. If unset, the virtual parallel port will be configured to automatically detect a suitable host device.
spec.start_connected | boolean | Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Optional. Defaults to false if unset.
spec.allow_guest_control | boolean | Flag indicating whether the guest can connect and disconnect the device. Optional. Defaults to false if unset.

### Response:

#### HTTP Status Code: 200

#### Representations:

- JSON
- XML

{
"value": "obj-103"
}
<?xml version="1.0" ?>
<ns0:Create-Result xmlns:ns0="http://vmware.com/vcenter/vm/hardware/parallel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>obj-103</value>
</ns0:Create-Result>

#### Response Type:

Name | Type | Description
--- | --- | ---
bold = required
value | string | Virtual parallel port identifier.

#### Errors:

HTTP Status Code | Type | Description
--- | --- | ---
500 | error | if the system reported that the parallel port device was created but was unable to confirm the creation because the identifier of the new device could not be determined.
404 | not_found | if the virtual machine is not found.
400 | not_allowed_in_current_state | if the virtual machine is not powered off.
400 | unable_to_allocate_resource | if the virtual machine already has the maximum number of supported parallel ports.
400 | resource_busy | if the virtual machine is busy performing another operation.
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.