Virtualization

RSS for tag

Create hardware-accelerated virtual machines to run macOS and Linux-based operating systems.

Posts under Virtualization tag

200 Posts

Post

Replies

Boosts

Views

Activity

detecting if my process is running on a virtual macos x instance and not on my local mac machine
I m trying to identify if my launched process is running on a local mac machine(desktop/laptop) or a virtual macOS X instance like AWS EC2, Azure, MacStadium etc. I have followed this link which searched for its limited providers in the output, but I m not bound to any limited providers and looking for a general solution which is applicable to all the providers. Is there some hardware/network/virtualization-related information that can be used to identify if the process is launched on a virtual MacOS instance? OR is there some system Information that I can use to be sure that my process is running on a local machine?
3
1
3k
Oct ’23
Virtualization Resources
Virtualization framework is a high-level API to create macOS and Linux virtual machines. Hypervisor is a low-level API to build virtualization solutions without the need for a kernel extension. If you’re interested in containers on the Mac, check out the Containerization package and its associated container tool. Virtualization: Forums subtopic: App & System Services > Core OS Forums tag: Virtualization Virtualization framework documentation Using iCloud with macOS virtual machines documentation article Use iCloud on a virtual machine support article Running macOS in a virtual machine on Apple silicon sample code Running Linux in a Virtual Machine sample code Running GUI Linux in a virtual machine on a Mac sample code Building macOS apps with Xcode 26 on macOS 26 VM forums thread — This thread describes how the development experience in VMs has improved recently, and one remaining issue that you might bump in to. Hypervisor: Forums subtopic: App & System Services > Core OS Forums tag: Hypervisor Hypervisor framework documentation Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
834
Aug ’25
Virtualization.framework — stop completion and storage release
Hello Apple Developer Support, We are evaluating a macOS VM controller using VZVirtualMachine and would appreciate clarification: Does stop(completionHandler:) have any documented maximum completion time? What should a controller do if completion never arrives? After successful completion, are all backend writes finished and disk-image resources released, or is additional teardown required? What documented sequence establishes that the VM’s complete writable storage set—including disk images and macOS auxiliary storage—can safely be deleted, replaced or restored? Do these guarantees depend on caching/synchronization mode or macOS version? We understand that forced stop does not guarantee a clean guest shutdown or application consistency. Our question concerns host-side storage quiescence and resource release. Documentation references would be helpful. Thank you.
0
0
88
16h
macOS: pre-established stop mechanism when a VM supervisor stops progressing
I am evaluating a bounded workload host using Virtualization.framework on Apple silicon. This is a question about supported architecture and API contracts, not a report of a reproduced bug. No particular macOS release has yet been qualified for this design; please identify the releases and prerequisites to which an answer applies. I have read the discussions about cleanup after the VM-owning application terminates: https://developer.apple.com/forums/thread/848542 https://developer.apple.com/forums/thread/850709 I understand that this cleanup is different from an externally observable, time-bounded teardown guarantee. I am not asking again for a replacement application's handle to a VM whose owner has already died. The unresolved case is different: A host application owns a VM, but its serial VM-control queue is no longer progressing. A separate supervisor is intended to initiate the fallback stop action against that application. An external stop trigger occurs. The supervisor is then lost or stops progressing before it enters the signal operation; the VM-owning application remains alive. Loss of the supervisor role does not necessarily mean that its process has exited, so a process-exit notification cannot be assumed. Complete host or kernel failure is not part of this scenario. Is there a supported public mechanism that can be established before workload preparation and retain authority to act on the same target application after this loss, without requiring another action by the supervisor or progress on the VM-control queue? For any such mechanism, I would particularly appreciate clarification of: How its authority is bound to the intended target during incomplete setup, including process creation that has begun but has not returned a usable target identity. Assuming an already-running watchdog leaves this setup boundary unanswered. Which actor performs the remaining action when the supervisor cannot, and what lifecycle, privilege and progress assumptions that actor requires. Whether any documented progress bound applies when a required operation does not return. The design requirement is completion of the whole prescribed stop/escalation attempt, including required failure-handling steps, within 10 seconds of the same first external trigger. Starting a timer or entering a signal call is not equivalent to completing that attempt. This is not a request for unconditional successful process or VM termination. A supported narrower mechanism, or an explicit statement that macOS provides no such contract for this case, would also be useful. I am looking for public interfaces and their documented limits, not private helper-process identities or kernel implementation details. Thank you.
8
0
123
1d
Supported termination of a specific unresponsive embedded XPC service instance
We are evaluating a signed macOS launcher app with an embedded XPC service. The service would own a VZVirtualMachine. Before permitting VM startup, the launcher must bind the admitted job to the actual service instance and establish any required termination authority. We need clarification on the following: Is there a public, supported mechanism for the containing app to terminate that specific service instance if it becomes unresponsive, including before its first application-level reply? If so, what API, signing, sandbox, entitlement, and authorization conditions apply? How can the termination target remain bound to that instance despite PID reuse or service regeneration? Is transfer of a task-control right from the service to the launcher, followed by task_terminate, supported for this purpose? If it requires the service to respond first, is there a supported alternative for a pre-reply hang? What supported observation confirms termination of that same process instance, separately from acceptance of a termination request? What lifecycle behavior applies if the containing launcher itself terminates unexpectedly? We understand from threads 848542 and 850709 that Virtualization is expected to reclaim a guest after its owner exits, but provides neither a teardown timeline guarantee nor a successor-process guest-completion handle. We are not requesting such a guarantee or treating service exit as proof of completed VM reclamation. Please identify applicable documentation and any platform-version restrictions.
2
0
77
1d
Unable to enrol macOS 27 beta VMs in to Jamf
I have so far been unable to enrol a macOS 27 beta VM in to Jamf since initial beta release. Is this by design? I can’t find any documentation or posts on apple developer forums about this anywhere. My agentic coding session has done some probing around in the VM and it thinks something is going wrong with Secure Keychain within the VM. Everybody on my team is observing the same behaviour as this, and I’ve had it happening across two different laptops (one of them which is, itself, running the latest macOS 27 Beta, and the other which I created a Beta VM by installing Tahoe in the VM, logging in to iCloud, and enabling Beta channel updates) The only thing we’ve found we can do so far is to join to Jamf in Tahoe first, but the problem I have there is, often times the option for Beta channel updates just doesn’t present itself in System Settings -> Software Update after signing in to iCloud, and I don’t know why it sometimes does but often doesn’t. Logs from agentic coding session below: The core log evidence This is the whole causal chain, from the 27 guest's unified log, inside 370 microseconds. Innermost failure first: 05:24:04.967316 apsd: (CryptoTokenKit) [com.apple.CryptoTokenKit:sepkey] <sepk:* kid=0000000000000000>: (apsd) unable to generate key: error e00002e2(-536870174) ACL=<SecAccessControlRef: dk;ock(true);odel(true);osgn(true);oa(true);okd(true)> 05:24:04.967433 apsd: (Security) [com.apple.security:seckey] SecKeyCreateRandomKey_ios failed: NSOSStatusErrorDomain Code=-25308 "Failed to generate keypair" (errSecInteractionNotAllowed / Interaction is not allowed with the Security Server.) 05:24:04.967574 apsd: (DeviceIdentity) com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to create reference key." 05:24:04.967600 apsd: [com.apple.apsd:courier] APSBAAClientIdentityProvider failed to obtain a BAA cert, error: com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to create reference key." 05:24:04.967686 apsd: [com.apple.apsd:courier] <APSCourierConnectionManager; production>: Stream error occurred for : APSErrorDomain Code=1 "Told not to connect after fetching server bag: (null) - closing stream" Read bottom-up: Secure Enclave key generation fails, so MobileActivation cannot create the reference key, so apsd cannot obtain its BAA device-identity certificate, so APNs tells it not to connect. kid=0000000000000000 means there is no key id at all. Then every courier line reports Connected on 0 interfaces, and mdmclient sets its PushWakeTopics only to get Connection Invalid for service com.apple.apsd and tear down. The command to regenerate it: log show --predicate 'process == "apsd"' --last 60m --info | grep -iE 'BAA|unable to generate key|server bag'. New control, collected just now mac26 happened to be running, so I got the comparison. macOS 26.6 (25G72) guest, same host, same network, 3 days uptime: BAA_FAILURES: 0 SEPKEY_FAILURES: 0 APNS_SOCKETS: 192.168.64.8.52286 -> 17.57.146.7.443 ESTABLISHED 192.168.64.8.52285 -> 17.253.77.203.443 ESTABLISHED (+ 3 more into 17.0.0.0/8) No BAA or courier complaints at all over 6 hours, and live connections into Apple's network. So a virtualised guest per se is fine; the 27 guest specifically cannot mint the key. The physical host, also on macOS 27.0, likewise logged zero of both failures over 3 hours.
22
7
11k
2d
Can a Mac App Store (sandboxed) app create and delete VLAN interfaces with SCVLANInterfaceCreate?
We make a Mac App Store app that runs virtual machines with the Virtualization framework. It has the com.apple.vm.networking entitlement and already bridges VMs to physical interfaces through VZBridgedNetworkDeviceAttachment. We'd like users to manage 802.1Q VLAN interfaces from inside the app, so they can create a VLAN on an Ethernet port and bridge a VM to it. The SystemConfiguration API for this is: var auth: AuthorizationRef? var item = AuthorizationItem(name: "system.services.systemconfiguration.network", valueLength: 0, value: nil, flags: 0) var rights = AuthorizationRights(count: 1, items: &item) AuthorizationCreate(&rights, nil, [.interactionAllowed, .extendRights, .preAuthorize], &auth) let prefs = SCPreferencesCreateWithAuthorization(nil, "MyApp" as CFString, nil, auth!)! SCPreferencesLock(prefs, true) // fails in the sandbox let vlan = SCVLANInterfaceCreate(prefs, physicalInterface, 100 as CFNumber) SCPreferencesCommitChanges(prefs) SCPreferencesApplyChanges(prefs) SCPreferencesUnlock(prefs) What we see on macOS 27: Without the sandbox, SCPreferencesLock on preferences created with SCPreferencesCreateWithAuthorization succeeds. With com.apple.security.app-sandbox, the same call fails with kSCStatusAccessError ("Permission denied"). Read-only calls work in the sandbox: SCVLANInterfaceCopyAll, ACVLANInterfaceCopyAvailablePhysicalInterfaces and SCNetworkInterfaceCopyAll all return the expected results. Our questions: Can a sandboxed Mac App Store app create or delete VLAN interfaces in any supported way, through SystemConfiguration or another API? If not, is there an entitlement we could request for this, similar to com.apple.vm.networking? Or is a privileged helper (SMAppService.daemon) the only way? As we understand it, the Mac App Store doesn't allow a privileged helper. Are VLAN interfaces (vlanN) meant to appear in VZBridgedNetworkInterface.networkInterfaces(update: it appears i create vlan interface using mac settings network settings) so a VM can be bridged to one? Does vmnet's bridged mode support them? If a VM is bridged to the physical Ethernet port and tags its own frames inside the guest, do the 802.1Q tags pass through the bridge unchanged? If creating VLANs isn't possible from the sandbox, our fallback is to list the existing VLANs and send users to System Settings › Network › Manage Virtual Interfaces. We'd like to confirm that before building it. Thanks!
5
0
156
4d
File Handle Exhaustion Issue with com.apple.Virtualization.VirtualMachine in VZ Environment
We are currently utilizing VZ with Lima (details: Lima VM and VZ) for our development environment. However, we're encountering a critical issue with the com.apple.Virtualization.VirtualMachine process leading to open file handle exhaustion. When mounting our programming languages dependency cache folder (Which can have a lot of files) into the VZ VM, we encounter an operating system error related to open file limits: /gomodcache/github.com/go-git/go-git/v5@v5.4.2/plumbing/object/patch.go:14:2: open /gomodcache/github.com/go-git/go-git/v5@v5.4.2/plumbing/format/diff/unified_encoder.go: too many open files in system Further investigation revealed an abnormally high number of open files associated with the com.apple.Virtualization.VirtualMachine process. A significant portion of these files are not actively used but remain open. Example Case: A file (/Users/rcurrah/test.txt) created on the Mac host and listed (ls) in the VM remains open even 20 minutes later, as evidenced by the following command output: ❯ lsof | grep 11208 | grep test.txt COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME com.apple 11208 rcurrah 4823r REG 1,13 0 46200882 /Users/rcurrah/test.txt Steps to Reproduce the Issue: To reproduce the file handle exhaustion follow the below steps. This process will create a large number of files on the Mac host, listing them on the VZ VM, and then verifying their open status using lsof. Setup the VZ Environment with Sharing: Create a VZ VM with your home directory shared to the VM. Create a Test Directory on the Mac Host: Create a new directory on your Mac host, e.g., mkdir ~/test-file-exhaustion. Generate a Large Number of Files: Navigate to the created directory: cd ~/test-file-exhaustion. Use a loop to create a large number of files, e.g., for i in {1..10000}; do touch "file_${i}.txt"; done. This will create 10,000 files named file_1.txt, file_2.txt, etc. List Files in the VM: Access the VZ VM shell. Navigate to the mounted directory and list the files using the ls command, e.g., ls /path/to/mounted/test-file-exhaustion. Check Open Files on Mac Host: Exit the VM and return to your Mac host terminal. Use the lsof command to check for open files related to the com.apple.Virtualization.VirtualMachine process: lsof | grep "$(pgrep com.apple.Virtualization.VirtualMachine)" | grep 'test-file-exhaustion' | wc -l. Document the Output: Record the output of the lsof command. Note the number of open files. Verify File Closure (or Lack Thereof): After a certain period, e.g., 20 minutes, repeat the lsof command to see if the files are still open, indicating that they haven’t been closed properly by the process. Given these observations, we have a couple of questions: Is this behavior of com.apple.Virtualization.VirtualMachine retaining open file handles a known issue or a bug? Should VZ be managing the closure of these file handles more efficiently, especially when they are no longer in use? This issue is impacting our development workflow significantly. Any guidance or insights on resolving this would be highly appreciated. Thank you for your attention to this matter. Best regards, Ryan
16
1
2.6k
5d
AccessoryAccess for a Developer ID virtualization app: can it replace a root daemon for USB storage devices?
I build AVM, the Accessible Virtual Machine, a free, open source Mac app that runs Windows 11 for ARM in QEMU. It's built for blind people who use VoiceOver on the Mac and a screen reader in Windows. It's on GitHub at https://github.com/allisonfm85/accessible-virtual-machine. AVM ships with Developer ID, it's notarized, and it isn't sandboxed. QEMU runs as a child process, signed by the same team, and does the USB work itself through usbredir and libusb. I asked DTS about this (case 23107052), and Quinn pointed me to thread 851767. Today AVM captures USB devices from a root daemon registered with SMAppService. That works for braille displays and microphones. It fails for USB flash drives. Opening interface 0 returns 0xe00002c9. I measured why with a small IOUSBHost tool: Run with sudo from a terminal that has Removable Volumes: works. Same command with Removable Volumes turned off: fails with 0xe00002c9. Run as a launchd daemon in the system domain: fails. Full Disk Access makes no difference. So the block is the Removable Volumes permission, and a daemon has no responsible app to carry it. Granting it to AVM doesn't help the daemon. Thread 851767 shows a flash drive working through AccessoryAccess and IOUSBHostDevice, with interfaces opened through IOUSBLib. That looks like the path I should be on. My questions: Is the Claim USB Accessory capability (com.apple.developer.accessory-access.usb) available to Developer ID apps outside the Mac App Store? Does it require the App Sandbox? Does the user's AccessoryAccess consent cover a USB storage device's interfaces? In other words, would it get past the Removable Volumes check that stops my daemon? Can AVM pass createXPCRepresentation to QEMU, a non-sandboxed child process from the same team, and have QEMU open the accessory there? libusb opens interfaces through IOUSBLib. Given FB25324561, is it reasonable to ship on that path for now? If AccessoryAccess isn't available to Developer ID apps, I'd still welcome guidance on a supported way, such as com.apple.vm.device-access. I'm happy to share my sample project or logs. Thank you, Allison Meloy
1
0
123
6d
Is it possible to run an iPadOS virtual machine inside an iOS app?
Hi everyone, I am researching the technical feasibility of a project named Kairavox. The goal is to run a genuine, unmodified iPadOS installation as a guest VM inside a standalone app on an ordinary, unjailbroken iPhone. Our first research target is iPadOS 27.2.1 on an iPad 9th-generation (A13) guest. This is not an iPadOS-style interface or a remote desktop. We want to boot and run actual iPadOS in the guest. Proposed approach Apple’s public virtualization and hypervisor documentation appears to cover Mac hosts, not iPhone hosts. We are therefore investigating a native software AArch64 interpreter inside a normal iOS app. JIT is not assumed; we would consider it only if Apple confirms an applicable, supported development path. We are considering personal development signing and sideloading tools such as AltStore or SideStore. App Store distribution is not a project requirement. We understand that these tools do not themselves grant Apple entitlements, and that free Personal Team provisioning has limits. We are also investigating Apple’s documented Increased Memory Limit and Extended Virtual Addressing entitlements. We do not know whether either is available for this app and signing route, or what memory budget would actually be available to guest RAM. Projects such as Henge and GetMoreRam are useful points of comparison, but we understand that they do not establish an Apple-supported route for an iPadOS guest. We will not rely on private APIs, unauthorized entitlements, Secure Boot bypasses, or firmware patches. Questions Is there a documented iOS API or entitlement that lets a third-party iPhone app host a virtual CPU or VM? If not, is a native software interpreter a supported way for an app to interpret AArch64 guest instructions? Does Apple permit that interpreter to run an unmodified iPadOS guest in a sideloaded development app? Are there specific code-execution or licensing restrictions we should review? Apple documents virtual hardware identities and restore workflows for macOS VMs. Is there an analogous supported guest identity and image-personalization process for iPadOS, including an iPadOS 27.2.1 guest? Does Apple document a virtual SEP model, or another supported way to meet SEP-dependent boot, storage, and platform-service requirements for an iPadOS guest? Development Signing & JIT: For development on our own stock iPhone, can free Personal Team signing support this kind of application? Are there documented JIT permissions available through this signing route? If not, does JIT require a different signing arrangement or entitlement? Can an independent developer request the Increased Memory Limit entitlement for an iOS app through a documented process? How should we distinguish that process from Extended Virtual Addressing and the development-only Increased Debugging Memory Limit entitlement? If these questions are better directed to Developer Technical Support or another Apple team, please point us to the appropriate channel. We are looking for a documented, authorized path and will not assume one exists. Thanks for any guidance.
1
0
246
6d
macOS 26.x App Sandbox: supported disk-image attachment and descriptor-based unmount
On macOS 26.x, is there a public, supported way for an App Sandbox application with com.apple.security.virtualization to attach a new disk-image file held in its own container and mount its APFS filesystem within that container, without root, privileged or unsandboxed helpers, private/temporary exception entitlements, Full Disk Access, or weakening App Sandbox? We distinguish attaching the image from mounting an already attached virtual device. DTS threads 655767, 780965 and 775835 discuss these separately. Which supported API or tool and entitlements apply on 26.x, if such a path exists? If attachment is supported, what ownership and sandbox checks apply to a later normal funmount(fd, 0) using an O_EVTONLY descriptor for that exact mount's root? Is this combination supported, including when another actor has already unmounted it? If not, what supported alternative preserves the same restricted profile and avoids force or whole-disk unmount?
0
0
93
6d
Distributing D3DMetal with a Mac App Store app
Hello, We develop a Mac App Store app that runs Windows on Apple silicon. We use D3DMetal from the Game Porting Toolkit so that DirectX 12 games and apps can run in it. Today, each user has to download the Game Porting Toolkit, open the "Evaluation environment" disk image and point our app to D3DMetal.framework. Many users find this confusing, and we would like to make DirectX 12 work out of the box. When we tried to bundle D3DMetal.framework in our app, App Store Connect rejected the upload: ▎ Invalid Bundle. The application bundle may not contain tools or frameworks provided by Apple, or using bundle identifiers in the 'com.apple.' namespace. Invalid bundle: D3DMetal … with bundle identifier 'com.apple.D3DMetal'. We also note that the Game Porting Toolkit licence limits distribution to non-commercial purposes. Our questions: Is there an approved way for a Mac App Store app to include or distribute D3DMetal, for example a commercial redistribution agreement or a separate licence? If not, is there a supported way for an App Store app to obtain D3DMetal on the user's Mac, such as an Apple-provided download or a system component it can use? Are there plans to make D3DMetal available to third-party apps, as a public framework or as part of macOS? We want to follow Apple's licence and App Store guidelines, so any guidance on the correct approach would be much appreciated. Thank you.
0
0
246
1w
Does the macOS 27 disk image release guidance also apply to USB mass storage?
Thanks for your answer about disk images after guest shutdown. You mentioned that on macOS 27 and later, the host should be able to use the image once guestDidStop(_:) fires. Does that also apply to a writable RAW image opened by URL with VZDiskImageStorageDeviceAttachment and presented to the guest as a VZUSBMassStorageDevice? I’m testing with UTM 5.0.8 on an Apple silicon Mac running macOS 27.0.1 (build 26A434). In my test, lsof showed an Apple Virtualization process holding the image open for read/write while the guest was running. After a graceful shutdown, ejecting the image in UTM, and quitting UTM, lsof showed no match. I’m trying to work out when a separate host process can safely read the file. For this kind of attachment, is guestDidStop(_:) enough, or does the app also need to wait for VZUSBController.detach to complete? Can a separate process running without elevated privileges verify that the framework is done with that file, or does it need the app hosting the VM to report that the relevant callback fired?
1
0
291
1w
Installing a macOS guest onto an external USB disk with Virtualization.framework (sandboxed app)
Hello, We develop a sandboxed Mac App Store app that runs virtual machines with Virtualization.framework on Apple silicon (macOS 27). Users want to install a macOS guest onto an external USB disk and start the VM from it, so they can keep a VM on portable storage or on a disk larger than the Mac's internal drive. What we tried USB passthrough: we attach the disk before the VM starts, with VZUSBPassthroughDeviceConfiguration (from an AAUSBAccessory) on a VZXHCIControllerConfiguration. Linux guests install onto the disk and boot from it without problems. For a macOS guest, VZMacOSInstaller fails to start when the USB disk is the only storage: As we understand it, a macOS VM can only start from its own storage devices, never from a USB device, so even a successful install would not boot. VZDiskBlockDeviceStorageDeviceAttachment: this needs an open file handle to /dev/diskN. That requires admin rights, which a sandboxed app can't obtain, so we can't use it in our App Store app. Questions Is there a supported way to install a macOS guest onto an external USB disk and start the VM from it? Is there a sandbox-compatible way to get a VZDiskBlockDeviceStorageDeviceAttachment for an external disk, for example after user consent, similar to how AccessoryAccess grants USB devices? If neither is possible today, is support for this planned, or is there a recommended alternative? Thank you for any guidance.
5
0
110
2w
Broken Private Relay and Black Screen Issues with 26.6.2 and 27.0 Virtual Machines
There have been 2 serious regressions in the hypervisor framework since developer beta 6 of macOS 27 that have continued into the final release, and the first beta of 27.2 The first is that since developer beta 6 of macOS 27, virtual machines that have an Apple ID with iCloud+ signed in fail to route traffic in Safari through iCloud Private Relay despite it being on. Parallels, UTM, VirtualBuddy have all been tested and the issue applies to all of them, exposing the host machine's IP address. I have reported the issue since I discovered it and there hasn't been any communication that Apple even knows its an issue to my open report in Feedback Assistant. The second issue is a newer one, and it affects macOS 26.6.2 and earlier virtual machines. Attempting to install 26.7 through the built-in software update causes the virtual machine to black screen upon reboot during the installation. Forcing the machine off and back on causes the virtual machine to revert back to macOS 26.6.2. There has been no available IPSW file to test if a clean install of 26.7 in a virtual machine is a viable workaround, or to see if there is a bug in the updating mechanism or bug in the 26.7 release itself in virtual machines. The Parallels Desktop forum is beginning to get reports from users of that software of the same black screen issue trying to update their own 26.6.2 VMs to 26.7. These issues have also not been corrected in either 27.2 Beta 1 nor 26.7.1 Has anyone found a workaround to either of these 2 issues, or submitted similar reports and got any kind of response from Apple? The feedback reports about these issues are FB24828992 and FB24791716
10
1
1.1k
2w
macOS guest freezes after update reboot on M4 host with Virtualization.framework
macOS guest (Virtualization.framework) freezes with all vCPUs halted right after a macOS update reboot - 3/3 on a macOS 26.7.1 (25G309) M4 host, seen with both UTM and Parallels Summary On a macOS 26.7.1 (25G309, beta/seed build) host with an Apple M4, every macOS guest that runs an in-place macOS update freezes at the same point: the in-OS phase of the update completes and reports success, the guest requests a reboot, records a shutdown stall 9 seconds later, reboots twice, shows the update progress screen for about a minute, and then stops. All four vCPUs enter WFI and never wake, paravirtualized graphics stops submitting, no I/O is pending on the host side, and no host service logs an error. The VM never recovers and has to be killed. Reproduced 3 out of 3 times, under two different front-ends (UTM and Parallels Desktop) and two guest versions (15.7.x and 26.6.2). Environment Host: iMac (Mac16,3), Apple M4, 16 GB RAM, macOS 26.7.1 build 25G309 (seed channel), installed the evening before the first failure. Primary guest: macOS 15.7.9 (24G830), hardware model VirtualMac2,1, 4 vCPUs, 6 GB RAM, 90 GB raw disk image (virtio-blk) stored on an external USB SSD. Networking bridged to the built-in Ethernet port. Devices enabled: memory balloon, audio, entropy, clipboard sharing; display 1920x1200 with dynamic resolution. Front-end for the primary case: UTM [version], Apple Virtualization backend. Guest was the only VM running, cold-booted, window open. Update being applied: MSU_UPDATE_24H23_patch_15.8_minor (15.7.9 -> 15.8). Other cases: a macOS 26.6.2 guest under UTM; a macOS 15.7.7 -> 15.8 guest under Parallels Desktop 26.4.2 (57518). Steps to reproduce Cold-boot a macOS 15.7.9 guest under Virtualization.framework, as the only VM on the host. In the guest: System Settings > Software Update > install macOS 15.8. Let it reboot. Expected The guest installs the update and boots into 15.8. Actual — timeline of the primary case (R = the moment Software Update requested the reboot; absolute timestamps are in the attached logs) R-23 min to R-5 min: UpdateBrainService prepares the update inside the guest, writing about 25 GB (two "disk writes" resource reports: 16.5 GB then 8.5 GB). No errors. R-1:56: post-logout install configured; disk space check passes (5.7 GB required, 40.7 GB free). R-1:44: "SUOSUPostLogoutInstallOperation: Applying MSU update". R: "Applied MSU update"; FileVault stash committed ("kAppleFDEKeyStore_commitStash success"); "Rebooting (success = 1, displayAsleep = 0, shutdown = 0)". This is the last line the guest ever writes to install.log. R+9 s: the guest writes a shutdown_stall diagnostic report. R+10 s: host sees ParavirtualizedGraphics "Device reset" / "PGDisplayNub[0]: Destroyed" (reboot #1). R+1:20: second device reset (reboot #2), 70 s after the first. On the host, the vmnet interface is torn down and recreated with no error, the AppleVirtualPlatformIdentity service completes boot attestation with no error, and the guest's graphics driver renegotiates ("Guest requested binary version: 209"). R+1:38: host logs "PGDisplay[0]: Change display mode to 3606x2254" — the guest is on the update progress screen. R+1:41 to R+2:25: the guest's six PGFifoThreads go idle one at a time. The progress bar stops partway. No further activity of any kind. R+11:35: spindump of the VM host process (com.apple.Virtualization.VirtualMachine): 0.042 s of CPU over a 5 s sample all four com.apple.virtualization.thread.cpu-N threads in Hv::Vcpu::run() -> HvCore::Hypervisor::VcpuStateManager::wait_for_interrupt() -> __psynch_cvwait cpu-0/cpu-1 wake on a ~20 ms timer tick and return to WFI; cpu-2/cpu-3 had not run for seconds no thread in any file read, write or fsync (no host I/O outstanding) PGFifoThreads last ran 550–614 s earlier process state Ss (sleeping), not U Host kernel log for the window: no USB, APFS, I/O error, timeout or reset entries. No hardware video decoder (AppleAVD) errors. The VM was left for over an hour with no change, then killed. Second case (same host, same day, UTM, guest macOS 26.6.2) Identical signature: two graphics device resets 69 s apart, display mode set 3 s after the second one, last graphics activity about a second later, then all vCPUs idle in WFI for ~6.5 hours until the VM was killed. Third case (same host, same day, Parallels Desktop 26.4.2, guest 15.7.7 -> 15.8) The guest was suspended in the middle of its update and resumed later. On resume ("-[_PGDevice willResumeWithSuspendState:error:]: Begin resume", preceded by "[VirtualMachineParameterBuilder] Failed to get auxiliary file identifier"), paravirtualized graphics never came back — its FIFO threads ran once and never again — and the guest's vCPUs sat in WFI. This may be a separate save/restore defect, but the end state is the same. What I believe is ruled out The in-OS phase of the update: it completed and reported success. Guest kernel panic: vCPUs are halted, not spinning, and there is no panic report on the guest's data volume. Disk space: 40.7 GB free in the guest at install time. Host storage stall: no uninterruptible wait, no I/O frames in the spindump, no kernel storage errors. Host hardware video decoder: no AppleAVD errors in the primary case. Host services: vmnet and AppleVirtualPlatformIdentity completed normally seconds before the hang. Guest memory: 6 GB allocated. Not yet isolated The VM images live on an external USB SSD; not yet reproduced from internal storage. The memory balloon, audio and clipboard-sharing devices were enabled; not yet reproduced with them disabled. A third-party VPN client was running on the host (guest networking is bridged, so guest traffic bypasses the host tunnel, but host firewall rules could still affect bridged frames). I don't have a confirmed-good in-place guest update on this machine from before 26.7.1, so I can't state with certainty that this is a regression. Frequency 3 of 3 attempts on this host. Attachments / available on request spindumps of the hung VM host process (primary case and second case) host unified-log excerpts for both hang windows the guest's full install.log the guest's shutdown_stall report and the two UpdateBrainService disk-writes reports sysdiagnose captured while hung, if obtained Has anyone seen macOS guests stop at this point on the 26.7.x seeds? If you can reproduce, your host build, hypervisor, and whether the VM image is on internal or external storage would be useful to compare.
11
3
1k
3w
macOS 15.8.1 update installs mBoot-20457.1.29 in Virtualization.framework VMs, and the guest can then use only 1.75 GB of RAM
Summary We use Virtualization.framework to run macOS guests on Apple silicon. When the guest is updated from macOS 15.6.1 to 15.8.1 inside the VM, the update writes a new boot loader, mBoot-20457.1.29, into the VM's auxiliary storage. After the update, the guest kernel can use only about 1.75 GB of the configured memory. The kernel wires the rest as VM_KERN_COUNT_BOOT_STOLEN. The guest swaps all the time, and builds become 7 to 18 times slower. The fault stays after a cold boot. The guest boot-args value is empty. Environment Host: macOS 26.7.2 (25G320), Apple M3 Pro, 36 GB Guest before the update: macOS 15.6.1 (24G90), installed from the IPSW Guest after the update: macOS 15.8.1 (24H32), installed with softwareupdate inside the guest VM configuration: VZMacOSBootLoader with the default ROM, VZMacPlatformConfiguration, VZMacAuxiliaryStorage, memorySize = 15032385536 (14 GiB), CPUCount = 6 A customer sees the same fault on macOS 26.6.2 with an M2 Pro host. Steps to reproduce Create a macOS 15.6.1 VM from the IPSW. Set memory to 14 GiB. Boot the guest and confirm the RAM. vm_stat accounts for about 14 GiB. In the guest, run: sudo softwareupdate --install "macOS Sequoia 15.8.1-24H32" --restart --agree-to-license --user <owner> --stdinpass After the guest restarts, run sudo zprint | grep BOOT_STOLEN and vm_stat. Shut down the VM, start it again, and do step 4 again. Expected result The guest can use about 14 GiB of RAM, as it could before the update. Actual result 15.6.1, before the update 15.8.1, after the update and after a cold boot hw.memsize 15032385536 15032385536 RAM accounted for by vm_stat (free + active + inactive + speculative + wired + compressor) about 13.99 GiB about 1.75 GiB VM_KERN_COUNT_BOOT_STOLEN not measured 12,845,072 KB (about 12.25 GiB) Swap activity Swapins 0, Swapouts 0 Swapins 225,835, Swapouts 267,316 nvram boot-args empty empty Auxiliary storage contents after the update The auxiliary storage has two boot loader slots. Each slot has a 16-byte HUFA header: magic, version, upgrade count, and slot offset from 0x4000. Header offset Upgrade count Slot offset Boot loader 0x4000 1 0x24000 iBoot-11881.140.96 (the original 15.6.1 boot loader) 0x5000 2 0x224000 mBoot-20457.1.29 (written by the 15.8.1 update) The VM boots the slot with the higher count, which is mBoot-20457.1.29. Workaround test (customer) The customer worked on a copy of an affected VM. They copied the iBoot-11881.140.96 slot over the active mBoot-20457.1.29 slot in the auxiliary storage. macOS 15.8.1 then booted with about 14 GB of usable RAM, and the RAM stayed correct after cold boots. Their results: Extraction and validation of nine Xcode versions: 9 to 10 minutes (it was 68 to 102 minutes). Xcode 26.1.1 simulator installation and cache preparation: under 7 minutes (it was more than 2 hours). This workaround changes Apple's signed firmware by hand... Not really a good idea. Related report A public report describes the same fault with UTM and the same boot loader version. It also says that the kernel computes the stolen value from the memSizeActual and memSize boot parameters that the boot loader supplies. The author filed FB24992831 (https://wadetregaskis.com/the-macos-sequoia-15-8-updater-stole-my-ram/) Questions Is this a known fault in mBoot-20457.1.29? Will a later update fix it? Is there a supported way to make a VM boot a specific boot loader slot? Or a supported way to roll back the boot loader in VZMacAuxiliaryStorage? Is there a configuration on the host or in the guest that makes mBoot pass the full memory size? We'd prefer to not make nvram read only if the new mBoot is absolutely needed for some reason.
3
1
312
3w
Supported offline handoff boundary for a macOS VM disk image and auxiliary storage
We need a supported checkpoint after macOS installation before an independent process verifies and later boots the VM. We distinguish installer success, actual VM stopped state, application queue drain, reference release, and file synchronization. After installation completes without error and the same VM is stopped, can Virtualization still submit writes to the disk image or auxiliary storage? What documented barrier ends them? Does releasing all application references and autorelease scopes and draining the VM queue end storage writes by all SDK objects, internal tasks, and services? After the producer process exits and is waited for, can services, transferred handles, or pending framework buffers still modify either file? Is there a supported joint durability/consistency boundary for disk and auxiliary storage beyond the disk image Full guest-flush guarantee? What handoff sequence and platform versions does Apple support for sequential installation, offline verification, and boot processes? We are asking for the contract, not proposing forced stop, delayed hashing, or an undocumented recovery procedure.
3
0
127
3w
VZVirtualMachine behavior when its owning process unexpectedly terminates
I'm looking for clarification on the supported lifecycle semantics of VZVirtualMachine on macOS. Suppose process A creates and starts a VZVirtualMachine. While that VM is running, process A unexpectedly terminates or crashes. What is the supported behavior of that same original running VM instance? Is the VM automatically stopped or terminated when its owning process exits or crashes? If the VM can continue running, is there a supported API for a newly started process B to reconnect to or obtain control of that same already-running VM instance? If process B can reacquire the original VM, can it then force noncooperative termination of that instance, equivalent to using stop(completionHandler:) while the original controlling object still exists? Is there a supported way for process B to determine authoritatively that the original VM has stopped after process A is gone? Are there relevant differences between normal process exit, an unexpected crash, and forced process termination? I'm specifically asking about the same original running VM instance. Creating a new VZVirtualMachine with the same configuration, or restoring previously saved machine state, would not answer the question. If the owner-loss behavior is intentionally unspecified, or if there is no supported mechanism for another process to reacquire the same running VM, that would also answer the question. I'm interested in the supported Virtualization.framework contract rather than experimentally observed behavior. Environment: macOS 26.5.1 on Apple Silicon.
3
0
408
3w
Supported backing-file release semantics after stopping a Virtualization VM
I am designing a macOS Virtualization application using RAW disk images, an EFI variable store and host directory sharing. I need to distinguish stopping guest execution from releasing host backing-file access. I inspected the public declarations for VZDiskImageStorageDeviceAttachment, VZEFIVariableStore, VZSharedDirectory and VZVirtualMachine in the macOS27 SDK. The stop completion describes a stopped VM or an error; the backing types expose URL-based initialization. I could not identify a final backing-release event in those declarations. I would appreciate the supported contract, including any differences on macOS26 and macOS27. For each of the three URL-backed surfaces: When are paths resolved and backing references opened? Can the framework reopen a path or lazily access shared descendants later? Does successful stop completion guarantee backing references are released and required writes persisted, or only that guest execution stopped? What object-reference release and queue/callback ordering is required before the application may safely reuse, replace or remove the backing objects? Can Virtualization helper processes retain backing access after the application's worker process exits? Is there a supported observable event covering those references? If no such release event is documented, what supported architecture should retain or quarantine these resources until release can be established? I am not using physical block devices and am not generalizing their documented file-handle retention to URL-backed images, EFI stores or directory shares. Please link the public contract or clarify which behaviors are unspecified.
3
0
155
3w
AccessoryAccess in a sandboxed helper: IOUSBHostInterface fails without a temporary-exception entitlement. Is there a supported way?
Hello, We are building USB passthrough for virtual machines on macOS 27 and would appreciate guidance from the AccessoryAccess / IOUSBHost / App Sandbox teams on the supported way to open a USB accessory's interfaces from a sandboxed helper process. WHAT WE ARE BUILDING Our app is a sandboxed macOS app that runs virtual machines. For guests that use Virtualization.framework, USB passthrough already works through VZUSBPassthroughDevice, using the AAUSBAccessory we get from AccessoryAccess. For a second kind of guest we use our own virtual machine monitor, built on Hypervisor.framework. Each VM runs in its own helper process, a nested app bundle in Contents/Helpers that the main app launches with Process. The helper's entitlements are: com.apple.security.app-sandbox = true com.apple.security.inherit = true com.apple.security.hypervisor = true com.apple.vm.networking = true The main app's entitlements include: com.apple.security.app-sandbox = true com.apple.developer.accessory-access.usb = true com.apple.security.device.usb = true (plus hypervisor, networking, files, application groups) The helper emulates an xHCI controller for the guest and forwards the guest's USB transfers to the real device. We use the same AccessoryAccess hand-off the documentation describes for worker processes: The main app registers an AAUSBAccessoryListener with AAUSBAccessoryManager and shows the consent UI. Nothing changed here from the Virtualization.framework path. When the user attaches a device to a VM, the main app calls -[AAUSBAccessory createXPCRepresentation]. We send the bytes of that xpc_data object to the helper over our existing control channel. We use the bytes rather than an XPC connection because the representation contains only data, no Mach ports or file descriptors. The helper rebuilds the accessory with -[AAUSBAccessory initWithXPCRepresentation:] and calls -openWithServiceQueue:completionHandler:. This succeeds and returns an IOUSBHostDevice. In the IORegistry the device then has an AppleUSBHostFrameworkDeviceClient created by the helper. When the guest sends SET_CONFIGURATION, the helper calls -[IOUSBHostDevice configureWithValue:matchInterfaces:NO error:], which succeeds. It then finds the device's IOUSBHostInterface children in the IORegistry and opens each one with -[IOUSBHostInterface initWithIOService:options:queue:error:interestHandler:]. Bulk and interrupt transfers then go through IOUSBHostPipe (copyPipeWithAddress:, enqueueIORequestWithData:...). THE PROBLEM Steps 1-3 work, and so do control requests on the default pipe. The guest enumerates the device and loads its driver. Step 4 fails: every interface fails to open with Failed to create IOUSBHostInterface. (kIOReturnInternalError, 0xe00002c9) With no interfaces open there are no pipes, so the guest's driver fails as soon as it moves data. A USB flash drive reported "This device cannot start (Code 10)", and a USB Ethernet adapter reported "Network cable unplugged". What we found: An unsandboxed command-line tool, run while the helper held the device through AccessoryAccess, opened the same IOUSBHostInterface with no error. The IORegistry then showed an AppleUSBHostFrameworkInterfaceClient under the interface, created by that tool. So the kernel and the accessory state allow the open; the App Sandbox blocks it. /System/Library/Sandbox/Profiles/application.sb contains: (when (entitlement "com.apple.security.device.usb") (allow iokit-open-user-client (iokit-user-client-class "IOUSBDeviceUserClientV2" "IOUSBInterfaceUserClientV3"))) com.apple.security.device.usb (which the app has) therefore covers only the legacy IOUSBLib user clients, not AppleUSBHostFrameworkInterfaceClient, the class IOUSBHostInterface uses. We found no rule for AppleUSBHostFrameworkDeviceClient either. We assume AccessoryAccess authorizes the device client when the accessory is opened, but nothing does the same for the accessory's interfaces. Adding com.apple.security.device.usb to the helper itself doesn't work: the helper is killed at launch (exit status 5). We understand an inherited-sandbox helper may carry only a limited set of entitlements. HOW WE WORKED AROUND IT We added this entitlement to the main app. The helper inherits the app's sandbox, so it gets the exception too: <key>com.apple.security.temporary-exception.iokit-user-client-class</key> <array> <string>AppleUSBHostFrameworkInterfaceClient</string> </array> With it, the helper opens the interfaces and passthrough works: the flash drive mounts in the guest, and the Ethernet adapter gets a DHCP address and passes traffic. We would rather not ship a temporary-exception entitlement, especially since we also distribute through the Mac App Store. QUESTIONS Is opening an accessory's interfaces with IOUSBHostInterface the intended way to do I/O on a device obtained through AccessoryAccess? If so, what is the supported way to authorize AppleUSBHostFrameworkInterfaceClient for a sandboxed process, or a helper inheriting its sandbox, without a temporary exception? Does AccessoryAccess grant access to an accessory's interfaces as well as the IOUSBHostDevice? For example, should a listener registered with interface matching criteria (AAUSBAccessoryMatchingCriteria initWithDeviceMatchingDictionary: interfaceMatchingDictionaries:...) be able to open those interfaces? Or is there an API we missed that returns IOUSBHostInterface or IOUSBHostPipe objects for an opened accessory? Is passing the accessory to a helper as the bytes of -createXPCRepresentation, instead of through an XPC connection, supported? The documentation describes the representation as something sent "via XPC". Our helpers are plain child processes, not XPC services. Should we use the legacy IOUSBLib interface API instead (IOUSBInterfaceInterface through IOCreatePlugInInterfaceForService, client class IOUSBInterfaceUserClientV3, which com.apple.security.device.usb allows)? Is that supported for a device AccessoryAccess has opened for exclusive access, and is it acceptable to mix IOUSBHostDevice from AccessoryAccess with IOUSBLib interface objects for the same device? Would the temporary-exception entitlement above be accepted in App Store review for this case, or should we file a Feedback Assistant request for a dedicated entitlement or an API change? Environment: macOS 27 (Golden Gate), Apple silicon Xcode with the macOS 27 SDK App and helper are signed with the same team; the helper is a nested app bundle in Contents/Helpers using com.apple.security.inherit Tested devices: a USB 3 flash drive (mass storage, Bulk-Only Transport) and a USB 2.5GbE Ethernet adapter (Realtek, vendor 0x0BDA, product 0x8156) We can provide a minimal sample project that reproduces the IOUSBHostInterface failure, plus IORegistry dumps. Thank you for your time.
8
0
552
3w
How can a free Personal Team obtain the cross-architecture-support-unmanaged entitlement on macOS?
I’m developing an ARM64-native Wine + FEX compatibility runtime on Apple Silicon, without relying on Rosetta 2. According to the August 2026 Wine-devel discussion, the following entitlement is intended to be available to free developer accounts: com.apple.developer.cross-architecture-support-unmanaged However, I have encountered the following issues: My Xcode Personal Team does not offer a “Cross-architecture Compatibility Framework” capability. Certificates, Identifiers & Profiles is inaccessible to my free developer account. I cannot obtain a provisioning profile authorizing this entitlement. I contacted Apple Developer Support. They explained that entitlement requests generally require an Apple Developer Program Account Holder, but were unable to confirm whether this particular entitlement is currently requestable or where to request it. Could an Apple engineer clarify: Is the unmanaged entitlement currently available to free Personal Teams? What is the official App ID, provisioning profile, and code-signing procedure? Does this entitlement require additional approval from Apple? If it is unavailable, is there an officially supported alternative for development of an ARM64-native Wine loader? My goal is to use the native macOS cross-architecture features while keeping SIP and other security protections enabled. Relevant Wine-devel discussion: https://list\.winehq\.org/hyperkitty/list/wine\-devel%40list\.winehq\.org/thread/CKG5CEN2BE5VRXZ7O7NX4YUSBH3247WH/ Thank you.
3
0
354
Oct ’26
detecting if my process is running on a virtual macos x instance and not on my local mac machine
I m trying to identify if my launched process is running on a local mac machine(desktop/laptop) or a virtual macOS X instance like AWS EC2, Azure, MacStadium etc. I have followed this link which searched for its limited providers in the output, but I m not bound to any limited providers and looking for a general solution which is applicable to all the providers. Is there some hardware/network/virtualization-related information that can be used to identify if the process is launched on a virtual MacOS instance? OR is there some system Information that I can use to be sure that my process is running on a local machine?
Replies
3
Boosts
1
Views
3k
Activity
Oct ’23
Virtualization Resources
Virtualization framework is a high-level API to create macOS and Linux virtual machines. Hypervisor is a low-level API to build virtualization solutions without the need for a kernel extension. If you’re interested in containers on the Mac, check out the Containerization package and its associated container tool. Virtualization: Forums subtopic: App & System Services > Core OS Forums tag: Virtualization Virtualization framework documentation Using iCloud with macOS virtual machines documentation article Use iCloud on a virtual machine support article Running macOS in a virtual machine on Apple silicon sample code Running Linux in a Virtual Machine sample code Running GUI Linux in a virtual machine on a Mac sample code Building macOS apps with Xcode 26 on macOS 26 VM forums thread — This thread describes how the development experience in VMs has improved recently, and one remaining issue that you might bump in to. Hypervisor: Forums subtopic: App & System Services > Core OS Forums tag: Hypervisor Hypervisor framework documentation Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
Replies
0
Boosts
0
Views
834
Activity
Aug ’25
Virtualization.framework — stop completion and storage release
Hello Apple Developer Support, We are evaluating a macOS VM controller using VZVirtualMachine and would appreciate clarification: Does stop(completionHandler:) have any documented maximum completion time? What should a controller do if completion never arrives? After successful completion, are all backend writes finished and disk-image resources released, or is additional teardown required? What documented sequence establishes that the VM’s complete writable storage set—including disk images and macOS auxiliary storage—can safely be deleted, replaced or restored? Do these guarantees depend on caching/synchronization mode or macOS version? We understand that forced stop does not guarantee a clean guest shutdown or application consistency. Our question concerns host-side storage quiescence and resource release. Documentation references would be helpful. Thank you.
Replies
0
Boosts
0
Views
88
Activity
16h
macOS: pre-established stop mechanism when a VM supervisor stops progressing
I am evaluating a bounded workload host using Virtualization.framework on Apple silicon. This is a question about supported architecture and API contracts, not a report of a reproduced bug. No particular macOS release has yet been qualified for this design; please identify the releases and prerequisites to which an answer applies. I have read the discussions about cleanup after the VM-owning application terminates: https://developer.apple.com/forums/thread/848542 https://developer.apple.com/forums/thread/850709 I understand that this cleanup is different from an externally observable, time-bounded teardown guarantee. I am not asking again for a replacement application's handle to a VM whose owner has already died. The unresolved case is different: A host application owns a VM, but its serial VM-control queue is no longer progressing. A separate supervisor is intended to initiate the fallback stop action against that application. An external stop trigger occurs. The supervisor is then lost or stops progressing before it enters the signal operation; the VM-owning application remains alive. Loss of the supervisor role does not necessarily mean that its process has exited, so a process-exit notification cannot be assumed. Complete host or kernel failure is not part of this scenario. Is there a supported public mechanism that can be established before workload preparation and retain authority to act on the same target application after this loss, without requiring another action by the supervisor or progress on the VM-control queue? For any such mechanism, I would particularly appreciate clarification of: How its authority is bound to the intended target during incomplete setup, including process creation that has begun but has not returned a usable target identity. Assuming an already-running watchdog leaves this setup boundary unanswered. Which actor performs the remaining action when the supervisor cannot, and what lifecycle, privilege and progress assumptions that actor requires. Whether any documented progress bound applies when a required operation does not return. The design requirement is completion of the whole prescribed stop/escalation attempt, including required failure-handling steps, within 10 seconds of the same first external trigger. Starting a timer or entering a signal call is not equivalent to completing that attempt. This is not a request for unconditional successful process or VM termination. A supported narrower mechanism, or an explicit statement that macOS provides no such contract for this case, would also be useful. I am looking for public interfaces and their documented limits, not private helper-process identities or kernel implementation details. Thank you.
Replies
8
Boosts
0
Views
123
Activity
1d
Supported termination of a specific unresponsive embedded XPC service instance
We are evaluating a signed macOS launcher app with an embedded XPC service. The service would own a VZVirtualMachine. Before permitting VM startup, the launcher must bind the admitted job to the actual service instance and establish any required termination authority. We need clarification on the following: Is there a public, supported mechanism for the containing app to terminate that specific service instance if it becomes unresponsive, including before its first application-level reply? If so, what API, signing, sandbox, entitlement, and authorization conditions apply? How can the termination target remain bound to that instance despite PID reuse or service regeneration? Is transfer of a task-control right from the service to the launcher, followed by task_terminate, supported for this purpose? If it requires the service to respond first, is there a supported alternative for a pre-reply hang? What supported observation confirms termination of that same process instance, separately from acceptance of a termination request? What lifecycle behavior applies if the containing launcher itself terminates unexpectedly? We understand from threads 848542 and 850709 that Virtualization is expected to reclaim a guest after its owner exits, but provides neither a teardown timeline guarantee nor a successor-process guest-completion handle. We are not requesting such a guarantee or treating service exit as proof of completed VM reclamation. Please identify applicable documentation and any platform-version restrictions.
Replies
2
Boosts
0
Views
77
Activity
1d
Unable to enrol macOS 27 beta VMs in to Jamf
I have so far been unable to enrol a macOS 27 beta VM in to Jamf since initial beta release. Is this by design? I can’t find any documentation or posts on apple developer forums about this anywhere. My agentic coding session has done some probing around in the VM and it thinks something is going wrong with Secure Keychain within the VM. Everybody on my team is observing the same behaviour as this, and I’ve had it happening across two different laptops (one of them which is, itself, running the latest macOS 27 Beta, and the other which I created a Beta VM by installing Tahoe in the VM, logging in to iCloud, and enabling Beta channel updates) The only thing we’ve found we can do so far is to join to Jamf in Tahoe first, but the problem I have there is, often times the option for Beta channel updates just doesn’t present itself in System Settings -> Software Update after signing in to iCloud, and I don’t know why it sometimes does but often doesn’t. Logs from agentic coding session below: The core log evidence This is the whole causal chain, from the 27 guest's unified log, inside 370 microseconds. Innermost failure first: 05:24:04.967316 apsd: (CryptoTokenKit) [com.apple.CryptoTokenKit:sepkey] <sepk:* kid=0000000000000000>: (apsd) unable to generate key: error e00002e2(-536870174) ACL=<SecAccessControlRef: dk;ock(true);odel(true);osgn(true);oa(true);okd(true)> 05:24:04.967433 apsd: (Security) [com.apple.security:seckey] SecKeyCreateRandomKey_ios failed: NSOSStatusErrorDomain Code=-25308 "Failed to generate keypair" (errSecInteractionNotAllowed / Interaction is not allowed with the Security Server.) 05:24:04.967574 apsd: (DeviceIdentity) com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to create reference key." 05:24:04.967600 apsd: [com.apple.apsd:courier] APSBAAClientIdentityProvider failed to obtain a BAA cert, error: com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to create reference key." 05:24:04.967686 apsd: [com.apple.apsd:courier] <APSCourierConnectionManager; production>: Stream error occurred for : APSErrorDomain Code=1 "Told not to connect after fetching server bag: (null) - closing stream" Read bottom-up: Secure Enclave key generation fails, so MobileActivation cannot create the reference key, so apsd cannot obtain its BAA device-identity certificate, so APNs tells it not to connect. kid=0000000000000000 means there is no key id at all. Then every courier line reports Connected on 0 interfaces, and mdmclient sets its PushWakeTopics only to get Connection Invalid for service com.apple.apsd and tear down. The command to regenerate it: log show --predicate 'process == "apsd"' --last 60m --info | grep -iE 'BAA|unable to generate key|server bag'. New control, collected just now mac26 happened to be running, so I got the comparison. macOS 26.6 (25G72) guest, same host, same network, 3 days uptime: BAA_FAILURES: 0 SEPKEY_FAILURES: 0 APNS_SOCKETS: 192.168.64.8.52286 -> 17.57.146.7.443 ESTABLISHED 192.168.64.8.52285 -> 17.253.77.203.443 ESTABLISHED (+ 3 more into 17.0.0.0/8) No BAA or courier complaints at all over 6 hours, and live connections into Apple's network. So a virtualised guest per se is fine; the 27 guest specifically cannot mint the key. The physical host, also on macOS 27.0, likewise logged zero of both failures over 3 hours.
Replies
22
Boosts
7
Views
11k
Activity
2d
Can a Mac App Store (sandboxed) app create and delete VLAN interfaces with SCVLANInterfaceCreate?
We make a Mac App Store app that runs virtual machines with the Virtualization framework. It has the com.apple.vm.networking entitlement and already bridges VMs to physical interfaces through VZBridgedNetworkDeviceAttachment. We'd like users to manage 802.1Q VLAN interfaces from inside the app, so they can create a VLAN on an Ethernet port and bridge a VM to it. The SystemConfiguration API for this is: var auth: AuthorizationRef? var item = AuthorizationItem(name: "system.services.systemconfiguration.network", valueLength: 0, value: nil, flags: 0) var rights = AuthorizationRights(count: 1, items: &item) AuthorizationCreate(&rights, nil, [.interactionAllowed, .extendRights, .preAuthorize], &auth) let prefs = SCPreferencesCreateWithAuthorization(nil, "MyApp" as CFString, nil, auth!)! SCPreferencesLock(prefs, true) // fails in the sandbox let vlan = SCVLANInterfaceCreate(prefs, physicalInterface, 100 as CFNumber) SCPreferencesCommitChanges(prefs) SCPreferencesApplyChanges(prefs) SCPreferencesUnlock(prefs) What we see on macOS 27: Without the sandbox, SCPreferencesLock on preferences created with SCPreferencesCreateWithAuthorization succeeds. With com.apple.security.app-sandbox, the same call fails with kSCStatusAccessError ("Permission denied"). Read-only calls work in the sandbox: SCVLANInterfaceCopyAll, ACVLANInterfaceCopyAvailablePhysicalInterfaces and SCNetworkInterfaceCopyAll all return the expected results. Our questions: Can a sandboxed Mac App Store app create or delete VLAN interfaces in any supported way, through SystemConfiguration or another API? If not, is there an entitlement we could request for this, similar to com.apple.vm.networking? Or is a privileged helper (SMAppService.daemon) the only way? As we understand it, the Mac App Store doesn't allow a privileged helper. Are VLAN interfaces (vlanN) meant to appear in VZBridgedNetworkInterface.networkInterfaces(update: it appears i create vlan interface using mac settings network settings) so a VM can be bridged to one? Does vmnet's bridged mode support them? If a VM is bridged to the physical Ethernet port and tags its own frames inside the guest, do the 802.1Q tags pass through the bridge unchanged? If creating VLANs isn't possible from the sandbox, our fallback is to list the existing VLANs and send users to System Settings › Network › Manage Virtual Interfaces. We'd like to confirm that before building it. Thanks!
Replies
5
Boosts
0
Views
156
Activity
4d
File Handle Exhaustion Issue with com.apple.Virtualization.VirtualMachine in VZ Environment
We are currently utilizing VZ with Lima (details: Lima VM and VZ) for our development environment. However, we're encountering a critical issue with the com.apple.Virtualization.VirtualMachine process leading to open file handle exhaustion. When mounting our programming languages dependency cache folder (Which can have a lot of files) into the VZ VM, we encounter an operating system error related to open file limits: /gomodcache/github.com/go-git/go-git/v5@v5.4.2/plumbing/object/patch.go:14:2: open /gomodcache/github.com/go-git/go-git/v5@v5.4.2/plumbing/format/diff/unified_encoder.go: too many open files in system Further investigation revealed an abnormally high number of open files associated with the com.apple.Virtualization.VirtualMachine process. A significant portion of these files are not actively used but remain open. Example Case: A file (/Users/rcurrah/test.txt) created on the Mac host and listed (ls) in the VM remains open even 20 minutes later, as evidenced by the following command output: ❯ lsof | grep 11208 | grep test.txt COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME com.apple 11208 rcurrah 4823r REG 1,13 0 46200882 /Users/rcurrah/test.txt Steps to Reproduce the Issue: To reproduce the file handle exhaustion follow the below steps. This process will create a large number of files on the Mac host, listing them on the VZ VM, and then verifying their open status using lsof. Setup the VZ Environment with Sharing: Create a VZ VM with your home directory shared to the VM. Create a Test Directory on the Mac Host: Create a new directory on your Mac host, e.g., mkdir ~/test-file-exhaustion. Generate a Large Number of Files: Navigate to the created directory: cd ~/test-file-exhaustion. Use a loop to create a large number of files, e.g., for i in {1..10000}; do touch "file_${i}.txt"; done. This will create 10,000 files named file_1.txt, file_2.txt, etc. List Files in the VM: Access the VZ VM shell. Navigate to the mounted directory and list the files using the ls command, e.g., ls /path/to/mounted/test-file-exhaustion. Check Open Files on Mac Host: Exit the VM and return to your Mac host terminal. Use the lsof command to check for open files related to the com.apple.Virtualization.VirtualMachine process: lsof | grep "$(pgrep com.apple.Virtualization.VirtualMachine)" | grep 'test-file-exhaustion' | wc -l. Document the Output: Record the output of the lsof command. Note the number of open files. Verify File Closure (or Lack Thereof): After a certain period, e.g., 20 minutes, repeat the lsof command to see if the files are still open, indicating that they haven’t been closed properly by the process. Given these observations, we have a couple of questions: Is this behavior of com.apple.Virtualization.VirtualMachine retaining open file handles a known issue or a bug? Should VZ be managing the closure of these file handles more efficiently, especially when they are no longer in use? This issue is impacting our development workflow significantly. Any guidance or insights on resolving this would be highly appreciated. Thank you for your attention to this matter. Best regards, Ryan
Replies
16
Boosts
1
Views
2.6k
Activity
5d
AccessoryAccess for a Developer ID virtualization app: can it replace a root daemon for USB storage devices?
I build AVM, the Accessible Virtual Machine, a free, open source Mac app that runs Windows 11 for ARM in QEMU. It's built for blind people who use VoiceOver on the Mac and a screen reader in Windows. It's on GitHub at https://github.com/allisonfm85/accessible-virtual-machine. AVM ships with Developer ID, it's notarized, and it isn't sandboxed. QEMU runs as a child process, signed by the same team, and does the USB work itself through usbredir and libusb. I asked DTS about this (case 23107052), and Quinn pointed me to thread 851767. Today AVM captures USB devices from a root daemon registered with SMAppService. That works for braille displays and microphones. It fails for USB flash drives. Opening interface 0 returns 0xe00002c9. I measured why with a small IOUSBHost tool: Run with sudo from a terminal that has Removable Volumes: works. Same command with Removable Volumes turned off: fails with 0xe00002c9. Run as a launchd daemon in the system domain: fails. Full Disk Access makes no difference. So the block is the Removable Volumes permission, and a daemon has no responsible app to carry it. Granting it to AVM doesn't help the daemon. Thread 851767 shows a flash drive working through AccessoryAccess and IOUSBHostDevice, with interfaces opened through IOUSBLib. That looks like the path I should be on. My questions: Is the Claim USB Accessory capability (com.apple.developer.accessory-access.usb) available to Developer ID apps outside the Mac App Store? Does it require the App Sandbox? Does the user's AccessoryAccess consent cover a USB storage device's interfaces? In other words, would it get past the Removable Volumes check that stops my daemon? Can AVM pass createXPCRepresentation to QEMU, a non-sandboxed child process from the same team, and have QEMU open the accessory there? libusb opens interfaces through IOUSBLib. Given FB25324561, is it reasonable to ship on that path for now? If AccessoryAccess isn't available to Developer ID apps, I'd still welcome guidance on a supported way, such as com.apple.vm.device-access. I'm happy to share my sample project or logs. Thank you, Allison Meloy
Replies
1
Boosts
0
Views
123
Activity
6d
Is it possible to run an iPadOS virtual machine inside an iOS app?
Hi everyone, I am researching the technical feasibility of a project named Kairavox. The goal is to run a genuine, unmodified iPadOS installation as a guest VM inside a standalone app on an ordinary, unjailbroken iPhone. Our first research target is iPadOS 27.2.1 on an iPad 9th-generation (A13) guest. This is not an iPadOS-style interface or a remote desktop. We want to boot and run actual iPadOS in the guest. Proposed approach Apple’s public virtualization and hypervisor documentation appears to cover Mac hosts, not iPhone hosts. We are therefore investigating a native software AArch64 interpreter inside a normal iOS app. JIT is not assumed; we would consider it only if Apple confirms an applicable, supported development path. We are considering personal development signing and sideloading tools such as AltStore or SideStore. App Store distribution is not a project requirement. We understand that these tools do not themselves grant Apple entitlements, and that free Personal Team provisioning has limits. We are also investigating Apple’s documented Increased Memory Limit and Extended Virtual Addressing entitlements. We do not know whether either is available for this app and signing route, or what memory budget would actually be available to guest RAM. Projects such as Henge and GetMoreRam are useful points of comparison, but we understand that they do not establish an Apple-supported route for an iPadOS guest. We will not rely on private APIs, unauthorized entitlements, Secure Boot bypasses, or firmware patches. Questions Is there a documented iOS API or entitlement that lets a third-party iPhone app host a virtual CPU or VM? If not, is a native software interpreter a supported way for an app to interpret AArch64 guest instructions? Does Apple permit that interpreter to run an unmodified iPadOS guest in a sideloaded development app? Are there specific code-execution or licensing restrictions we should review? Apple documents virtual hardware identities and restore workflows for macOS VMs. Is there an analogous supported guest identity and image-personalization process for iPadOS, including an iPadOS 27.2.1 guest? Does Apple document a virtual SEP model, or another supported way to meet SEP-dependent boot, storage, and platform-service requirements for an iPadOS guest? Development Signing & JIT: For development on our own stock iPhone, can free Personal Team signing support this kind of application? Are there documented JIT permissions available through this signing route? If not, does JIT require a different signing arrangement or entitlement? Can an independent developer request the Increased Memory Limit entitlement for an iOS app through a documented process? How should we distinguish that process from Extended Virtual Addressing and the development-only Increased Debugging Memory Limit entitlement? If these questions are better directed to Developer Technical Support or another Apple team, please point us to the appropriate channel. We are looking for a documented, authorized path and will not assume one exists. Thanks for any guidance.
Replies
1
Boosts
0
Views
246
Activity
6d
macOS 26.x App Sandbox: supported disk-image attachment and descriptor-based unmount
On macOS 26.x, is there a public, supported way for an App Sandbox application with com.apple.security.virtualization to attach a new disk-image file held in its own container and mount its APFS filesystem within that container, without root, privileged or unsandboxed helpers, private/temporary exception entitlements, Full Disk Access, or weakening App Sandbox? We distinguish attaching the image from mounting an already attached virtual device. DTS threads 655767, 780965 and 775835 discuss these separately. Which supported API or tool and entitlements apply on 26.x, if such a path exists? If attachment is supported, what ownership and sandbox checks apply to a later normal funmount(fd, 0) using an O_EVTONLY descriptor for that exact mount's root? Is this combination supported, including when another actor has already unmounted it? If not, what supported alternative preserves the same restricted profile and avoids force or whole-disk unmount?
Replies
0
Boosts
0
Views
93
Activity
6d
Distributing D3DMetal with a Mac App Store app
Hello, We develop a Mac App Store app that runs Windows on Apple silicon. We use D3DMetal from the Game Porting Toolkit so that DirectX 12 games and apps can run in it. Today, each user has to download the Game Porting Toolkit, open the "Evaluation environment" disk image and point our app to D3DMetal.framework. Many users find this confusing, and we would like to make DirectX 12 work out of the box. When we tried to bundle D3DMetal.framework in our app, App Store Connect rejected the upload: ▎ Invalid Bundle. The application bundle may not contain tools or frameworks provided by Apple, or using bundle identifiers in the 'com.apple.' namespace. Invalid bundle: D3DMetal … with bundle identifier 'com.apple.D3DMetal'. We also note that the Game Porting Toolkit licence limits distribution to non-commercial purposes. Our questions: Is there an approved way for a Mac App Store app to include or distribute D3DMetal, for example a commercial redistribution agreement or a separate licence? If not, is there a supported way for an App Store app to obtain D3DMetal on the user's Mac, such as an Apple-provided download or a system component it can use? Are there plans to make D3DMetal available to third-party apps, as a public framework or as part of macOS? We want to follow Apple's licence and App Store guidelines, so any guidance on the correct approach would be much appreciated. Thank you.
Replies
0
Boosts
0
Views
246
Activity
1w
Does the macOS 27 disk image release guidance also apply to USB mass storage?
Thanks for your answer about disk images after guest shutdown. You mentioned that on macOS 27 and later, the host should be able to use the image once guestDidStop(_:) fires. Does that also apply to a writable RAW image opened by URL with VZDiskImageStorageDeviceAttachment and presented to the guest as a VZUSBMassStorageDevice? I’m testing with UTM 5.0.8 on an Apple silicon Mac running macOS 27.0.1 (build 26A434). In my test, lsof showed an Apple Virtualization process holding the image open for read/write while the guest was running. After a graceful shutdown, ejecting the image in UTM, and quitting UTM, lsof showed no match. I’m trying to work out when a separate host process can safely read the file. For this kind of attachment, is guestDidStop(_:) enough, or does the app also need to wait for VZUSBController.detach to complete? Can a separate process running without elevated privileges verify that the framework is done with that file, or does it need the app hosting the VM to report that the relevant callback fired?
Replies
1
Boosts
0
Views
291
Activity
1w
Installing a macOS guest onto an external USB disk with Virtualization.framework (sandboxed app)
Hello, We develop a sandboxed Mac App Store app that runs virtual machines with Virtualization.framework on Apple silicon (macOS 27). Users want to install a macOS guest onto an external USB disk and start the VM from it, so they can keep a VM on portable storage or on a disk larger than the Mac's internal drive. What we tried USB passthrough: we attach the disk before the VM starts, with VZUSBPassthroughDeviceConfiguration (from an AAUSBAccessory) on a VZXHCIControllerConfiguration. Linux guests install onto the disk and boot from it without problems. For a macOS guest, VZMacOSInstaller fails to start when the USB disk is the only storage: As we understand it, a macOS VM can only start from its own storage devices, never from a USB device, so even a successful install would not boot. VZDiskBlockDeviceStorageDeviceAttachment: this needs an open file handle to /dev/diskN. That requires admin rights, which a sandboxed app can't obtain, so we can't use it in our App Store app. Questions Is there a supported way to install a macOS guest onto an external USB disk and start the VM from it? Is there a sandbox-compatible way to get a VZDiskBlockDeviceStorageDeviceAttachment for an external disk, for example after user consent, similar to how AccessoryAccess grants USB devices? If neither is possible today, is support for this planned, or is there a recommended alternative? Thank you for any guidance.
Replies
5
Boosts
0
Views
110
Activity
2w
Broken Private Relay and Black Screen Issues with 26.6.2 and 27.0 Virtual Machines
There have been 2 serious regressions in the hypervisor framework since developer beta 6 of macOS 27 that have continued into the final release, and the first beta of 27.2 The first is that since developer beta 6 of macOS 27, virtual machines that have an Apple ID with iCloud+ signed in fail to route traffic in Safari through iCloud Private Relay despite it being on. Parallels, UTM, VirtualBuddy have all been tested and the issue applies to all of them, exposing the host machine's IP address. I have reported the issue since I discovered it and there hasn't been any communication that Apple even knows its an issue to my open report in Feedback Assistant. The second issue is a newer one, and it affects macOS 26.6.2 and earlier virtual machines. Attempting to install 26.7 through the built-in software update causes the virtual machine to black screen upon reboot during the installation. Forcing the machine off and back on causes the virtual machine to revert back to macOS 26.6.2. There has been no available IPSW file to test if a clean install of 26.7 in a virtual machine is a viable workaround, or to see if there is a bug in the updating mechanism or bug in the 26.7 release itself in virtual machines. The Parallels Desktop forum is beginning to get reports from users of that software of the same black screen issue trying to update their own 26.6.2 VMs to 26.7. These issues have also not been corrected in either 27.2 Beta 1 nor 26.7.1 Has anyone found a workaround to either of these 2 issues, or submitted similar reports and got any kind of response from Apple? The feedback reports about these issues are FB24828992 and FB24791716
Replies
10
Boosts
1
Views
1.1k
Activity
2w
macOS guest freezes after update reboot on M4 host with Virtualization.framework
macOS guest (Virtualization.framework) freezes with all vCPUs halted right after a macOS update reboot - 3/3 on a macOS 26.7.1 (25G309) M4 host, seen with both UTM and Parallels Summary On a macOS 26.7.1 (25G309, beta/seed build) host with an Apple M4, every macOS guest that runs an in-place macOS update freezes at the same point: the in-OS phase of the update completes and reports success, the guest requests a reboot, records a shutdown stall 9 seconds later, reboots twice, shows the update progress screen for about a minute, and then stops. All four vCPUs enter WFI and never wake, paravirtualized graphics stops submitting, no I/O is pending on the host side, and no host service logs an error. The VM never recovers and has to be killed. Reproduced 3 out of 3 times, under two different front-ends (UTM and Parallels Desktop) and two guest versions (15.7.x and 26.6.2). Environment Host: iMac (Mac16,3), Apple M4, 16 GB RAM, macOS 26.7.1 build 25G309 (seed channel), installed the evening before the first failure. Primary guest: macOS 15.7.9 (24G830), hardware model VirtualMac2,1, 4 vCPUs, 6 GB RAM, 90 GB raw disk image (virtio-blk) stored on an external USB SSD. Networking bridged to the built-in Ethernet port. Devices enabled: memory balloon, audio, entropy, clipboard sharing; display 1920x1200 with dynamic resolution. Front-end for the primary case: UTM [version], Apple Virtualization backend. Guest was the only VM running, cold-booted, window open. Update being applied: MSU_UPDATE_24H23_patch_15.8_minor (15.7.9 -> 15.8). Other cases: a macOS 26.6.2 guest under UTM; a macOS 15.7.7 -> 15.8 guest under Parallels Desktop 26.4.2 (57518). Steps to reproduce Cold-boot a macOS 15.7.9 guest under Virtualization.framework, as the only VM on the host. In the guest: System Settings > Software Update > install macOS 15.8. Let it reboot. Expected The guest installs the update and boots into 15.8. Actual — timeline of the primary case (R = the moment Software Update requested the reboot; absolute timestamps are in the attached logs) R-23 min to R-5 min: UpdateBrainService prepares the update inside the guest, writing about 25 GB (two "disk writes" resource reports: 16.5 GB then 8.5 GB). No errors. R-1:56: post-logout install configured; disk space check passes (5.7 GB required, 40.7 GB free). R-1:44: "SUOSUPostLogoutInstallOperation: Applying MSU update". R: "Applied MSU update"; FileVault stash committed ("kAppleFDEKeyStore_commitStash success"); "Rebooting (success = 1, displayAsleep = 0, shutdown = 0)". This is the last line the guest ever writes to install.log. R+9 s: the guest writes a shutdown_stall diagnostic report. R+10 s: host sees ParavirtualizedGraphics "Device reset" / "PGDisplayNub[0]: Destroyed" (reboot #1). R+1:20: second device reset (reboot #2), 70 s after the first. On the host, the vmnet interface is torn down and recreated with no error, the AppleVirtualPlatformIdentity service completes boot attestation with no error, and the guest's graphics driver renegotiates ("Guest requested binary version: 209"). R+1:38: host logs "PGDisplay[0]: Change display mode to 3606x2254" — the guest is on the update progress screen. R+1:41 to R+2:25: the guest's six PGFifoThreads go idle one at a time. The progress bar stops partway. No further activity of any kind. R+11:35: spindump of the VM host process (com.apple.Virtualization.VirtualMachine): 0.042 s of CPU over a 5 s sample all four com.apple.virtualization.thread.cpu-N threads in Hv::Vcpu::run() -> HvCore::Hypervisor::VcpuStateManager::wait_for_interrupt() -> __psynch_cvwait cpu-0/cpu-1 wake on a ~20 ms timer tick and return to WFI; cpu-2/cpu-3 had not run for seconds no thread in any file read, write or fsync (no host I/O outstanding) PGFifoThreads last ran 550–614 s earlier process state Ss (sleeping), not U Host kernel log for the window: no USB, APFS, I/O error, timeout or reset entries. No hardware video decoder (AppleAVD) errors. The VM was left for over an hour with no change, then killed. Second case (same host, same day, UTM, guest macOS 26.6.2) Identical signature: two graphics device resets 69 s apart, display mode set 3 s after the second one, last graphics activity about a second later, then all vCPUs idle in WFI for ~6.5 hours until the VM was killed. Third case (same host, same day, Parallels Desktop 26.4.2, guest 15.7.7 -> 15.8) The guest was suspended in the middle of its update and resumed later. On resume ("-[_PGDevice willResumeWithSuspendState:error:]: Begin resume", preceded by "[VirtualMachineParameterBuilder] Failed to get auxiliary file identifier"), paravirtualized graphics never came back — its FIFO threads ran once and never again — and the guest's vCPUs sat in WFI. This may be a separate save/restore defect, but the end state is the same. What I believe is ruled out The in-OS phase of the update: it completed and reported success. Guest kernel panic: vCPUs are halted, not spinning, and there is no panic report on the guest's data volume. Disk space: 40.7 GB free in the guest at install time. Host storage stall: no uninterruptible wait, no I/O frames in the spindump, no kernel storage errors. Host hardware video decoder: no AppleAVD errors in the primary case. Host services: vmnet and AppleVirtualPlatformIdentity completed normally seconds before the hang. Guest memory: 6 GB allocated. Not yet isolated The VM images live on an external USB SSD; not yet reproduced from internal storage. The memory balloon, audio and clipboard-sharing devices were enabled; not yet reproduced with them disabled. A third-party VPN client was running on the host (guest networking is bridged, so guest traffic bypasses the host tunnel, but host firewall rules could still affect bridged frames). I don't have a confirmed-good in-place guest update on this machine from before 26.7.1, so I can't state with certainty that this is a regression. Frequency 3 of 3 attempts on this host. Attachments / available on request spindumps of the hung VM host process (primary case and second case) host unified-log excerpts for both hang windows the guest's full install.log the guest's shutdown_stall report and the two UpdateBrainService disk-writes reports sysdiagnose captured while hung, if obtained Has anyone seen macOS guests stop at this point on the 26.7.x seeds? If you can reproduce, your host build, hypervisor, and whether the VM image is on internal or external storage would be useful to compare.
Replies
11
Boosts
3
Views
1k
Activity
3w
macOS 15.8.1 update installs mBoot-20457.1.29 in Virtualization.framework VMs, and the guest can then use only 1.75 GB of RAM
Summary We use Virtualization.framework to run macOS guests on Apple silicon. When the guest is updated from macOS 15.6.1 to 15.8.1 inside the VM, the update writes a new boot loader, mBoot-20457.1.29, into the VM's auxiliary storage. After the update, the guest kernel can use only about 1.75 GB of the configured memory. The kernel wires the rest as VM_KERN_COUNT_BOOT_STOLEN. The guest swaps all the time, and builds become 7 to 18 times slower. The fault stays after a cold boot. The guest boot-args value is empty. Environment Host: macOS 26.7.2 (25G320), Apple M3 Pro, 36 GB Guest before the update: macOS 15.6.1 (24G90), installed from the IPSW Guest after the update: macOS 15.8.1 (24H32), installed with softwareupdate inside the guest VM configuration: VZMacOSBootLoader with the default ROM, VZMacPlatformConfiguration, VZMacAuxiliaryStorage, memorySize = 15032385536 (14 GiB), CPUCount = 6 A customer sees the same fault on macOS 26.6.2 with an M2 Pro host. Steps to reproduce Create a macOS 15.6.1 VM from the IPSW. Set memory to 14 GiB. Boot the guest and confirm the RAM. vm_stat accounts for about 14 GiB. In the guest, run: sudo softwareupdate --install "macOS Sequoia 15.8.1-24H32" --restart --agree-to-license --user <owner> --stdinpass After the guest restarts, run sudo zprint | grep BOOT_STOLEN and vm_stat. Shut down the VM, start it again, and do step 4 again. Expected result The guest can use about 14 GiB of RAM, as it could before the update. Actual result 15.6.1, before the update 15.8.1, after the update and after a cold boot hw.memsize 15032385536 15032385536 RAM accounted for by vm_stat (free + active + inactive + speculative + wired + compressor) about 13.99 GiB about 1.75 GiB VM_KERN_COUNT_BOOT_STOLEN not measured 12,845,072 KB (about 12.25 GiB) Swap activity Swapins 0, Swapouts 0 Swapins 225,835, Swapouts 267,316 nvram boot-args empty empty Auxiliary storage contents after the update The auxiliary storage has two boot loader slots. Each slot has a 16-byte HUFA header: magic, version, upgrade count, and slot offset from 0x4000. Header offset Upgrade count Slot offset Boot loader 0x4000 1 0x24000 iBoot-11881.140.96 (the original 15.6.1 boot loader) 0x5000 2 0x224000 mBoot-20457.1.29 (written by the 15.8.1 update) The VM boots the slot with the higher count, which is mBoot-20457.1.29. Workaround test (customer) The customer worked on a copy of an affected VM. They copied the iBoot-11881.140.96 slot over the active mBoot-20457.1.29 slot in the auxiliary storage. macOS 15.8.1 then booted with about 14 GB of usable RAM, and the RAM stayed correct after cold boots. Their results: Extraction and validation of nine Xcode versions: 9 to 10 minutes (it was 68 to 102 minutes). Xcode 26.1.1 simulator installation and cache preparation: under 7 minutes (it was more than 2 hours). This workaround changes Apple's signed firmware by hand... Not really a good idea. Related report A public report describes the same fault with UTM and the same boot loader version. It also says that the kernel computes the stolen value from the memSizeActual and memSize boot parameters that the boot loader supplies. The author filed FB24992831 (https://wadetregaskis.com/the-macos-sequoia-15-8-updater-stole-my-ram/) Questions Is this a known fault in mBoot-20457.1.29? Will a later update fix it? Is there a supported way to make a VM boot a specific boot loader slot? Or a supported way to roll back the boot loader in VZMacAuxiliaryStorage? Is there a configuration on the host or in the guest that makes mBoot pass the full memory size? We'd prefer to not make nvram read only if the new mBoot is absolutely needed for some reason.
Replies
3
Boosts
1
Views
312
Activity
3w
Supported offline handoff boundary for a macOS VM disk image and auxiliary storage
We need a supported checkpoint after macOS installation before an independent process verifies and later boots the VM. We distinguish installer success, actual VM stopped state, application queue drain, reference release, and file synchronization. After installation completes without error and the same VM is stopped, can Virtualization still submit writes to the disk image or auxiliary storage? What documented barrier ends them? Does releasing all application references and autorelease scopes and draining the VM queue end storage writes by all SDK objects, internal tasks, and services? After the producer process exits and is waited for, can services, transferred handles, or pending framework buffers still modify either file? Is there a supported joint durability/consistency boundary for disk and auxiliary storage beyond the disk image Full guest-flush guarantee? What handoff sequence and platform versions does Apple support for sequential installation, offline verification, and boot processes? We are asking for the contract, not proposing forced stop, delayed hashing, or an undocumented recovery procedure.
Replies
3
Boosts
0
Views
127
Activity
3w
VZVirtualMachine behavior when its owning process unexpectedly terminates
I'm looking for clarification on the supported lifecycle semantics of VZVirtualMachine on macOS. Suppose process A creates and starts a VZVirtualMachine. While that VM is running, process A unexpectedly terminates or crashes. What is the supported behavior of that same original running VM instance? Is the VM automatically stopped or terminated when its owning process exits or crashes? If the VM can continue running, is there a supported API for a newly started process B to reconnect to or obtain control of that same already-running VM instance? If process B can reacquire the original VM, can it then force noncooperative termination of that instance, equivalent to using stop(completionHandler:) while the original controlling object still exists? Is there a supported way for process B to determine authoritatively that the original VM has stopped after process A is gone? Are there relevant differences between normal process exit, an unexpected crash, and forced process termination? I'm specifically asking about the same original running VM instance. Creating a new VZVirtualMachine with the same configuration, or restoring previously saved machine state, would not answer the question. If the owner-loss behavior is intentionally unspecified, or if there is no supported mechanism for another process to reacquire the same running VM, that would also answer the question. I'm interested in the supported Virtualization.framework contract rather than experimentally observed behavior. Environment: macOS 26.5.1 on Apple Silicon.
Replies
3
Boosts
0
Views
408
Activity
3w
Supported backing-file release semantics after stopping a Virtualization VM
I am designing a macOS Virtualization application using RAW disk images, an EFI variable store and host directory sharing. I need to distinguish stopping guest execution from releasing host backing-file access. I inspected the public declarations for VZDiskImageStorageDeviceAttachment, VZEFIVariableStore, VZSharedDirectory and VZVirtualMachine in the macOS27 SDK. The stop completion describes a stopped VM or an error; the backing types expose URL-based initialization. I could not identify a final backing-release event in those declarations. I would appreciate the supported contract, including any differences on macOS26 and macOS27. For each of the three URL-backed surfaces: When are paths resolved and backing references opened? Can the framework reopen a path or lazily access shared descendants later? Does successful stop completion guarantee backing references are released and required writes persisted, or only that guest execution stopped? What object-reference release and queue/callback ordering is required before the application may safely reuse, replace or remove the backing objects? Can Virtualization helper processes retain backing access after the application's worker process exits? Is there a supported observable event covering those references? If no such release event is documented, what supported architecture should retain or quarantine these resources until release can be established? I am not using physical block devices and am not generalizing their documented file-handle retention to URL-backed images, EFI stores or directory shares. Please link the public contract or clarify which behaviors are unspecified.
Replies
3
Boosts
0
Views
155
Activity
3w
AccessoryAccess in a sandboxed helper: IOUSBHostInterface fails without a temporary-exception entitlement. Is there a supported way?
Hello, We are building USB passthrough for virtual machines on macOS 27 and would appreciate guidance from the AccessoryAccess / IOUSBHost / App Sandbox teams on the supported way to open a USB accessory's interfaces from a sandboxed helper process. WHAT WE ARE BUILDING Our app is a sandboxed macOS app that runs virtual machines. For guests that use Virtualization.framework, USB passthrough already works through VZUSBPassthroughDevice, using the AAUSBAccessory we get from AccessoryAccess. For a second kind of guest we use our own virtual machine monitor, built on Hypervisor.framework. Each VM runs in its own helper process, a nested app bundle in Contents/Helpers that the main app launches with Process. The helper's entitlements are: com.apple.security.app-sandbox = true com.apple.security.inherit = true com.apple.security.hypervisor = true com.apple.vm.networking = true The main app's entitlements include: com.apple.security.app-sandbox = true com.apple.developer.accessory-access.usb = true com.apple.security.device.usb = true (plus hypervisor, networking, files, application groups) The helper emulates an xHCI controller for the guest and forwards the guest's USB transfers to the real device. We use the same AccessoryAccess hand-off the documentation describes for worker processes: The main app registers an AAUSBAccessoryListener with AAUSBAccessoryManager and shows the consent UI. Nothing changed here from the Virtualization.framework path. When the user attaches a device to a VM, the main app calls -[AAUSBAccessory createXPCRepresentation]. We send the bytes of that xpc_data object to the helper over our existing control channel. We use the bytes rather than an XPC connection because the representation contains only data, no Mach ports or file descriptors. The helper rebuilds the accessory with -[AAUSBAccessory initWithXPCRepresentation:] and calls -openWithServiceQueue:completionHandler:. This succeeds and returns an IOUSBHostDevice. In the IORegistry the device then has an AppleUSBHostFrameworkDeviceClient created by the helper. When the guest sends SET_CONFIGURATION, the helper calls -[IOUSBHostDevice configureWithValue:matchInterfaces:NO error:], which succeeds. It then finds the device's IOUSBHostInterface children in the IORegistry and opens each one with -[IOUSBHostInterface initWithIOService:options:queue:error:interestHandler:]. Bulk and interrupt transfers then go through IOUSBHostPipe (copyPipeWithAddress:, enqueueIORequestWithData:...). THE PROBLEM Steps 1-3 work, and so do control requests on the default pipe. The guest enumerates the device and loads its driver. Step 4 fails: every interface fails to open with Failed to create IOUSBHostInterface. (kIOReturnInternalError, 0xe00002c9) With no interfaces open there are no pipes, so the guest's driver fails as soon as it moves data. A USB flash drive reported "This device cannot start (Code 10)", and a USB Ethernet adapter reported "Network cable unplugged". What we found: An unsandboxed command-line tool, run while the helper held the device through AccessoryAccess, opened the same IOUSBHostInterface with no error. The IORegistry then showed an AppleUSBHostFrameworkInterfaceClient under the interface, created by that tool. So the kernel and the accessory state allow the open; the App Sandbox blocks it. /System/Library/Sandbox/Profiles/application.sb contains: (when (entitlement "com.apple.security.device.usb") (allow iokit-open-user-client (iokit-user-client-class "IOUSBDeviceUserClientV2" "IOUSBInterfaceUserClientV3"))) com.apple.security.device.usb (which the app has) therefore covers only the legacy IOUSBLib user clients, not AppleUSBHostFrameworkInterfaceClient, the class IOUSBHostInterface uses. We found no rule for AppleUSBHostFrameworkDeviceClient either. We assume AccessoryAccess authorizes the device client when the accessory is opened, but nothing does the same for the accessory's interfaces. Adding com.apple.security.device.usb to the helper itself doesn't work: the helper is killed at launch (exit status 5). We understand an inherited-sandbox helper may carry only a limited set of entitlements. HOW WE WORKED AROUND IT We added this entitlement to the main app. The helper inherits the app's sandbox, so it gets the exception too: <key>com.apple.security.temporary-exception.iokit-user-client-class</key> <array> <string>AppleUSBHostFrameworkInterfaceClient</string> </array> With it, the helper opens the interfaces and passthrough works: the flash drive mounts in the guest, and the Ethernet adapter gets a DHCP address and passes traffic. We would rather not ship a temporary-exception entitlement, especially since we also distribute through the Mac App Store. QUESTIONS Is opening an accessory's interfaces with IOUSBHostInterface the intended way to do I/O on a device obtained through AccessoryAccess? If so, what is the supported way to authorize AppleUSBHostFrameworkInterfaceClient for a sandboxed process, or a helper inheriting its sandbox, without a temporary exception? Does AccessoryAccess grant access to an accessory's interfaces as well as the IOUSBHostDevice? For example, should a listener registered with interface matching criteria (AAUSBAccessoryMatchingCriteria initWithDeviceMatchingDictionary: interfaceMatchingDictionaries:...) be able to open those interfaces? Or is there an API we missed that returns IOUSBHostInterface or IOUSBHostPipe objects for an opened accessory? Is passing the accessory to a helper as the bytes of -createXPCRepresentation, instead of through an XPC connection, supported? The documentation describes the representation as something sent "via XPC". Our helpers are plain child processes, not XPC services. Should we use the legacy IOUSBLib interface API instead (IOUSBInterfaceInterface through IOCreatePlugInInterfaceForService, client class IOUSBInterfaceUserClientV3, which com.apple.security.device.usb allows)? Is that supported for a device AccessoryAccess has opened for exclusive access, and is it acceptable to mix IOUSBHostDevice from AccessoryAccess with IOUSBLib interface objects for the same device? Would the temporary-exception entitlement above be accepted in App Store review for this case, or should we file a Feedback Assistant request for a dedicated entitlement or an API change? Environment: macOS 27 (Golden Gate), Apple silicon Xcode with the macOS 27 SDK App and helper are signed with the same team; the helper is a nested app bundle in Contents/Helpers using com.apple.security.inherit Tested devices: a USB 3 flash drive (mass storage, Bulk-Only Transport) and a USB 2.5GbE Ethernet adapter (Realtek, vendor 0x0BDA, product 0x8156) We can provide a minimal sample project that reproduces the IOUSBHostInterface failure, plus IORegistry dumps. Thank you for your time.
Replies
8
Boosts
0
Views
552
Activity
3w
How can a free Personal Team obtain the cross-architecture-support-unmanaged entitlement on macOS?
I’m developing an ARM64-native Wine + FEX compatibility runtime on Apple Silicon, without relying on Rosetta 2. According to the August 2026 Wine-devel discussion, the following entitlement is intended to be available to free developer accounts: com.apple.developer.cross-architecture-support-unmanaged However, I have encountered the following issues: My Xcode Personal Team does not offer a “Cross-architecture Compatibility Framework” capability. Certificates, Identifiers & Profiles is inaccessible to my free developer account. I cannot obtain a provisioning profile authorizing this entitlement. I contacted Apple Developer Support. They explained that entitlement requests generally require an Apple Developer Program Account Holder, but were unable to confirm whether this particular entitlement is currently requestable or where to request it. Could an Apple engineer clarify: Is the unmanaged entitlement currently available to free Personal Teams? What is the official App ID, provisioning profile, and code-signing procedure? Does this entitlement require additional approval from Apple? If it is unavailable, is there an officially supported alternative for development of an ARM64-native Wine loader? My goal is to use the native macOS cross-architecture features while keeping SIP and other security protections enabled. Relevant Wine-devel discussion: https://list\.winehq\.org/hyperkitty/list/wine\-devel%40list\.winehq\.org/thread/CKG5CEN2BE5VRXZ7O7NX4YUSBH3247WH/ Thank you.
Replies
3
Boosts
0
Views
354
Activity
Oct ’26