<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZNetworkBlockDeviceStorageDeviceAttachment/isForcedReadOnly",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZNetworkBlockDeviceStorageDeviceAttachment(py)forcedReadOnly"
  },
  "title" : "isForcedReadOnly"
}
-->

# isForcedReadOnly

Returns a Boolean value that indicates whether the underlying disk attachment network is in a read-only state.

```
var isForcedReadOnly: Bool { get }
```

## Discussion

The `forcedReadOnly` parameter affects how the Virtualization framework exposes the network block device (NBD) client to the guest operating system by the storage controller.

As part of the NBD protocol, during the handshake phase, the server advertises whether or not the disk the server exposes is read-only. Setting `forcedReadOnly` to <doc://com.apple.documentation/documentation/Swift/true> forces the NBD client to show up as read-only to the guest regardless of whether or not the NBD server advertises itself as read-only.

---

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)