Hypervisor

RSS for tag

Build virtualization solutions on top of a lightweight hypervisor without the need for third-party kernel extensions using Hypervisor.

Posts under Hypervisor tag

69 Posts

Post

Replies

Boosts

Views

Activity

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
784
Aug ’25
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
8
1
905
6h
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
463
17h
Title: Hypervisor.framework — vCPU cessation guarantee after VM-owning process termination
Title: Hypervisor.framework — vCPU cessation guarantee after VM-owning process termination Hello, I'm investigating the failure-containment guarantees of Hypervisor.framework on Apple Silicon, specifically for an application that uses QEMU's HVF accelerator. In the QEMU 11.1.2 ARM64 implementation: hv_vm_create() creates the VM within the QEMU process. Each vCPU is created and executed on a QEMU pthread using hv_vcpu_create() and hv_vcpu_run(). No separate userspace VM-execution helper was identified in the reviewed execution path. The security requirement is to establish guest-execution cessation independently when the VM-owning application fails. My primary question: If a supervising parent successfully observes that the QEMU process has actually terminated through waitpid() — whether normally or following SIGKILL — is that a supported guarantee that every Hypervisor.framework vCPU belonging to that process has ceased guest execution and cannot resume? I am specifically asking about irreversible cessation of guest execution, not necessarily completion of all VM resource reclamation. A few related questions: Does an EVFILT_PROC/NOTE_EXIT notification establish the same guarantee, and is there a documented ordering relationship between that notification and cessation of all associated vCPUs? If a thread is executing hv_vcpu_run() when its process receives SIGKILL or SIGSTOP, what cessation or suspension guarantees apply? Is there a documented upper bound for cessation following process termination, or could kernel/framework blockage delay it without a specified bound? Can any other userspace process retain or acquire resources allowing those vCPUs to continue executing after the original owner has terminated? If the original supervising parent also crashes, is there a supported mechanism for a successor controller to obtain equivalent positive evidence of termination and vCPU cessation for the original execution instance? The distinction between a process merely receiving a termination request and the operating system confirming actual process termination is important here. I'm trying to establish which guarantees are supported by the framework rather than relying on experimental observations or assumptions about kernel cleanup. Any clarification would be greatly appreciated. Thanks, Gary
3
0
108
5d
How to build a replacement for sandbox-exec?
Hi, I want something like sandbox-exec, so I can run things that I don't trust, and restrict their ability to read or write files to only certain locations. Like most software devs I have to download and run lots of code from the internet and the danger of this really annoys me. Unfortunately sandbox-exec is marked as deprecated and the APIs in sandbox.h say "No longer supported". I notice there is some new stuff in the Apple docs about "hypervisors" and "virtualization". https://developer.apple.com/documentation/hypervisor https://developer.apple.com/documentation/virtualization Would these APIs allow me to start and control a virtual copy of my macOS, to serve like a sandbox? Are there other solutions that people use? As an example, say that I need to download and run a copy of memcached. It's a typical open source project – you unpack a source tgz, then run configure; make and get a binary. Now I want to run that without worrying that some hacker injected a piece of evil code to copy my files and send them somewhere. So I want to say "run this binary, while disallowing file reads and writes, except for directories X,Y,Z, and disallowing network connections, except for listening on port 1234."
13
0
5.7k
1w
Hypervisor.framework: guest RAM counted twice in phys_footprint after both host and guest write a page
Hello, I'm building a virtualization app on Hypervisor.framework (Apple silicon). Guest RAM is anonymous memory mapped with hv_vm_map. Activity Monitor and task_info(TASK_VM_INFO).phys_footprint show the VM process using much more memory than the guest is assigned. For example, a 6 GB Windows ARM64 guest shows about 8.6 GB. Here's what I've found: Pages written only from the host count once. Pages written only by the guest count once. A page written by both the host and the guest counts twice, even though it is the same physical page. The host reads back the guest's writes, so there's no second copy. In a real VM this happens all the time. The VM process writes into guest RAM for firmware loading, disk reads, virtio buffers and so on, and the guest writes the same pages. So the reported footprint keeps growing past the guest's RAM size. Minimal reproducer (needs the com.apple.security.hypervisor entitlement): // clang -O1 -o hvfootprint hvfootprint.c -framework Hypervisor // codesign -s - --entitlements hv.entitlements -f hvfootprint #include <Hypervisor/Hypervisor.h> #include <mach/mach.h> #include <stdio.h> #include <string.h> #include <sys/mman.h> #define MB (1024ull * 1024) #define GPA 0x40000000ull #define SIZE (2048 * MB) #define PAGE 16384 static uint64_t phys_footprint_mb(void) { task_vm_info_data_t info; mach_msg_type_number_t count = TASK_VM_INFO_COUNT; task_info(mach_task_self(), TASK_VM_INFO, (task_info_t)&info, &count); return info.phys_footprint / MB; } // Guest (EL1, MMU off): x0 = start GPA, x1 = value, x2 = page count. // Stores x1 to each 16 KB page, then exits with HVC. static const uint32_t guest_code[] = { 0xf9000001, // str x1, [x0] 0x91401000, // add x0, x0, #0x4000 0xf1000442, // subs x2, x2, #1 0x54ffffa1, // b.ne 0b 0xd4000002, // hvc #0 }; static void guest_write_all(hv_vcpu_t vcpu, uint64_t value) { hv_vcpu_set_reg(vcpu, HV_REG_PC, GPA); hv_vcpu_set_reg(vcpu, HV_REG_CPSR, 0x3c5); hv_vcpu_set_reg(vcpu, HV_REG_X0, GPA + PAGE); hv_vcpu_set_reg(vcpu, HV_REG_X1, value); hv_vcpu_set_reg(vcpu, HV_REG_X2, SIZE / PAGE - 1); hv_vcpu_run(vcpu); } int main(void) { uint8_t *ram = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); hv_vm_create(NULL); hv_vm_map(ram, GPA, SIZE, HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC); memcpy(ram, guest_code, sizeof(guest_code)); hv_vcpu_t vcpu; hv_vcpu_exit_t *exit_info; hv_vcpu_create(&vcpu, &exit_info, NULL); printf("start: phys_footprint %5llu MB\n", phys_footprint_mb()); for (uint64_t off = PAGE; off < SIZE; off += PAGE) // host writes every page ram[off] = 1; printf("host wrote 2 GB: phys_footprint %5llu MB\n", phys_footprint_mb()); guest_write_all(vcpu, 0x55); // guest writes the same pages printf("guest wrote the same 2 GB: phys_footprint %5llu MB\n", phys_footprint_mb()); printf("host sees guest data (same pages): %s\n", ram[PAGE] == 0x55 ? "yes" : "no"); guest_write_all(vcpu, 0x66); // and again printf("guest wrote the same 2 GB again: phys_footprint %5llu MB\n", phys_footprint_mb()); return 0; } Output (macOS 27.0.1, build 26A434, Apple M5): start: phys_footprint 2 MB host wrote 2 GB: phys_footprint 2050 MB guest wrote the same 2 GB: phys_footprint 4099 MB host sees guest data (same pages): yes guest wrote the same 2 GB again: phys_footprint 4099 MB 2 GB of shared guest RAM is reported as 4 GB. Other observations The result is the same whether guest RAM comes from mmap(MAP_PRIVATE | MAP_ANON), mmap(MAP_SHARED | MAP_ANON), mach_vm_allocate, or a named memory entry (mach_make_memory_entry_64 with MAP_MEM_NAMED_CREATE) mapped twice, with one view passed to hv_vm_map and the other used by the host. footprint region totals ("Footprint:" / Dirty) count only pages the host touched. When only the guest wrote 2 GB, the regions showed about 3 MB while phys_footprint showed 2,051 MB. So neither number shows real usage once both sides touch memory. System-wide anonymous memory (host_statistics64, internal_page_count + compressor_page_count) does not grow when the guest writes pages the host already wrote. That suggests this is accounting only, not a second physical copy. Parallels describes the same symptom for its VMs (https://kb.parallels.com/en/128437). Questions Is this double accounting expected for memory mapped with hv_vm_map, or is it a bug? If it's a bug, I'll file it in Feedback Assistant with this reproducer. Is there a supported way to allocate or map guest RAM so each physical page is charged to the process once? For example, a ledger tag, memory-entry ownership, or an hv_vm_map / hv_vm_allocate option. Is phys_footprint the right input for memory-pressure decisions (jetsam) for a VM process? Could the double count make such a process look larger than it is to the system? What is the recommended way to report a VM process's real memory use to users? Thank you.
2
0
340
1w
Virtualization.framework VM execution ownership and crash reclamation on Intel macOS Monterey
Subject: Virtualization.framework VM execution ownership and crash reclamation on Intel macOS Monterey Hello, I’m investigating the lifecycle guarantees of Virtualization.framework on Intel macOS Monterey 12.7.x. The specific scenario is a VZVirtualMachine running a Linux guest. I need to understand the ownership and reclamation behavior when the process holding the VZVirtualMachine is abruptly terminated without calling stop() or performing normal cleanup. The key questions are: For a specific VZVirtualMachine on Intel macOS Monterey, which userspace task/process actually owns the Hypervisor VM and the vCPU threads backing guest execution? Is Hypervisor execution owned directly by the calling process, or by a separate process such as: com.apple.Virtualization.VirtualMachine or another Virtualization.framework backend? If the process holding the VZVirtualMachine is terminated with SIGKILL or crashes without executing cleanup code, is the underlying guest execution context necessarily destroyed? More specifically: Can guest vCPU execution continue after the client process has died? If a separate backend process owns the VM, is that backend guaranteed to terminate or destroy the VM when the client dies? Does this behavior apply to Intel macOS Monterey 12.7.x, or only to newer macOS releases? Is there a supported diagnostic on Monterey that can map one specific VZVirtualMachine instance to the task/process that actually owns its Hypervisor VM/vCPU execution? For example, would a diagnostic showing Hypervisor execution frames such as hv_vcpu_run in a process, combined with a reliable process-exit notification, be sufficient to establish that ownership relationship? If the Virtualization backend can survive the client process, what supported VM-specific recovery or termination mechanism is available to another process? The security property I need to establish is intentionally narrow: If the userspace owner of a VM is abruptly destroyed, guest computation must not be able to continue indefinitely as an independent execution domain. Persistent disk files or other inert VM artifacts are not the concern; the question is specifically about live guest/vCPU execution and its ownership lifecycle. I’m looking for the supported architectural contract or diagnostic approach, not undocumented implementation details. Target environment: macOS Monterey 12.7.x Intel x86_64 Virtualization.framework Hypervisor.framework Hardware virtualization available No private APIs or privileged/kernel extensions Thank you.
6
0
588
3w
Direct9 / Support faster floating point instructions - xrosetta87
As the title states, I’ve been trying to emulate some older Direct9 games, and rosetta can’t handle it because of that https://github.com/WineAndAqua/rosettax87 I’ve had to use this, but it really seems like something that I shouldn’t have to do I’ve tried Wineskin, wine, D9VK, MoltenVK, GPTk, and the only thing that’s close to working is using devel wine + d9vk with the xrosetta87 running like its a VPN, and then you play Without xrosetta87 it’s 0-0.5 FPS? with it, it’s like a buttery smooth 60+
1
0
1.1k
Jan ’26
New Virtualization features in macOS Tahoe
I'm pleased to share some significant updates that have recently been released for our Hypervisor and Virtualization frameworks. We've focused on enhancing efficiency, expanding capabilities, and addressing common developer needs. I believe these will be valuable for many of you. Here’s a look at what’s new: Hypervisor Updates We've introduced support for configuring the intermediate physical address (IPA) memory granularity of a VM. This allows for more granular memory mappings, enabling granularity sizes down to 4KB. This is particularly useful for certain specialized device drivers requiring finer memory control. Virtualization Framework Updates More Efficient VM Image Storage with ASIF: We've integrated support for the Apple Sparse Image Format (ASIF). This results in a smaller disk footprint and optimized transfer for VM disk images when using VZDiskImageStorageDeviceAttachment, improving storage efficiency. Custom Network Topologies with vmnet: We've added support for vmnet custom network topologies. This enables more flexible VM-to-VM communication based on logical networks with customized configurations, useful for complex testing or development environments. See VZVmnetNetworkDeviceAttachment to get started. Simplified VM Queue Discovery: It's now easier to discover a VM’s on-process thanks to a new property on VZVirtualMachine. This should aid in development and debugging when interacting directly with the VM's queue. These are some of the key highlights of the first beta, and I'm looking forward to seeing how these improvements will be utilized. I encourage you to explore the documentation for full details on these features.
3
3
1.4k
Jan ’26
Virtualization.framework - Request stop?
Hi! I'm trying to figure out what mechanism request stop sends to the guest to actually request a stop. It doesn't appear that Virtualization.framework implements any ACPI bits relating to power buttons, so unclear how a linux VM would detect that a request has been stopped. I don't see any documentation around what devices are implemented by Virtualization.framework either, in terms of things like realtime clock, etc. Thanks for any help!
2
0
1.9k
Jan ’26
Hypervisor Framework on MacOS 26
I have a Hypervisor Framework App that works on MacOS 14 and 15 but fails on MacOS 26. To reproduce: hv_vm_config_t vm_config = hv_vm_config_create(); result = hv_vm_create(vm_config); result == HV_DENIED /* (0xfae94007) */ (from per the header file - not present on the online documentation) com.apple.security.hypervisor is set, no other VMs are running (no Virtualization Framework and no Hypervisor Framework). I have tried various entitlements with no success. Sandbox is off.
1
0
1k
Nov ’25
Is it possible to create a virtual NPU device on macOS using Hypervisor.framework + CoreML?
Is it possible to expose a custom VirtIO device to a Linux guest running inside a VM — likely using QEMU backed by Hypervisor.framework. The guest would see this device as something like /dev/npu0, and it would use a kernel driver + userspace library to submit inference requests. On the macOS host, these requests would be executed using CoreML, MPSGraph, or BNNS. The results would be passed back to the guest via IPC. Does the macOS allow this kind of "fake" NPU / GPU
1
0
1.3k
Aug ’25
Request for improved graphics support on MacOS guests (VMs)..
Hi, been exploring macOS VM on both Parallels and UTM and they lack some "GPU/graphics" things vs native MacOS which could be useful on some situations (testing some non trusted graphics apps on a Mac VM) so providing similar usefulness as Windows Sandbox.. Current limitations: 1)In MacOS VM night mode doesn't work.. 2)HDR support isn't exposed even when enabling HDR on host 3)missing GPTK support for the Paravirtual GPU (Paravitual GPU supports Metal but isn't enough for GPTK to work which complains about unsupported GPU).. 4)OpenCL is supported but only the CPU device.. so expose GPU device in addition to current CPU only device.. 5)OpenGL only supports the software renderer.. I assume OpenGL driver on Apple M1-4 GPUs being Metal based, and being Metal supported no reason for software renderer only thanks..
2
0
1k
Apr ’25
2 Requests for Rosetta: support BMI1/2 and F16C and support also AVX1/2 on Rosetta Linux..
Hi, REQUEST 1: seems Microsoft is ahead of Apple in X86 ARM emulation support at least in features supported.. see: https://blogs.windows.com/windows-insider/2024/11/06/announcing-windows-11-insider-preview-build-27744-canary-channel/ x64 emulated applications through Prism will now have support for additional extensions to the x86 instruction set architecture. These extensions include AVX and AVX2, as well as BMI, FMA, F16C BMI1/2 and F16C aren't yet supported by Rosetta.. would be useful for games like Alan Wake 2.. so asking for Rosetta equaling features to Prism emulator.. REQUEST 2: there is no way to currently enable AVX1/2 on Rosetta Linux.. on macOS using export ROSETTA_ADVERTISE_AVX=1 does the trick.. but not on Linux VM's.. tested setting this via: /bin/launchctl setenv ROSETTA_ADVERTISE_AVX 1 on Mac before VM launch and inside Linux VM but AVX2 isn't exposed..
3
1
2.5k
Apr ’25
Request for Rosetta: support optionally faster x87 emulation (via some env variable similar to AVX) like Rosettax87 project..
Hi, Since recently there is interest in having faster x87 translation speeds than Rosetta offers.. mainly some old PC games getting stuck at less than 5fps using Wine that uses Rosetta..( some world of warcraft game for ex.).. so main case right now, is games using old fmodex library versions (dll or statically)that uses heavy x87 instructions for audio processing , and such games not being threaded ,stalls the render threead, which is the same thread.. Luckily there is a hack, see: https://github.com/Lifeisawful/rosettax87 ”This is an experimental project that modifies Apple's Rosetta technology to use less precise but significantly faster x87 instruction handlers. The benchmarks show approximately 4-5x performance improvement for x87 floating-point operations.” but limitations are: 1)it runs only on specific Mac version (15.4.1) due to searching some fixed offsets in current rosetta library that may change with mac updates.. 2)requires to run two binaries (a server and the launcher program).. 3)currently doesn’t seem to accelerating x87 instruction on Linux programs/binaries i.e. lacking support for Rosetta on Linux if Apple supports similar technology, it could providing some enviroment variable like ROSETTA_FAST_X87 for enabling/disabling this fast emulation similar to how Rosetta AVX support not enabled by default.. thanks..
3
0
704
Apr ’25
What Linux distros are supported by mac OS virutalization framework
I have developed an app to create and run virual machines using mac os virtualization framework for apple siicon and intel macs. I have tried ubuntu, fedora, debian & linux mint distros and they all worked fine with intel macs. But when i try to run other distros like mx linux, manjaro, pop os, endevour os etc on intel mac they all on booting iso just shows the black screen. is there any list of officilay support linux distros for intel macs and apple silicon. the support of linux distros are fairly limited or am i missing something.
2
0
558
Apr ’25
Calling "hv_vm_config_set_el2_enabled(config, true)" but vCPU still starts in EL1
I'm testing the newly introduced nested virt API from Hypervisor.framework on an M3 Pro running 15.3.1. First, I'm calling "hv_vm_config_get_el2_supported" to confirm the system supports nested virt, then "hv_vm_config_set_el2_enabled" to enable EL2 in the configuration and finally "hv_vm_config_get_el2_enabled" to confirm it's enabled. After creating the VM with this configuration, I've confirmed with assembly code (checking CurrentEL) that the vCPU is still starting in EL1. Something has definitely changed in the vCPU management, because SMCCC calls that worked fine without calling "hv_vm_config_set_el2_enabled" now trigger an "EC_INSNABORT", but from the guest perspective the vCPU is definitely still in EL1. Is there an additional requirement in addition to calling to "hv_vm_config_set_el2_enabled" to make the vCPU start in EL2?
2
0
677
Mar ’25
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
784
Activity
Aug ’25
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
8
Boosts
1
Views
905
Activity
6h
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
463
Activity
17h
Title: Hypervisor.framework — vCPU cessation guarantee after VM-owning process termination
Title: Hypervisor.framework — vCPU cessation guarantee after VM-owning process termination Hello, I'm investigating the failure-containment guarantees of Hypervisor.framework on Apple Silicon, specifically for an application that uses QEMU's HVF accelerator. In the QEMU 11.1.2 ARM64 implementation: hv_vm_create() creates the VM within the QEMU process. Each vCPU is created and executed on a QEMU pthread using hv_vcpu_create() and hv_vcpu_run(). No separate userspace VM-execution helper was identified in the reviewed execution path. The security requirement is to establish guest-execution cessation independently when the VM-owning application fails. My primary question: If a supervising parent successfully observes that the QEMU process has actually terminated through waitpid() — whether normally or following SIGKILL — is that a supported guarantee that every Hypervisor.framework vCPU belonging to that process has ceased guest execution and cannot resume? I am specifically asking about irreversible cessation of guest execution, not necessarily completion of all VM resource reclamation. A few related questions: Does an EVFILT_PROC/NOTE_EXIT notification establish the same guarantee, and is there a documented ordering relationship between that notification and cessation of all associated vCPUs? If a thread is executing hv_vcpu_run() when its process receives SIGKILL or SIGSTOP, what cessation or suspension guarantees apply? Is there a documented upper bound for cessation following process termination, or could kernel/framework blockage delay it without a specified bound? Can any other userspace process retain or acquire resources allowing those vCPUs to continue executing after the original owner has terminated? If the original supervising parent also crashes, is there a supported mechanism for a successor controller to obtain equivalent positive evidence of termination and vCPU cessation for the original execution instance? The distinction between a process merely receiving a termination request and the operating system confirming actual process termination is important here. I'm trying to establish which guarantees are supported by the framework rather than relying on experimental observations or assumptions about kernel cleanup. Any clarification would be greatly appreciated. Thanks, Gary
Replies
3
Boosts
0
Views
108
Activity
5d
How to build a replacement for sandbox-exec?
Hi, I want something like sandbox-exec, so I can run things that I don't trust, and restrict their ability to read or write files to only certain locations. Like most software devs I have to download and run lots of code from the internet and the danger of this really annoys me. Unfortunately sandbox-exec is marked as deprecated and the APIs in sandbox.h say "No longer supported". I notice there is some new stuff in the Apple docs about "hypervisors" and "virtualization". https://developer.apple.com/documentation/hypervisor https://developer.apple.com/documentation/virtualization Would these APIs allow me to start and control a virtual copy of my macOS, to serve like a sandbox? Are there other solutions that people use? As an example, say that I need to download and run a copy of memcached. It's a typical open source project – you unpack a source tgz, then run configure; make and get a binary. Now I want to run that without worrying that some hacker injected a piece of evil code to copy my files and send them somewhere. So I want to say "run this binary, while disallowing file reads and writes, except for directories X,Y,Z, and disallowing network connections, except for listening on port 1234."
Replies
13
Boosts
0
Views
5.7k
Activity
1w
Hypervisor.framework: guest RAM counted twice in phys_footprint after both host and guest write a page
Hello, I'm building a virtualization app on Hypervisor.framework (Apple silicon). Guest RAM is anonymous memory mapped with hv_vm_map. Activity Monitor and task_info(TASK_VM_INFO).phys_footprint show the VM process using much more memory than the guest is assigned. For example, a 6 GB Windows ARM64 guest shows about 8.6 GB. Here's what I've found: Pages written only from the host count once. Pages written only by the guest count once. A page written by both the host and the guest counts twice, even though it is the same physical page. The host reads back the guest's writes, so there's no second copy. In a real VM this happens all the time. The VM process writes into guest RAM for firmware loading, disk reads, virtio buffers and so on, and the guest writes the same pages. So the reported footprint keeps growing past the guest's RAM size. Minimal reproducer (needs the com.apple.security.hypervisor entitlement): // clang -O1 -o hvfootprint hvfootprint.c -framework Hypervisor // codesign -s - --entitlements hv.entitlements -f hvfootprint #include <Hypervisor/Hypervisor.h> #include <mach/mach.h> #include <stdio.h> #include <string.h> #include <sys/mman.h> #define MB (1024ull * 1024) #define GPA 0x40000000ull #define SIZE (2048 * MB) #define PAGE 16384 static uint64_t phys_footprint_mb(void) { task_vm_info_data_t info; mach_msg_type_number_t count = TASK_VM_INFO_COUNT; task_info(mach_task_self(), TASK_VM_INFO, (task_info_t)&info, &count); return info.phys_footprint / MB; } // Guest (EL1, MMU off): x0 = start GPA, x1 = value, x2 = page count. // Stores x1 to each 16 KB page, then exits with HVC. static const uint32_t guest_code[] = { 0xf9000001, // str x1, [x0] 0x91401000, // add x0, x0, #0x4000 0xf1000442, // subs x2, x2, #1 0x54ffffa1, // b.ne 0b 0xd4000002, // hvc #0 }; static void guest_write_all(hv_vcpu_t vcpu, uint64_t value) { hv_vcpu_set_reg(vcpu, HV_REG_PC, GPA); hv_vcpu_set_reg(vcpu, HV_REG_CPSR, 0x3c5); hv_vcpu_set_reg(vcpu, HV_REG_X0, GPA + PAGE); hv_vcpu_set_reg(vcpu, HV_REG_X1, value); hv_vcpu_set_reg(vcpu, HV_REG_X2, SIZE / PAGE - 1); hv_vcpu_run(vcpu); } int main(void) { uint8_t *ram = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); hv_vm_create(NULL); hv_vm_map(ram, GPA, SIZE, HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC); memcpy(ram, guest_code, sizeof(guest_code)); hv_vcpu_t vcpu; hv_vcpu_exit_t *exit_info; hv_vcpu_create(&vcpu, &exit_info, NULL); printf("start: phys_footprint %5llu MB\n", phys_footprint_mb()); for (uint64_t off = PAGE; off < SIZE; off += PAGE) // host writes every page ram[off] = 1; printf("host wrote 2 GB: phys_footprint %5llu MB\n", phys_footprint_mb()); guest_write_all(vcpu, 0x55); // guest writes the same pages printf("guest wrote the same 2 GB: phys_footprint %5llu MB\n", phys_footprint_mb()); printf("host sees guest data (same pages): %s\n", ram[PAGE] == 0x55 ? "yes" : "no"); guest_write_all(vcpu, 0x66); // and again printf("guest wrote the same 2 GB again: phys_footprint %5llu MB\n", phys_footprint_mb()); return 0; } Output (macOS 27.0.1, build 26A434, Apple M5): start: phys_footprint 2 MB host wrote 2 GB: phys_footprint 2050 MB guest wrote the same 2 GB: phys_footprint 4099 MB host sees guest data (same pages): yes guest wrote the same 2 GB again: phys_footprint 4099 MB 2 GB of shared guest RAM is reported as 4 GB. Other observations The result is the same whether guest RAM comes from mmap(MAP_PRIVATE | MAP_ANON), mmap(MAP_SHARED | MAP_ANON), mach_vm_allocate, or a named memory entry (mach_make_memory_entry_64 with MAP_MEM_NAMED_CREATE) mapped twice, with one view passed to hv_vm_map and the other used by the host. footprint region totals ("Footprint:" / Dirty) count only pages the host touched. When only the guest wrote 2 GB, the regions showed about 3 MB while phys_footprint showed 2,051 MB. So neither number shows real usage once both sides touch memory. System-wide anonymous memory (host_statistics64, internal_page_count + compressor_page_count) does not grow when the guest writes pages the host already wrote. That suggests this is accounting only, not a second physical copy. Parallels describes the same symptom for its VMs (https://kb.parallels.com/en/128437). Questions Is this double accounting expected for memory mapped with hv_vm_map, or is it a bug? If it's a bug, I'll file it in Feedback Assistant with this reproducer. Is there a supported way to allocate or map guest RAM so each physical page is charged to the process once? For example, a ledger tag, memory-entry ownership, or an hv_vm_map / hv_vm_allocate option. Is phys_footprint the right input for memory-pressure decisions (jetsam) for a VM process? Could the double count make such a process look larger than it is to the system? What is the recommended way to report a VM process's real memory use to users? Thank you.
Replies
2
Boosts
0
Views
340
Activity
1w
Virtualization.framework VM execution ownership and crash reclamation on Intel macOS Monterey
Subject: Virtualization.framework VM execution ownership and crash reclamation on Intel macOS Monterey Hello, I’m investigating the lifecycle guarantees of Virtualization.framework on Intel macOS Monterey 12.7.x. The specific scenario is a VZVirtualMachine running a Linux guest. I need to understand the ownership and reclamation behavior when the process holding the VZVirtualMachine is abruptly terminated without calling stop() or performing normal cleanup. The key questions are: For a specific VZVirtualMachine on Intel macOS Monterey, which userspace task/process actually owns the Hypervisor VM and the vCPU threads backing guest execution? Is Hypervisor execution owned directly by the calling process, or by a separate process such as: com.apple.Virtualization.VirtualMachine or another Virtualization.framework backend? If the process holding the VZVirtualMachine is terminated with SIGKILL or crashes without executing cleanup code, is the underlying guest execution context necessarily destroyed? More specifically: Can guest vCPU execution continue after the client process has died? If a separate backend process owns the VM, is that backend guaranteed to terminate or destroy the VM when the client dies? Does this behavior apply to Intel macOS Monterey 12.7.x, or only to newer macOS releases? Is there a supported diagnostic on Monterey that can map one specific VZVirtualMachine instance to the task/process that actually owns its Hypervisor VM/vCPU execution? For example, would a diagnostic showing Hypervisor execution frames such as hv_vcpu_run in a process, combined with a reliable process-exit notification, be sufficient to establish that ownership relationship? If the Virtualization backend can survive the client process, what supported VM-specific recovery or termination mechanism is available to another process? The security property I need to establish is intentionally narrow: If the userspace owner of a VM is abruptly destroyed, guest computation must not be able to continue indefinitely as an independent execution domain. Persistent disk files or other inert VM artifacts are not the concern; the question is specifically about live guest/vCPU execution and its ownership lifecycle. I’m looking for the supported architectural contract or diagnostic approach, not undocumented implementation details. Target environment: macOS Monterey 12.7.x Intel x86_64 Virtualization.framework Hypervisor.framework Hardware virtualization available No private APIs or privileged/kernel extensions Thank you.
Replies
6
Boosts
0
Views
588
Activity
3w
Direct9 / Support faster floating point instructions - xrosetta87
As the title states, I’ve been trying to emulate some older Direct9 games, and rosetta can’t handle it because of that https://github.com/WineAndAqua/rosettax87 I’ve had to use this, but it really seems like something that I shouldn’t have to do I’ve tried Wineskin, wine, D9VK, MoltenVK, GPTk, and the only thing that’s close to working is using devel wine + d9vk with the xrosetta87 running like its a VPN, and then you play Without xrosetta87 it’s 0-0.5 FPS? with it, it’s like a buttery smooth 60+
Replies
1
Boosts
0
Views
1.1k
Activity
Jan ’26
New Virtualization features in macOS Tahoe
I'm pleased to share some significant updates that have recently been released for our Hypervisor and Virtualization frameworks. We've focused on enhancing efficiency, expanding capabilities, and addressing common developer needs. I believe these will be valuable for many of you. Here’s a look at what’s new: Hypervisor Updates We've introduced support for configuring the intermediate physical address (IPA) memory granularity of a VM. This allows for more granular memory mappings, enabling granularity sizes down to 4KB. This is particularly useful for certain specialized device drivers requiring finer memory control. Virtualization Framework Updates More Efficient VM Image Storage with ASIF: We've integrated support for the Apple Sparse Image Format (ASIF). This results in a smaller disk footprint and optimized transfer for VM disk images when using VZDiskImageStorageDeviceAttachment, improving storage efficiency. Custom Network Topologies with vmnet: We've added support for vmnet custom network topologies. This enables more flexible VM-to-VM communication based on logical networks with customized configurations, useful for complex testing or development environments. See VZVmnetNetworkDeviceAttachment to get started. Simplified VM Queue Discovery: It's now easier to discover a VM’s on-process thanks to a new property on VZVirtualMachine. This should aid in development and debugging when interacting directly with the VM's queue. These are some of the key highlights of the first beta, and I'm looking forward to seeing how these improvements will be utilized. I encourage you to explore the documentation for full details on these features.
Replies
3
Boosts
3
Views
1.4k
Activity
Jan ’26
Virtualization.framework - Request stop?
Hi! I'm trying to figure out what mechanism request stop sends to the guest to actually request a stop. It doesn't appear that Virtualization.framework implements any ACPI bits relating to power buttons, so unclear how a linux VM would detect that a request has been stopped. I don't see any documentation around what devices are implemented by Virtualization.framework either, in terms of things like realtime clock, etc. Thanks for any help!
Replies
2
Boosts
0
Views
1.9k
Activity
Jan ’26
Hypervisor Framework on MacOS 26
I have a Hypervisor Framework App that works on MacOS 14 and 15 but fails on MacOS 26. To reproduce: hv_vm_config_t vm_config = hv_vm_config_create(); result = hv_vm_create(vm_config); result == HV_DENIED /* (0xfae94007) */ (from per the header file - not present on the online documentation) com.apple.security.hypervisor is set, no other VMs are running (no Virtualization Framework and no Hypervisor Framework). I have tried various entitlements with no success. Sandbox is off.
Replies
1
Boosts
0
Views
1k
Activity
Nov ’25
Is it possible to create a virtual NPU device on macOS using Hypervisor.framework + CoreML?
Is it possible to expose a custom VirtIO device to a Linux guest running inside a VM — likely using QEMU backed by Hypervisor.framework. The guest would see this device as something like /dev/npu0, and it would use a kernel driver + userspace library to submit inference requests. On the macOS host, these requests would be executed using CoreML, MPSGraph, or BNNS. The results would be passed back to the guest via IPC. Does the macOS allow this kind of "fake" NPU / GPU
Replies
1
Boosts
0
Views
1.3k
Activity
Aug ’25
Request for improved graphics support on MacOS guests (VMs)..
Hi, been exploring macOS VM on both Parallels and UTM and they lack some "GPU/graphics" things vs native MacOS which could be useful on some situations (testing some non trusted graphics apps on a Mac VM) so providing similar usefulness as Windows Sandbox.. Current limitations: 1)In MacOS VM night mode doesn't work.. 2)HDR support isn't exposed even when enabling HDR on host 3)missing GPTK support for the Paravirtual GPU (Paravitual GPU supports Metal but isn't enough for GPTK to work which complains about unsupported GPU).. 4)OpenCL is supported but only the CPU device.. so expose GPU device in addition to current CPU only device.. 5)OpenGL only supports the software renderer.. I assume OpenGL driver on Apple M1-4 GPUs being Metal based, and being Metal supported no reason for software renderer only thanks..
Replies
2
Boosts
0
Views
1k
Activity
Apr ’25
2 Requests for Rosetta: support BMI1/2 and F16C and support also AVX1/2 on Rosetta Linux..
Hi, REQUEST 1: seems Microsoft is ahead of Apple in X86 ARM emulation support at least in features supported.. see: https://blogs.windows.com/windows-insider/2024/11/06/announcing-windows-11-insider-preview-build-27744-canary-channel/ x64 emulated applications through Prism will now have support for additional extensions to the x86 instruction set architecture. These extensions include AVX and AVX2, as well as BMI, FMA, F16C BMI1/2 and F16C aren't yet supported by Rosetta.. would be useful for games like Alan Wake 2.. so asking for Rosetta equaling features to Prism emulator.. REQUEST 2: there is no way to currently enable AVX1/2 on Rosetta Linux.. on macOS using export ROSETTA_ADVERTISE_AVX=1 does the trick.. but not on Linux VM's.. tested setting this via: /bin/launchctl setenv ROSETTA_ADVERTISE_AVX 1 on Mac before VM launch and inside Linux VM but AVX2 isn't exposed..
Replies
3
Boosts
1
Views
2.5k
Activity
Apr ’25
Request for Rosetta: support optionally faster x87 emulation (via some env variable similar to AVX) like Rosettax87 project..
Hi, Since recently there is interest in having faster x87 translation speeds than Rosetta offers.. mainly some old PC games getting stuck at less than 5fps using Wine that uses Rosetta..( some world of warcraft game for ex.).. so main case right now, is games using old fmodex library versions (dll or statically)that uses heavy x87 instructions for audio processing , and such games not being threaded ,stalls the render threead, which is the same thread.. Luckily there is a hack, see: https://github.com/Lifeisawful/rosettax87 ”This is an experimental project that modifies Apple's Rosetta technology to use less precise but significantly faster x87 instruction handlers. The benchmarks show approximately 4-5x performance improvement for x87 floating-point operations.” but limitations are: 1)it runs only on specific Mac version (15.4.1) due to searching some fixed offsets in current rosetta library that may change with mac updates.. 2)requires to run two binaries (a server and the launcher program).. 3)currently doesn’t seem to accelerating x87 instruction on Linux programs/binaries i.e. lacking support for Rosetta on Linux if Apple supports similar technology, it could providing some enviroment variable like ROSETTA_FAST_X87 for enabling/disabling this fast emulation similar to how Rosetta AVX support not enabled by default.. thanks..
Replies
3
Boosts
0
Views
704
Activity
Apr ’25
What Linux distros are supported by mac OS virutalization framework
I have developed an app to create and run virual machines using mac os virtualization framework for apple siicon and intel macs. I have tried ubuntu, fedora, debian & linux mint distros and they all worked fine with intel macs. But when i try to run other distros like mx linux, manjaro, pop os, endevour os etc on intel mac they all on booting iso just shows the black screen. is there any list of officilay support linux distros for intel macs and apple silicon. the support of linux distros are fairly limited or am i missing something.
Replies
2
Boosts
0
Views
558
Activity
Apr ’25
Calling "hv_vm_config_set_el2_enabled(config, true)" but vCPU still starts in EL1
I'm testing the newly introduced nested virt API from Hypervisor.framework on an M3 Pro running 15.3.1. First, I'm calling "hv_vm_config_get_el2_supported" to confirm the system supports nested virt, then "hv_vm_config_set_el2_enabled" to enable EL2 in the configuration and finally "hv_vm_config_get_el2_enabled" to confirm it's enabled. After creating the VM with this configuration, I've confirmed with assembly code (checking CurrentEL) that the vCPU is still starting in EL1. Something has definitely changed in the vCPU management, because SMCCC calls that worked fine without calling "hv_vm_config_set_el2_enabled" now trigger an "EC_INSNABORT", but from the guest perspective the vCPU is definitely still in EL1. Is there an additional requirement in addition to calling to "hv_vm_config_set_el2_enabled" to make the vCPU start in EL2?
Replies
2
Boosts
0
Views
677
Activity
Mar ’25