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

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
2.7k
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
450
Aug ’25
Port forwarding with VZVmnetNetworkDeviceAttachment
I have the following code for port forwarding in mac os virtualization var ipAddr = in_addr() // 1. Convert String to in_addr inet_pton(AF_INET, guestIP, &ipAddr) let status = vmnet_network_configuration_add_port_forwarding_rule( config, UInt8(IPPROTO_TCP), // TCP protocol sa_family_t(AF_INET), // address family guestPort, // internal port (guest) externalPort, // external port (host) &ipAddr // internal address (guest IP) ) if status == .VMNET_SUCCESS { print("✅ Port Forwarding set: Mac:\(externalPort) -> VM(\(guestIP)):\(guestPort)") } else { print("❌ Port Forwarding failed for \(guestIP): \(status.rawValue)") } It is returning success but when i test it it does not work. Is there anything i am doing wrong? Please help me also in fixing this problem. Note: The app runs in sandbox i tried without sandboxing and it does not work either. Please refer to this link https://developer.apple.com/forums/thread/822025?login=true&page=1#884236022 how i am creating the VZVmnetNetworkDeviceAttachment
10
0
340
2d
Provisioning with Virtualization framework fails with Threading warning
Hi, I saw the mac os 27 new features video https://developer.apple.com/videos/play/wwdc2026/224/?time=64 and was trying Provisioning and i get this warning [Internal] Thread running at User-interactive quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class. Investigate ways to avoid priority inversions at the line try startupOptions.setGuestProvisioning(opts) i have my vm q declared like this let vmQueue = DispatchQueue(label: "VZVirtualMachineQueue", qos: .userInteractive) and i am executing like this self.vmQueue.async { [weak self] in ......... ......... let startupOptions = VZMacOSVirtualMachineStartOptions() try? startupOptions.setGuestProvisioning(opts) vm.start(startupOptions) } and it fails with treading warning and provisioning does not happen. Thanks in advance for the help
2
0
64
2d
Flatten DiskImageKit StackedImagee
Hi, I see that with mac os 27 we have diskimagekit https://developer.apple.com/documentation/DiskImageKit the stacked disk image gives us the possibility of creating incremental snapshots which is wonderful addition to the virtualization framework. But is there a way to merge back stacked image to base image? Thanks & Regards
2
0
65
2d
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!
1
4
120
3d
Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
Hi everyone, I am developing a macOS virtualization manager (VirtualProg) using the Virtualization.framework. The application is distributed via the Mac App Store, so it operates strictly within the App Store Sandbox. I am looking for a reliable, programmatic way to discover the IP address assigned to a guest (both macOS and Linux). Is there a recommended "Sandbox-safe" API or pattern within the Virtualization framework—or a lower-level networking entitlement—that allows a host application to retrieve the guest's assigned IP address? Ideally, I am looking for a solution that does not require the user to manually install a non-sandboxed helper tool. Thanks in advance for any insights or guidance!
20
0
1.1k
4d
AAUSBAccessoryManager does not fire didconnect
Hi, I am trying to use AAUSBAccessoryManager with mac os 27 to connect host usb device to guest vm. here is my code // // USBPassthroughManager.swift // VirtualProg import AccessoryAccess import Foundation import IOKit @available(macOS 27.0, *) class USBPassthroughManager: NSObject, ObservableObject, AAUSBAccessoryListener { static let shared = USBPassthroughManager() @Published var availableDevices: [AAUSBAccessory] = [] func startListening() async { do { let existing = try await AAUSBAccessoryManager.shared .registerListener(self, matchingCriteria: []) await MainActor.run { self.availableDevices = existing } } catch { LogManager.shared.log(vmName: AppConstants.logGeneral, type: .error, message: "USB passthrough listener failed: \(error.localizedDescription)") } } func usbAccessoryDidConnect(_ usbAccessory: AAUSBAccessory) { DispatchQueue.main.async { guard !self.availableDevices.contains(where: { $0.registryID == usbAccessory.registryID }) else { return } self.availableDevices.append(usbAccessory) print(self.displayName(for: usbAccessory)) } } The usb icon in status bar menu is displayed and i can select the the usb device to connect to my app. the usb device is connected to my app. it is shown in the status bar. but usbAccessoryDidConnect is not firing. i have the entitlement com.apple.developer.accessory-access.usb in the capabilities. i get this in the xcode console start failed ((iokit/common) not permitted) for plugin for .......... and also disconnect is also not firing. Not sure what i am doing wrong. How can i determine the name of the USB Device from AAUSBAccessory. Any help would be appreciated. Thanks
2
0
69
4d
Error 10007 installing latest Sequoia guest on Tahoe host
Filed a feedback on this: FB23038153 I am unable to install a new Sequoia 15.6.1 (latest available .ipsw) on a Tahoe 26.5.1 host using a Virtualization.framework-based VM app. I’ve tried both Tart and VirtualBuddy. Both get to 90% of the installation, then fail with this error: Error Domain=VZErrorDomain Code=10007 "Installation failed." UserInfo={NSLocalizedFailure=An error occurred during installation., NSLocalizedFailureReason=Installation failed., NSUnderlyingError=0xc2ac2e280 {Error Domain=com.apple.MobileDevice.MobileRestore Code=-1 "AMRestorePerformRestoreModeRestoreWithError failed with error: 11" UserInfo={NSLocalizedDescription=AMRestorePerformRestoreModeRestoreWithError failed with error: 11, NSLocalizedFailureReason=An unknown error occurred during installation.}}} I have tried re-installing MobileDevice.pkg from both Xcode 27 beta 1 and Xcode 26.5.0. I’ve rebooted my Mac. I get the same result each time. I’ve also tried using an older Sequoia restore image (15.4.1), same result. Installing a Tahoe guest works fine.
1
0
79
4d
Unable to disable SIP on macOS 27 Beta 1
I work for a company which develops as part of our product suite a System Extension implementing an Endpoint Security client. Our local developer workflow for testing and validating changes is to build locally with Developer certificates (not a legitimate/production Developer ID certificate) and deploy local builds in to a VM, where to get the System Extension to load and be accepted we need to disable SIP & AMFI. macOS 27 VM is refusing to allow me to disable SIP. Is there an alternate approach we can use for this workflow to allow macOS VMs to accept our software when signing with a (same teamID, but different certificate to the provisioningprofile) developer certificate for local validation?
1
3
299
4d
Can macOS 27 VMs be run on older versions of macOS?
As the title says, I'd like to run a macOS 27 VM on my Mac (the host is on macOS 26.5.1) in order to test my apps without having to update my host to a beta. My virtualization app of choice (VirtualBuddy) fails on installation when I use the restore image for macOS 27.0 (26A5353q) from the developer website. The developer of VirtualBuddy believes this is a macOS limitation (https://github.com/insidegui/VirtualBuddy/discussions/683). (I filed FB22977958, but I'm not sure if they filed their own bug.) Is there a workaround? It'd be very nice to have access to this during WWDC week. Usually I'd look for device support files on the developer website for download and/or install the Xcode beta first, but I've already installed the Xcode beta and there don't seem to be any device support files available.
1
1
131
5d
`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
107
5d
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
73
5d
AppleID Login failing in virtualized OS
Logging in with my Apple ID anywhere in the system (feedback assistant, Xcode, iCloud, etc.) fails when running under virtualization. Is this a known 'issue'? (networking in general is working fine)
Replies
97
Boosts
32
Views
61k
Activity
Jun ’25
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
2.7k
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
450
Activity
Aug ’25
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
12
Boosts
11
Views
1.7k
Activity
1d
USB Passthrough in mac os virtualization framework
Hi, Is there way to connect the host usb devices directly to guest vms using mac os Virtualization framework? Thanks
Replies
3
Boosts
0
Views
172
Activity
1d
Port forwarding with VZVmnetNetworkDeviceAttachment
I have the following code for port forwarding in mac os virtualization var ipAddr = in_addr() // 1. Convert String to in_addr inet_pton(AF_INET, guestIP, &ipAddr) let status = vmnet_network_configuration_add_port_forwarding_rule( config, UInt8(IPPROTO_TCP), // TCP protocol sa_family_t(AF_INET), // address family guestPort, // internal port (guest) externalPort, // external port (host) &ipAddr // internal address (guest IP) ) if status == .VMNET_SUCCESS { print("✅ Port Forwarding set: Mac:\(externalPort) -> VM(\(guestIP)):\(guestPort)") } else { print("❌ Port Forwarding failed for \(guestIP): \(status.rawValue)") } It is returning success but when i test it it does not work. Is there anything i am doing wrong? Please help me also in fixing this problem. Note: The app runs in sandbox i tried without sandboxing and it does not work either. Please refer to this link https://developer.apple.com/forums/thread/822025?login=true&page=1#884236022 how i am creating the VZVmnetNetworkDeviceAttachment
Replies
10
Boosts
0
Views
340
Activity
2d
Provisioning with Virtualization framework fails with Threading warning
Hi, I saw the mac os 27 new features video https://developer.apple.com/videos/play/wwdc2026/224/?time=64 and was trying Provisioning and i get this warning [Internal] Thread running at User-interactive quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class. Investigate ways to avoid priority inversions at the line try startupOptions.setGuestProvisioning(opts) i have my vm q declared like this let vmQueue = DispatchQueue(label: "VZVirtualMachineQueue", qos: .userInteractive) and i am executing like this self.vmQueue.async { [weak self] in ......... ......... let startupOptions = VZMacOSVirtualMachineStartOptions() try? startupOptions.setGuestProvisioning(opts) vm.start(startupOptions) } and it fails with treading warning and provisioning does not happen. Thanks in advance for the help
Replies
2
Boosts
0
Views
64
Activity
2d
Flatten DiskImageKit StackedImagee
Hi, I see that with mac os 27 we have diskimagekit https://developer.apple.com/documentation/DiskImageKit the stacked disk image gives us the possibility of creating incremental snapshots which is wonderful addition to the virtualization framework. But is there a way to merge back stacked image to base image? Thanks & Regards
Replies
2
Boosts
0
Views
65
Activity
2d
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
1
Boosts
4
Views
120
Activity
3d
Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
Hi everyone, I am developing a macOS virtualization manager (VirtualProg) using the Virtualization.framework. The application is distributed via the Mac App Store, so it operates strictly within the App Store Sandbox. I am looking for a reliable, programmatic way to discover the IP address assigned to a guest (both macOS and Linux). Is there a recommended "Sandbox-safe" API or pattern within the Virtualization framework—or a lower-level networking entitlement—that allows a host application to retrieve the guest's assigned IP address? Ideally, I am looking for a solution that does not require the user to manually install a non-sandboxed helper tool. Thanks in advance for any insights or guidance!
Replies
20
Boosts
0
Views
1.1k
Activity
4d
AAUSBAccessoryManager does not fire didconnect
Hi, I am trying to use AAUSBAccessoryManager with mac os 27 to connect host usb device to guest vm. here is my code // // USBPassthroughManager.swift // VirtualProg import AccessoryAccess import Foundation import IOKit @available(macOS 27.0, *) class USBPassthroughManager: NSObject, ObservableObject, AAUSBAccessoryListener { static let shared = USBPassthroughManager() @Published var availableDevices: [AAUSBAccessory] = [] func startListening() async { do { let existing = try await AAUSBAccessoryManager.shared .registerListener(self, matchingCriteria: []) await MainActor.run { self.availableDevices = existing } } catch { LogManager.shared.log(vmName: AppConstants.logGeneral, type: .error, message: "USB passthrough listener failed: \(error.localizedDescription)") } } func usbAccessoryDidConnect(_ usbAccessory: AAUSBAccessory) { DispatchQueue.main.async { guard !self.availableDevices.contains(where: { $0.registryID == usbAccessory.registryID }) else { return } self.availableDevices.append(usbAccessory) print(self.displayName(for: usbAccessory)) } } The usb icon in status bar menu is displayed and i can select the the usb device to connect to my app. the usb device is connected to my app. it is shown in the status bar. but usbAccessoryDidConnect is not firing. i have the entitlement com.apple.developer.accessory-access.usb in the capabilities. i get this in the xcode console start failed ((iokit/common) not permitted) for plugin for .......... and also disconnect is also not firing. Not sure what i am doing wrong. How can i determine the name of the USB Device from AAUSBAccessory. Any help would be appreciated. Thanks
Replies
2
Boosts
0
Views
69
Activity
4d
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
3
Boosts
0
Views
133
Activity
4d
Error 10007 installing latest Sequoia guest on Tahoe host
Filed a feedback on this: FB23038153 I am unable to install a new Sequoia 15.6.1 (latest available .ipsw) on a Tahoe 26.5.1 host using a Virtualization.framework-based VM app. I’ve tried both Tart and VirtualBuddy. Both get to 90% of the installation, then fail with this error: Error Domain=VZErrorDomain Code=10007 "Installation failed." UserInfo={NSLocalizedFailure=An error occurred during installation., NSLocalizedFailureReason=Installation failed., NSUnderlyingError=0xc2ac2e280 {Error Domain=com.apple.MobileDevice.MobileRestore Code=-1 "AMRestorePerformRestoreModeRestoreWithError failed with error: 11" UserInfo={NSLocalizedDescription=AMRestorePerformRestoreModeRestoreWithError failed with error: 11, NSLocalizedFailureReason=An unknown error occurred during installation.}}} I have tried re-installing MobileDevice.pkg from both Xcode 27 beta 1 and Xcode 26.5.0. I’ve rebooted my Mac. I get the same result each time. I’ve also tried using an older Sequoia restore image (15.4.1), same result. Installing a Tahoe guest works fine.
Replies
1
Boosts
0
Views
79
Activity
4d
Unable to disable SIP on macOS 27 Beta 1
I work for a company which develops as part of our product suite a System Extension implementing an Endpoint Security client. Our local developer workflow for testing and validating changes is to build locally with Developer certificates (not a legitimate/production Developer ID certificate) and deploy local builds in to a VM, where to get the System Extension to load and be accepted we need to disable SIP & AMFI. macOS 27 VM is refusing to allow me to disable SIP. Is there an alternate approach we can use for this workflow to allow macOS VMs to accept our software when signing with a (same teamID, but different certificate to the provisioningprofile) developer certificate for local validation?
Replies
1
Boosts
3
Views
299
Activity
4d
PCIe/Thunderbolt device delegation to Linux guest VM on Apple Silicon
Does Virtualization.framework support delegating a Thunderbolt/PCIe device to a Linux guest VM running on Apple Silicon? We're developing a custom PCIe device and would like to iterate on the driver in a Linux VM environment on the same host.
Replies
2
Boosts
0
Views
91
Activity
4d
Can macOS 27 VMs be run on older versions of macOS?
As the title says, I'd like to run a macOS 27 VM on my Mac (the host is on macOS 26.5.1) in order to test my apps without having to update my host to a beta. My virtualization app of choice (VirtualBuddy) fails on installation when I use the restore image for macOS 27.0 (26A5353q) from the developer website. The developer of VirtualBuddy believes this is a macOS limitation (https://github.com/insidegui/VirtualBuddy/discussions/683). (I filed FB22977958, but I'm not sure if they filed their own bug.) Is there a workaround? It'd be very nice to have access to this during WWDC week. Usually I'd look for device support files on the developer website for download and/or install the Xcode beta first, but I've already installed the Xcode beta and there don't seem to be any device support files available.
Replies
1
Boosts
1
Views
131
Activity
5d
`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
107
Activity
5d
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
70
Activity
5d
Virtual Machine observability
How do I run observability with virtual machines - internally, externally or both?
Replies
2
Boosts
0
Views
73
Activity
5d
Virtual Machine Boot Time
Do you have any tips for increasing the speed of a Virtual Machines boot time?
Replies
4
Boosts
0
Views
107
Activity
5d
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
73
Activity
5d
MacOS 27 Beta on MacOS 26 system
Can a MacOS 27 beta VM run on MacOS 26 system?
Replies
3
Boosts
0
Views
100
Activity
5d
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
54
Activity
5d