<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZMacOSRestoreImage/load(from:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "s:So19VZMacOSRestoreImageC14VirtualizationE4load4from17completionHandlery10Foundation3URLV_ys6ResultOyABs5Error_pGctFZ"
  },
  "title" : "load(from:completionHandler:)"
}
-->

# load(from:completionHandler:)

Load a restore image from a file on the local file system.

```
@preconcurrency class func load(from fileURL: URL, completionHandler: @escaping @Sendable (Result<VZMacOSRestoreImage, any Error>) -> Void)
```

## Parameters

`fileURL`

A file URL that indicates the macOS restore image to load.

`completionHandler`

A block called after the restore image successfully loaded or has failed to load. The `error` parameter passed to the block is `nil` if the restore image loads successfully.

    The system invokes the completion handler on an arbitrary thread.

## Discussion

`VZMacOSRestoreImage` can load macOS installation media from a local file. If the `fileURL` parameter doesn’t refer to a local file, the system raises an exception.

---

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)