JUST ENDED
|

Virtualization Q&A

Connect with Apple engineers in the Virtualization Q&A on the Apple Developer Forums.

Post

Replies

Boosts

Views

Activity

`mobileassetd` network activity
Is it possible to wait for mobileassetd to finish downloading from both macOS and within an iOS Simulator. We create a VM but as we boot them up regularly for CI jobs, if the VM on creation hadn't finished downloading a bunch of things we see network activity. Just wondering if a way exists to inspect the state of mobileassetd so we can wait for it to finish downloading stuff before completing the VM image build.
3
0
56
2h
Scalable macOS CI/CD infrastructure under the 2-VM SLA limit on high-end hardware
We are looking to scale up our automated testing infrastructure for macOS development. Ideally, we want to create a large-scale testing farm capable of running parallel integration tests across multiple OS versions and configurations. However, we are running into a major roadblock with the Software License Agreement (SLA) limitation, which restricts the concurrent execution of macOS within virtualized environments to a maximum of two (2) instances per physical host. This restriction creates a massive bottleneck for high-end hardware. Investing in powerful machines like the Mac Studio or Mac Pro feels entirely inefficient for this use case; their massive core counts and memory capacities are effectively wasted if the host is legally throttled to just two concurrent VMs. Given this friction, we have a few questions for the community and any Apple engineers tuning in: are there any known plans, official updates, or historical precedents suggesting Apple might revise or remove this 2-VM limit for enterprise testing workflows? Any insights, policy updates, or architectural recommendations on building large-scale, compliant macOS test farms without underutilizing high-end hardware would be greatly appreciated. Thank you!
0
3
33
2h
Enforced segregation between VM and Host
VM are quite interesting options in a BYOD environment but im not able to enforce a proper segregation between VM and Host. Examples: If the VM is MDM enrolled the Host can access the VM Disk quite easily If the Host is managed a VM can be used to bypass Network security Is a mdm enrolled VM a scenario you have on your roadmap?
1
0
41
3h
Virtualization and Swift 6
There are some async/await methods in Virtualization; however there's also the ability to specific DispatchQueue. What's the guidance on using these all safely? What are use cases for specifying specific DispatchQueues?
2
0
63
3h
Using Metal, IOSurface and Virtualization.framework
For a 3D workload going through Virtualization.framework's graphics device, what's the supported/expected path for the guest to drive host-side Metal rendering, and what are the known performance sharp edges? Is zero-copy IOSurface sharing between host and guest a sanctioned pattern? What are the best practices and limits for high-throughput texture handoff across the VM boundary? We translate a foreign 3D command stream into Metal on the host. Any guidance on command-buffer batching, synchronization, or present/vsync alignment to keep latency low?
1
0
22
3h
Virtualization.framework: VM slot counter not decremented after macOS guest shutdown (VZErrorVirtualMachineLimitExceeded)
When running a macOS virtual machine using Virtualization.framework, I am encountering a reproducible issue where the kernel’s internal VM slot counter (hv_apple_isa_vm_quota) is not decremented after a guest-initiated shutdown. This leads to subsequent VM launches failing with VZErrorVirtualMachineLimitExceeded, even though no active VMs appear to be running. Steps to Reproduce: Create a valid VZVirtualMachineConfiguration for a macOS guest Initialize and start a VZVirtualMachine instance Inside the guest macOS, perform a normal shutdown (Apple menu → Shut Down) Wait until VZVirtualMachine.state becomes .stopped Attempt to start the same VZVirtualMachine instance again Expected Behavior: The VM should restart successfully.
The kernel should release the VM slot once the guest shuts down, allowing a new VM instance to start without requiring any host-side intervention. Actual Behavior: start() fails with: Domain: VZErrorDomain Code: 6 (VZErrorVirtualMachineLimitExceeded) Description: “The number of virtual machines exceeds the limit. The maximum supported number of active virtual machines has been reached.” Despite the VM reporting .stopped, the system continues to behave as if a slot is still allocated. Workarounds Tested: The following approaches did not resolve the issue: Releasing and recreating the VZVirtualMachine instance Introducing delays (5s, 30s, 60s) before restarting Terminating all processes related to Virtualization.framework The only reliable recovery is a full macOS host reboot, which resets the VM quota state. Environment: macOS 26.5 (Tahoe) Apple Silicon: M4 Max Virtualization.framework (system-provided) Impact: This issue makes reliable VM lifecycle management difficult for applications relying on Virtualization.framework (e.g., UTM and similar tools). In automated environments (CI/CD, testing pipelines), it can cause persistent VM launch failures and require full host reboots, interrupting all workloads. Suspected Issue: It appears the kernel VM slot counter (hv_apple_isa_vm_quota) is not consistently decremented when a VM exits via guest-initiated shutdown, despite the VZVirtualMachine transitioning to .stopped. This suggests a race condition or missing cleanup path in the shutdown lifecycle handling. Request: Could you confirm whether this is a known issue or expected behavior, and whether there is a recommended API-level workaround to ensure VM slot cleanup after guest shutdown?
2
0
89
3h
Rosetta on Linux VMs
This is an important part of Mac's utility to developers who are integrating applications for the cloud, with software that only runs on linux AMD64. Is Rosetta for linux going away too, leaving us only slow emulation?
2
1
60
4h
Using Metal, IOSurface and Virtualization.framework
For a 3D workload going through Virtualization.framework's graphics device, what's the supported/expected path for the guest to drive host-side Metal rendering, and what are the known performance sharp edges? Is zero-copy IOSurface sharing between host and guest a sanctioned pattern? What are the best practices and limits for high-throughput texture handoff across the VM boundary? We translate a foreign 3D command stream into Metal on the host. Any guidance on command-buffer batching, synchronization, or present/vsync alignment to keep latency low?
1
2
69
4h
`mobileassetd` network activity
Is it possible to wait for mobileassetd to finish downloading from both macOS and within an iOS Simulator. We create a VM but as we boot them up regularly for CI jobs, if the VM on creation hadn't finished downloading a bunch of things we see network activity. Just wondering if a way exists to inspect the state of mobileassetd so we can wait for it to finish downloading stuff before completing the VM image build.
Replies
3
Boosts
0
Views
56
Activity
2h
Scalable macOS CI/CD infrastructure under the 2-VM SLA limit on high-end hardware
We are looking to scale up our automated testing infrastructure for macOS development. Ideally, we want to create a large-scale testing farm capable of running parallel integration tests across multiple OS versions and configurations. However, we are running into a major roadblock with the Software License Agreement (SLA) limitation, which restricts the concurrent execution of macOS within virtualized environments to a maximum of two (2) instances per physical host. This restriction creates a massive bottleneck for high-end hardware. Investing in powerful machines like the Mac Studio or Mac Pro feels entirely inefficient for this use case; their massive core counts and memory capacities are effectively wasted if the host is legally throttled to just two concurrent VMs. Given this friction, we have a few questions for the community and any Apple engineers tuning in: are there any known plans, official updates, or historical precedents suggesting Apple might revise or remove this 2-VM limit for enterprise testing workflows? Any insights, policy updates, or architectural recommendations on building large-scale, compliant macOS test farms without underutilizing high-end hardware would be greatly appreciated. Thank you!
Replies
0
Boosts
3
Views
33
Activity
2h
Restore Images History and Signing
Is there a way to retrieve restore images of previous versions of macOS and additionally checking whether a restore image is valid (i.e. signed) without attempting to install it?
Replies
1
Boosts
0
Views
41
Activity
3h
Virtual Machine observability
How do I run observability with virtual machines - internally, externally or both?
Replies
2
Boosts
0
Views
37
Activity
3h
Virtual Machine Boot Time
Do you have any tips for increasing the speed of a Virtual Machines boot time?
Replies
4
Boosts
0
Views
76
Activity
3h
Enforced segregation between VM and Host
VM are quite interesting options in a BYOD environment but im not able to enforce a proper segregation between VM and Host. Examples: If the VM is MDM enrolled the Host can access the VM Disk quite easily If the Host is managed a VM can be used to bypass Network security Is a mdm enrolled VM a scenario you have on your roadmap?
Replies
1
Boosts
0
Views
41
Activity
3h
Virtualization and Swift 6
There are some async/await methods in Virtualization; however there's also the ability to specific DispatchQueue. What's the guidance on using these all safely? What are use cases for specifying specific DispatchQueues?
Replies
2
Boosts
0
Views
63
Activity
3h
MacOS 27 Beta on MacOS 26 system
Can a MacOS 27 beta VM run on MacOS 26 system?
Replies
3
Boosts
0
Views
62
Activity
3h
Why does entering recovery mode options in a 26/27 VM take ~1m?
For some strange reason entering recovery mode options in a 26/27 VM takes 1m, compared to ~10s on < 26 VMs. Any idea where this delay is coming from? I do not observe the same delay on real HW for 26/27. Thanks! FB22085236
Replies
1
Boosts
0
Views
29
Activity
3h
USB device access
Will we be able to access USB devices without private APIs?
Replies
2
Boosts
0
Views
53
Activity
3h
Using Metal, IOSurface and Virtualization.framework
For a 3D workload going through Virtualization.framework's graphics device, what's the supported/expected path for the guest to drive host-side Metal rendering, and what are the known performance sharp edges? Is zero-copy IOSurface sharing between host and guest a sanctioned pattern? What are the best practices and limits for high-throughput texture handoff across the VM boundary? We translate a foreign 3D command stream into Metal on the host. Any guidance on command-buffer batching, synchronization, or present/vsync alignment to keep latency low?
Replies
1
Boosts
0
Views
22
Activity
3h
Virtualization.framework: VM slot counter not decremented after macOS guest shutdown (VZErrorVirtualMachineLimitExceeded)
When running a macOS virtual machine using Virtualization.framework, I am encountering a reproducible issue where the kernel’s internal VM slot counter (hv_apple_isa_vm_quota) is not decremented after a guest-initiated shutdown. This leads to subsequent VM launches failing with VZErrorVirtualMachineLimitExceeded, even though no active VMs appear to be running. Steps to Reproduce: Create a valid VZVirtualMachineConfiguration for a macOS guest Initialize and start a VZVirtualMachine instance Inside the guest macOS, perform a normal shutdown (Apple menu → Shut Down) Wait until VZVirtualMachine.state becomes .stopped Attempt to start the same VZVirtualMachine instance again Expected Behavior: The VM should restart successfully.
The kernel should release the VM slot once the guest shuts down, allowing a new VM instance to start without requiring any host-side intervention. Actual Behavior: start() fails with: Domain: VZErrorDomain Code: 6 (VZErrorVirtualMachineLimitExceeded) Description: “The number of virtual machines exceeds the limit. The maximum supported number of active virtual machines has been reached.” Despite the VM reporting .stopped, the system continues to behave as if a slot is still allocated. Workarounds Tested: The following approaches did not resolve the issue: Releasing and recreating the VZVirtualMachine instance Introducing delays (5s, 30s, 60s) before restarting Terminating all processes related to Virtualization.framework The only reliable recovery is a full macOS host reboot, which resets the VM quota state. Environment: macOS 26.5 (Tahoe) Apple Silicon: M4 Max Virtualization.framework (system-provided) Impact: This issue makes reliable VM lifecycle management difficult for applications relying on Virtualization.framework (e.g., UTM and similar tools). In automated environments (CI/CD, testing pipelines), it can cause persistent VM launch failures and require full host reboots, interrupting all workloads. Suspected Issue: It appears the kernel VM slot counter (hv_apple_isa_vm_quota) is not consistently decremented when a VM exits via guest-initiated shutdown, despite the VZVirtualMachine transitioning to .stopped. This suggests a race condition or missing cleanup path in the shutdown lifecycle handling. Request: Could you confirm whether this is a known issue or expected behavior, and whether there is a recommended API-level workaround to ensure VM slot cleanup after guest shutdown?
Replies
2
Boosts
0
Views
89
Activity
3h
Track Virtual Machines
Besides keeping a reference to all virtual machine objects, is there a way to track the state of virtual machines.
Replies
3
Boosts
1
Views
72
Activity
3h
Rosetta on Linux VMs
This is an important part of Mac's utility to developers who are integrating applications for the cloud, with software that only runs on linux AMD64. Is Rosetta for linux going away too, leaving us only slow emulation?
Replies
2
Boosts
1
Views
60
Activity
4h
Using Metal, IOSurface and Virtualization.framework
For a 3D workload going through Virtualization.framework's graphics device, what's the supported/expected path for the guest to drive host-side Metal rendering, and what are the known performance sharp edges? Is zero-copy IOSurface sharing between host and guest a sanctioned pattern? What are the best practices and limits for high-throughput texture handoff across the VM boundary? We translate a foreign 3D command stream into Metal on the host. Any guidance on command-buffer batching, synchronization, or present/vsync alignment to keep latency low?
Replies
1
Boosts
2
Views
69
Activity
4h
Does virtualizing macOS 27 require a macOS 27 host?
Trying to virtualize macOS 27 on a 26.6 host failed at 77% install progress, even with Xcode 27 beta installed. But worked fine on a macOS 27 host. Are there any tricks to use a 26 host? Thanks!
Replies
1
Boosts
4
Views
157
Activity
4h