macOS 27 expands the Virtualization framework with automated macOS guest provisioning, USB accessory passthrough via the new Accessory Access framework, advanced vmnet network topologies, and efficient disk image management via the new DiskImageKit framework.
⢠New VZMacGuestProvisioningOptions API enables fully automated macOS Setup Assistant bypass on first boot
⢠New Accessory Access framework (AAUSBAccessoryManager, AAUSBAccessoryMatchingCriteria) enables USB device hot-plug passthrough to VMs
⢠vmnet framework integration via VZVmnetNetworkDeviceAttachment allows custom multi-VM network topologies with DHCP and port-forwarding control
⢠New DiskImageKit framework introduces ASIF sparse disk image support with layered overlay/snapshot semantics
⢠Automate virtual Mac setup end-to-end ā specify username, password, auto-login, and SSH without touching Setup Assistant manually
⢠Attach and hot-plug USB accessories to VMs at runtime using the new Accessory Access framework, keeping users in control
⢠Build advanced multi-VM network topologies with vmnet and manage disk images efficiently with ASIF-backed DiskImageKit
Demonstrates how to start a new virtual Mac with automated guest provisioning ā creating a user account with auto-login and SSH enabled ā using the new VZMacGuestProvisioningOptions API in macOS 27.
import Virtualization
import Foundation
// MARK: - macOS Guest Provisioning (macOS 27+)
func startVirtualMacWithProvisioning(vm: VZVirtualMachine) async throws {
// 1. Build provisioning options for the first-boot Setup Assistant automation
let provisioningOptions = VZMacGuestProvisioningOptions()
provisioningOptions.fullName = "Jane Appleseed"
provisioningOptions.userName = "jappleseed"
provisioningOptions.password = ProcessInfo.processInfo.environment["VM_PASSWORD"] ?? "changeme"
provisioningOptions.isAutoLoginEnabled = true
provisioningOptions.isRemoteLoginEnabled = true // enables SSH
// 2. Attach provisioning options to start options
let startOptions = VZMacOSVirtualMachineStartOptions()
startOptions.guestProvisioning = provisioningOptions
// 3. Start the VM ā on first boot, Setup Assistant is bypassed automatically
try await vm.start(options: startOptions)
print("Virtual Mac started. Guest will auto-provision user: \(provisioningOptions.userName)")
}
// MARK: - Example: Build a VZVirtualMachine and provision it
func buildAndProvisionVM() async throws {
guard let bundleURL = Bundle.main.url(forResource: "MyVM", withExtension: "bundle") else {
fatalError("VM bundle not found")
}
// Load an existing, installed macOS VM configuration from disk
let configURL = bundleURL.appendingPathComponent("config.plist")
let configData = try Data(contentsOf: configURL)
let decoder = PropertyListDecoder()
// In practice you'd decode your saved VZVirtualMachineConfiguration here.
// For demonstration we construct a minimal placeholder config.
let config = VZVirtualMachineConfiguration()
// (Real apps load hardware model, boot loader, memory, storage, etc.)
try config.validate()
let virtualMachine = VZVirtualMachine(configuration: config)
try await startVirtualMacWithProvisioning(vm: virtualMachine)
}iOS 27 adds sectioned queries, codable model attributes, ResultsObserver for non-SwiftUI change observation, and HistoryObserver for reacting to persistent history changes in SwiftData.
USDKit is a new first-party Swift framework introduced in iOS/macOS 27 that brings native USD scene creation, composition, modification, and export capabilities to Apple platform apps, with deep RealityKit and Spatial Preview integration.
LiveCommunicationKit is the modern replacement for CXProvider that delivers rich, native conversation UIs integrated with the Lock Screen, Dynamic Island, Phone app Recents, and Siri. It provides a unified lifecycle model for audio and video conversations with a single delegate-driven action pipeline.
In-depth guide
iOS 26 ā iOS 27 Migration Guide āGuest provisioning options are silently ignored if a user account already exists in the guest ā only honored on first boot. Passwords must not be hardcoded; use Keychain or environment variables. vmnet networks are not persisted across app launches ā your app must serialize and restore them. DiskImageKit and Accessory Access are macOS-only frameworks, not available on iOS/iPadOS.
Requires Apple Silicon Mac for macOS guest VMs; USB passthrough depends on device class support per Accessory Access documentation; DiskImageKit ASIF format requires macOS 26+ host
The NowPlaying framework introduces a first-class Swift API for surfacing app media in system-wide now-playing surfaces ā Lock Screen, Control Center, Dynamic Island, StandBy, CarPlay, Apple Watch, and Apple TV ā via a declarative MediaSessionRepresentable protocol. It also supports remote media sessions (for controlling external speakers/TVs) and Media Sharing Extensions for routing media to third-party devices.