Virtualization

RSS for tag

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

Posts under Virtualization tag

63 Posts

Post

Replies

Boosts

Views

Activity

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
42
5d
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
118
5d
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
94
5d
Any way to speed up saveMachineStateTo and restoreMachineStateFrom
I'm trying to implement a VM snapshot & resume feature in a VM manager app. For some reason, both saveMachineStateTo and restoreMachineStateFrom to save machine memory to a file and restore saved vzstate/memory back for a VM is taking a lot of time on my system (XCode 26.3, macOS 15.7.7). The test VM has only sizes in the range of 4-8GB RAM. Any tips or tricky to speed it up, for example, do like a CoW on the RAM so VM can be briefly paused and quickly resumed after while streaming the RAM in background? Or, any other ways for example for RAM compression, dirty-page tracking, or live/background RAM streaming to a file? Or, to instrument and dig deeper, what's taking time? Thank you.
2
0
123
1w
Limitations for virtiofs and com.apple.virtio-fs.automount and Virtualization.framework
We're seeing limitations in host -> macOS VM changes syncing. Were using Anka, but we've also tried others. We're actually doing the exact implementation that others (the ones we found that are open source) do. Here is a breakdown of what's supported: Operation Direction Supported Notes Create new file/folder Host → Guest ✅ Yes New paths appear in the guest Create new file/folder Guest → Host ✅ Yes New paths appear on the host Read existing contents Host → Guest ✅ Yes Contents present at mount time are visible Modify file in place Guest → Host ✅ Yes Guest edits are written through to the host Modify file in place Host → Guest ❌ No Guest keeps stale contents for already-accessed files (macOS virtiofs caching) Delete file/folder Guest → Host ✅ Yes Removal is reflected on the host Delete file/folder Host → Guest ❌ No Guest still sees the path after the host deletes it (cached) Replace via temp + rename() (atomic) Host → Guest ✅ Yes New inode/dentry; recommended way to update files from the host We're requesting a way to disable caching and/or allow the unsupported actions in the table to be supported. https://feedbackassistant.apple.com/feedback/22905515
1
0
105
1w
IPSW for 15.7.7 missing
Hi, we're only seeing 15.6.1 IPSW available for VMs. Where can we find latest and secure versions of macOS IPSW on https://updates.cdn-apple.com/*/fullrestores/ ? Is there an official list somewhere that Apple provides? We need to be sure we can create the latest 15.7.7 VMs with automation and not rely on inner VM upgrades of MacOS.
3
0
160
2w
Nested virtualization support for macOS guests using VZMacPlatformConfiguration?
Hello, I filed Feedback FB22859649 about nested virtualization for macOS guests and would like to confirm the supported API surface / limitation through Developer Forums as well. We are using Virtualization.framework to run macOS guests on Apple silicon hosts. The use case is isolated macOS VM workspaces for development and AI-agent automation. In those workspaces, developers often need to run container or VM-backed tooling inside the guest, for example Apple Container workflows, Docker/Colima/Lima-style Linux VM workflows, local Kubernetes, CI sandboxes, testcontainers, or local MCP server stacks that expect hardware-assisted virtualization from inside macOS. Environment I used for the Feedback: Apple silicon host: MacBook Air with Apple M4 Host OS: macOS 26.5 build 25F71 Xcode: 26.5, macOS SDK 26.5 Guest type: macOS VM configured through Virtualization.framework with VZMacOSBootLoader and VZMacPlatformConfiguration From the current SDK headers, I see nested virtualization support exposed on VZGenericPlatformConfiguration via nestedVirtualizationSupported and nestedVirtualizationEnabled. VZMacOSBootLoader says a macOS guest must use VZMacPlatformConfiguration, and VZMacPlatformConfiguration does not appear to expose an equivalent nested virtualization property. Could Apple/DTS please confirm the intended support boundary? Is nested virtualization currently supported for macOS guests created with Virtualization.framework on Apple silicon using VZMacPlatformConfiguration? If not, should this be treated as an intentional current limitation of macOS guests / VZMacPlatformConfiguration rather than a missing configuration option? Is there a supported host-side API or validation behavior to detect this limitation before creating or starting the VM? Is there any supported workaround for container workflows inside a macOS guest that require a nested Linux VM or hypervisor, or is the recommended architecture to run those container/VM workloads on the host or in a Linux guest instead? I am not asking for roadmap or ETA. I am trying to document the correct supported behavior and avoid misleading users of macOS VM workspace tools when container or AI-agent workflows fail because the macOS guest cannot run its own virtualization backend. The broader impact is that disposable macOS VM workspaces are a strong isolation boundary for GUI automation, browser/app state, credentials, local files, and agent runtime state. Without a supported nested virtualization path, the GUI side of the workspace can run in a macOS guest, but common container-backed developer workflows have to move outside that workspace. Thank you.
1
0
210
2w
Host-Only Networking and Port Forwarding Support in macOS Virtualization Framework
I’ve developed a virtual machine manager application using the macOS Virtualization framework. The application currently supports both NAT and bridged networking configurations. I’m now looking to implement host-only networking, where the guest VM can communicate with the host but not with external networks. Is this networking mode supported by the Virtualization framework, and if so, what is the recommended approach to set it up? Additionally, I would like to implement port forwarding from the host to the guest (e.g., redirecting traffic from a specific port on the host to a port on the guest). Is there a way to configure port forwarding using the built-in APIs of the Virtualization framework, or would this require a custom networking solution? Any guidance or best practices for implementing these features within the constraints of the framework would be greatly appreciated.
7
0
433
3w
VZVirtualMachineView and rightMouseDown
Hi, I am displaying the running linux ubuntu VM in VzVirtualMachineView. I wouldl like to simulate right click by calling vZVirtualMachineView.rightMouseDown to trigger right click on the guest. I tried it and it does not work. For mac os guests it is working. For linux guests it is not working Any help would be appreciated to fix the issue.
5
0
281
3w
Entitlement com.apple.vm.networking not found and could not be included in profile. This likely is not a valid entitlement and should be removed from your entitlements file
Hi guys, I am building a custom virtualization utility for macOS using the native Virtualization Framework. My goal is to allow local guest virtual machines to run in Bridged Mode (VZBridgedNetworkDeviceAttachment) so they can acquire their own distinct local IP address from my router and expose service ports directly to the local network. When attempting to compile and run my app with the com.apple.vm.networking entitlement, Xcode throws the following error:"Entitlement com.apple.vm.networking not found and could not be included in profile. This likely is not a valid entitlement and should be removed from your entitlements file" I understand that this is a restricted capability that is hidden from the standard Apple Developer Portal by default. I have already reached out via email to Apple Developer Support to request it, but I have not received a definitive answer on the process or exact entitlement string name. For those who have successfully shipped or tested a virtualization app with bridged networking, Is com.apple.vm.networking the correct string name for modern macOS versions, or is there a newer, specific identifier required? What is the actual entitlement that i should see in my developer account? I can't seem to find it in the docs as well. Would it be called "VM Networking" Thanks,
1
0
219
3w
VMs for automated testing vs 2 macOS instance limit
Hello, I'm evaluating possibility to use virtualization to setup on-permise parallel testing system for a product I work on. My compatibility range is wide, i.e. it would cover macOS 12 - 26, so any testcase needs to be executed on at least 5 different OS versions (and introducing any parallization to the test execution would mean I deal with higher number of VMs). As far as I understand, there is a constraint in Apple Software License, that limits number of OS VM installations per one physical system to 2 (section 2.B.(iii)) in case of OS downloaded from the Internet or through App Store. Clearly these days a single high-end Mac hardware could sustain more than 2 VMs running in parallel. The license also mentions it is also possible to be in a volume or maintenance license program and then the terms of this program apply instead. So I wonder how do people normally deal with the above limitation? What is the path I need to follow if I want to be able to run more than "2 additional copies or instances of" macOS on my VMs?
0
0
141
May ’26
Battery passthrough for virtual machines on Apple Silicon?
Ever since virtualization changed when Apple transitioned to their own Apple silicon chips, I’m curious whether there is anyway to make virtual machines read the host battery? Asking this because VMs in general always assuming it’s on AC adapter makes battery drain a lot faster it seems like so I’m curious whether adding it or some workaround to add battery reporting w/ power efficiency is possible to match with VMs is possible on Apple Silicon so users on Apple silicon MacBooks don’t have to worry about huge battery power consumption drain with adding some sort of feature or pass through to make VMs read host battery. Hope this makes sense.
2
0
367
May ’26
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
14
1
2.3k
May ’26
VZVirtualMachine with multiple displays
I see that in the link https://developer.apple.com/documentation/virtualization/vzvirtualmachineconfiguration/graphicsdevices?changes=late_7_8 graphicsDevices accepts and array. So it is possible to have multiple displays for a virtual machine. But when i tried it with multiple displays it does not work. Why do we have it as an array if it does not support multiple displays.? or how to get it work with multiple displays.
1
0
126
May ’26
Windows 11 Support in macOS Virtualization Framework
Hello, According to the official documentation, the macOS Virtualization Framework currently supports only macOS and Linux guest operating systems. I would like to know if there is any way—officially or through a supported workaround—to run Windows 11 as a guest using this framework. Additionally, is there any indication or roadmap suggesting that support for Windows guests might be introduced in a future release, such as in macOS 16? Any insights or official clarification would be greatly appreciated. Thank you.
5
0
347
May ’26
USB device access
Will we be able to access USB devices without private APIs?
Replies
2
Boosts
0
Views
80
Activity
5d
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
42
Activity
5d
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
118
Activity
5d
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
102
Activity
5d
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
85
Activity
5d
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
94
Activity
5d
Any way to speed up saveMachineStateTo and restoreMachineStateFrom
I'm trying to implement a VM snapshot & resume feature in a VM manager app. For some reason, both saveMachineStateTo and restoreMachineStateFrom to save machine memory to a file and restore saved vzstate/memory back for a VM is taking a lot of time on my system (XCode 26.3, macOS 15.7.7). The test VM has only sizes in the range of 4-8GB RAM. Any tips or tricky to speed it up, for example, do like a CoW on the RAM so VM can be briefly paused and quickly resumed after while streaming the RAM in background? Or, any other ways for example for RAM compression, dirty-page tracking, or live/background RAM streaming to a file? Or, to instrument and dig deeper, what's taking time? Thank you.
Replies
2
Boosts
0
Views
123
Activity
1w
Limitations for virtiofs and com.apple.virtio-fs.automount and Virtualization.framework
We're seeing limitations in host -> macOS VM changes syncing. Were using Anka, but we've also tried others. We're actually doing the exact implementation that others (the ones we found that are open source) do. Here is a breakdown of what's supported: Operation Direction Supported Notes Create new file/folder Host → Guest ✅ Yes New paths appear in the guest Create new file/folder Guest → Host ✅ Yes New paths appear on the host Read existing contents Host → Guest ✅ Yes Contents present at mount time are visible Modify file in place Guest → Host ✅ Yes Guest edits are written through to the host Modify file in place Host → Guest ❌ No Guest keeps stale contents for already-accessed files (macOS virtiofs caching) Delete file/folder Guest → Host ✅ Yes Removal is reflected on the host Delete file/folder Host → Guest ❌ No Guest still sees the path after the host deletes it (cached) Replace via temp + rename() (atomic) Host → Guest ✅ Yes New inode/dentry; recommended way to update files from the host We're requesting a way to disable caching and/or allow the unsupported actions in the table to be supported. https://feedbackassistant.apple.com/feedback/22905515
Replies
1
Boosts
0
Views
105
Activity
1w
IPSW for 15.7.7 missing
Hi, we're only seeing 15.6.1 IPSW available for VMs. Where can we find latest and secure versions of macOS IPSW on https://updates.cdn-apple.com/*/fullrestores/ ? Is there an official list somewhere that Apple provides? We need to be sure we can create the latest 15.7.7 VMs with automation and not rely on inner VM upgrades of MacOS.
Replies
3
Boosts
0
Views
160
Activity
2w
Nested virtualization support for macOS guests using VZMacPlatformConfiguration?
Hello, I filed Feedback FB22859649 about nested virtualization for macOS guests and would like to confirm the supported API surface / limitation through Developer Forums as well. We are using Virtualization.framework to run macOS guests on Apple silicon hosts. The use case is isolated macOS VM workspaces for development and AI-agent automation. In those workspaces, developers often need to run container or VM-backed tooling inside the guest, for example Apple Container workflows, Docker/Colima/Lima-style Linux VM workflows, local Kubernetes, CI sandboxes, testcontainers, or local MCP server stacks that expect hardware-assisted virtualization from inside macOS. Environment I used for the Feedback: Apple silicon host: MacBook Air with Apple M4 Host OS: macOS 26.5 build 25F71 Xcode: 26.5, macOS SDK 26.5 Guest type: macOS VM configured through Virtualization.framework with VZMacOSBootLoader and VZMacPlatformConfiguration From the current SDK headers, I see nested virtualization support exposed on VZGenericPlatformConfiguration via nestedVirtualizationSupported and nestedVirtualizationEnabled. VZMacOSBootLoader says a macOS guest must use VZMacPlatformConfiguration, and VZMacPlatformConfiguration does not appear to expose an equivalent nested virtualization property. Could Apple/DTS please confirm the intended support boundary? Is nested virtualization currently supported for macOS guests created with Virtualization.framework on Apple silicon using VZMacPlatformConfiguration? If not, should this be treated as an intentional current limitation of macOS guests / VZMacPlatformConfiguration rather than a missing configuration option? Is there a supported host-side API or validation behavior to detect this limitation before creating or starting the VM? Is there any supported workaround for container workflows inside a macOS guest that require a nested Linux VM or hypervisor, or is the recommended architecture to run those container/VM workloads on the host or in a Linux guest instead? I am not asking for roadmap or ETA. I am trying to document the correct supported behavior and avoid misleading users of macOS VM workspace tools when container or AI-agent workflows fail because the macOS guest cannot run its own virtualization backend. The broader impact is that disposable macOS VM workspaces are a strong isolation boundary for GUI automation, browser/app state, credentials, local files, and agent runtime state. Without a supported nested virtualization path, the GUI side of the workspace can run in a macOS guest, but common container-backed developer workflows have to move outside that workspace. Thank you.
Replies
1
Boosts
0
Views
210
Activity
2w
VZVirtualMachineView window and system function keys
HI, I am trying to send system function keys like F10, F11 to VzVirtualMachineView window and it is not registering system assigned function keys. The function keys that are not assinged by mac are being send correctly. Is there a way i can send system assigned function keys to VZVirtualMachineView Window? Thanks and Regards
Replies
7
Boosts
0
Views
339
Activity
2w
Host-Only Networking and Port Forwarding Support in macOS Virtualization Framework
I’ve developed a virtual machine manager application using the macOS Virtualization framework. The application currently supports both NAT and bridged networking configurations. I’m now looking to implement host-only networking, where the guest VM can communicate with the host but not with external networks. Is this networking mode supported by the Virtualization framework, and if so, what is the recommended approach to set it up? Additionally, I would like to implement port forwarding from the host to the guest (e.g., redirecting traffic from a specific port on the host to a port on the guest). Is there a way to configure port forwarding using the built-in APIs of the Virtualization framework, or would this require a custom networking solution? Any guidance or best practices for implementing these features within the constraints of the framework would be greatly appreciated.
Replies
7
Boosts
0
Views
433
Activity
3w
VZVirtualMachineView and rightMouseDown
Hi, I am displaying the running linux ubuntu VM in VzVirtualMachineView. I wouldl like to simulate right click by calling vZVirtualMachineView.rightMouseDown to trigger right click on the guest. I tried it and it does not work. For mac os guests it is working. For linux guests it is not working Any help would be appreciated to fix the issue.
Replies
5
Boosts
0
Views
281
Activity
3w
Entitlement com.apple.vm.networking not found and could not be included in profile. This likely is not a valid entitlement and should be removed from your entitlements file
Hi guys, I am building a custom virtualization utility for macOS using the native Virtualization Framework. My goal is to allow local guest virtual machines to run in Bridged Mode (VZBridgedNetworkDeviceAttachment) so they can acquire their own distinct local IP address from my router and expose service ports directly to the local network. When attempting to compile and run my app with the com.apple.vm.networking entitlement, Xcode throws the following error:"Entitlement com.apple.vm.networking not found and could not be included in profile. This likely is not a valid entitlement and should be removed from your entitlements file" I understand that this is a restricted capability that is hidden from the standard Apple Developer Portal by default. I have already reached out via email to Apple Developer Support to request it, but I have not received a definitive answer on the process or exact entitlement string name. For those who have successfully shipped or tested a virtualization app with bridged networking, Is com.apple.vm.networking the correct string name for modern macOS versions, or is there a newer, specific identifier required? What is the actual entitlement that i should see in my developer account? I can't seem to find it in the docs as well. Would it be called "VM Networking" Thanks,
Replies
1
Boosts
0
Views
219
Activity
3w
VMs for automated testing vs 2 macOS instance limit
Hello, I'm evaluating possibility to use virtualization to setup on-permise parallel testing system for a product I work on. My compatibility range is wide, i.e. it would cover macOS 12 - 26, so any testcase needs to be executed on at least 5 different OS versions (and introducing any parallization to the test execution would mean I deal with higher number of VMs). As far as I understand, there is a constraint in Apple Software License, that limits number of OS VM installations per one physical system to 2 (section 2.B.(iii)) in case of OS downloaded from the Internet or through App Store. Clearly these days a single high-end Mac hardware could sustain more than 2 VMs running in parallel. The license also mentions it is also possible to be in a volume or maintenance license program and then the terms of this program apply instead. So I wonder how do people normally deal with the above limitation? What is the path I need to follow if I want to be able to run more than "2 additional copies or instances of" macOS on my VMs?
Replies
0
Boosts
0
Views
141
Activity
May ’26
Battery passthrough for virtual machines on Apple Silicon?
Ever since virtualization changed when Apple transitioned to their own Apple silicon chips, I’m curious whether there is anyway to make virtual machines read the host battery? Asking this because VMs in general always assuming it’s on AC adapter makes battery drain a lot faster it seems like so I’m curious whether adding it or some workaround to add battery reporting w/ power efficiency is possible to match with VMs is possible on Apple Silicon so users on Apple silicon MacBooks don’t have to worry about huge battery power consumption drain with adding some sort of feature or pass through to make VMs read host battery. Hope this makes sense.
Replies
2
Boosts
0
Views
367
Activity
May ’26
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
14
Boosts
1
Views
2.3k
Activity
May ’26
VZVirtualMachine boot from iso after installation
Hi, I have installed ubuntu in a virtual machine using attached iso and everything works fine. After installing ubuntu it boots from the hard disk always. If i ever wanted to force the vm to boot from ISO how can i do it? Thanks & Regards
Replies
5
Boosts
0
Views
175
Activity
May ’26
VZVirtualMachine with multiple displays
I see that in the link https://developer.apple.com/documentation/virtualization/vzvirtualmachineconfiguration/graphicsdevices?changes=late_7_8 graphicsDevices accepts and array. So it is possible to have multiple displays for a virtual machine. But when i tried it with multiple displays it does not work. Why do we have it as an array if it does not support multiple displays.? or how to get it work with multiple displays.
Replies
1
Boosts
0
Views
126
Activity
May ’26
Windows 11 Support in macOS Virtualization Framework
Hello, According to the official documentation, the macOS Virtualization Framework currently supports only macOS and Linux guest operating systems. I would like to know if there is any way—officially or through a supported workaround—to run Windows 11 as a guest using this framework. Additionally, is there any indication or roadmap suggesting that support for Windows guests might be introduced in a future release, such as in macOS 16? Any insights or official clarification would be greatly appreciated. Thank you.
Replies
5
Boosts
0
Views
347
Activity
May ’26