<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZFileSerialPortAttachment",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZFileSerialPortAttachment"
  },
  "title" : "VZFileSerialPortAttachment"
}
-->

# VZFileSerialPortAttachment

An attachment point that writes data from the guest system to a file.

```
class VZFileSerialPortAttachment
```

## Overview

Use a [`VZFileSerialPortAttachment`](/documentation/Virtualization/VZFileSerialPortAttachment) object to configure a one-way serial port from the guest operating system to the virtual machine. When the guest sends data to the serial port, the virtual machine writes that data to the specified file. You can’t use this serial port to send data back to the guest.

Create a [`VZSerialPortAttachment`](/documentation/Virtualization/VZSerialPortAttachment) object and assign it to an appropriate subclass of [`VZSerialPortConfiguration`](/documentation/Virtualization/VZSerialPortConfiguration) object, such as [`VZVirtioConsoleDeviceConfiguration`](/documentation/Virtualization/VZVirtioConsoleDeviceConfiguration). The file you use to create this object must be writable.

## Topics

### Creating the attachment point

[`init(url:append:)`](/documentation/Virtualization/VZFileSerialPortAttachment/init(url:append:)-37g72)

Creates a file-based serial port attachment object.

### Getting the file details

[`url`](/documentation/Virtualization/VZFileSerialPortAttachment/url)

The URL of a file on the local file system.

[`append`](/documentation/Virtualization/VZFileSerialPortAttachment/append)

A Boolean that indicates whether the virtual machine appends data to the file.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)