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

# VZVirtioFileSystemDevice

An object the defines a VIRTIO file system device.

```
class VZVirtioFileSystemDevice
```

## Overview

This device exposes host resources to the guest as a file system mount. The directory share defines which resources the host exposes to the guest.

Create this device by instantiating a [`VZVirtioFileSystemDeviceConfiguration`](/documentation/Virtualization/VZVirtioFileSystemDeviceConfiguration) in a [`VZVirtualMachineConfiguration`](/documentation/Virtualization/VZVirtualMachineConfiguration). The file system device is available in the `VZVirtualMachine`.[`directorySharingDevices`](/documentation/Virtualization/VZVirtualMachine/directorySharingDevices) property. The guest can use the [`tag`](/documentation/Virtualization/VZVirtioFileSystemDevice/tag) label to mount and access the host resources.

With `VZVirtioFileSystemDevice`, the framework enforces several permissions policies for shared directories:

- The framework reads and writes files using the user ID (UID) of the effective user, which is the UID of the current user, rather than the UID of the system process.
- The framework doesn’t allow reading or overwriting of files with permissions where the file is inaccessible to the current user.
- The framework ignores requests from guest operating systems to change the UID or group ID (GID) of files on the host.

## Topics

### Accessing directory properties

[`share`](/documentation/Virtualization/VZVirtioFileSystemDevice/share)

A value that defines the directory share the host exposes to the guest VM.

[`tag`](/documentation/Virtualization/VZVirtioFileSystemDevice/tag)

A string that identifies the device.

## See Also

[`VZVirtioFileSystemDeviceConfiguration`](/documentation/Virtualization/VZVirtioFileSystemDeviceConfiguration)

An object that represents the configuration of a Virtio file system device.

[`VZSingleDirectoryShare`](/documentation/Virtualization/VZSingleDirectoryShare)

An object that defines the directory share for a single directory.

[`VZMultipleDirectoryShare`](/documentation/Virtualization/VZMultipleDirectoryShare)

An object that describes a directory share for multiple directories.



---

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)