Virtualization

RSS for tag

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

Posts under Virtualization tag

55 Posts
Sort by:

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
1.6k
Oct ’23
[azure devops and Github runners] AVPIdentity: AppleVirtualPlatformHostKey.mm:234: Assert: platformExpert, value: 0
Description When starting the iOS simulators on macOS-15 intel image, the following assertion happens: The same issue not showing for macOS 15-arm64 image. Here is the issue details: https://github.com/actions/runner-images/issues/10925 raised by multiple users. AVPIdentity: AppleVirtualPlatformHostKey.mm:234: Assert: platformExpert, value: 0 AVPIdentity: AppleVirtualPlatformHostKey.mm:234: Failed to get AppleVirtualPlatformARMPE service. The Simulators worked fine the day before the above issue was posted. What changed? Did something update?
3
3
329
1w
VZ Linux boot from ISO while providing kernel parameters
Hi, I'm new to the forum, trying to learn Swift by doing a small CLI application that helps running Linux VMs on Apples Virtualization Framework. I've posted this question almost verbatim from the forums on swift.org, and was kindly directed here. My intention is to create VMs with ISO files, but enable output only via serial console, without a virtual graphics card. I know this might not be feasible, but it was the idea I had and I wanted to see if it is doable. So far I have managed to boot an Alpine Linux via kernel and ramdisk and the VZLinuxBootLoader. One crucial step is to provide VZLinuxBootLoader.commandLine to tell the kernel to activate output on the virtual console port, like console=hvc0. But booting an ISO with VZLinuxBootLoader is not possible if I'm not mistaken and the other option is VZEFIBootLoader, which doesn't support kernel parameters. Now, I'd like to try and mix both boot loaders by subclassing VZLinuxBootLoader and implementing all that is required to boot an ISO file. But if I look at the implementation these two classes are relatively sparse: @available(macOS 11.0, *) open class VZLinuxBootLoader : VZBootLoader { public init(kernelURL: URL) open var kernelURL: URL open var commandLine: String open var initialRamdiskURL: URL? } and @available(macOS 13.0, *) open class VZEFIBootLoader : VZBootLoader { public init() open var variableStore: VZEFIVariableStore? } I've cut out comments to keep it brief. I expected to find some implementation details for what makes these classes distinct from each other (as they both inherit VZBootLoader), hoping to be able to copy/paste a few methods here and there and try my luck passing some kernel args into the ISOs kernel. Is something similar possible? Am I in the right spot? I'd really appreciate some feedback and maybe some pointers to the right direction. Maybe someone can also give me some details or links to documentation why the two classes contain practically no implementation code? Thanks in advance, and have a great day.
3
0
185
2w
Can't login to Xcode
Hello! I am currently experiencing a problem similar to what was reported here: https://developer.apple.com/forums/thread/767673 The account information is most certainly not the problem, but I am still getting the error: There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn't be read because it isn't in the correct format Is the mentioned problem still not resolved? If it is not, could you please provide an estimated date for a fix? Are there any workarounds for this issue?
1
0
198
2w
What is the right procedure for asking for entitlements ?
I want to use the com.apple.vm.networking entitlement which has a note: This entitlement is restricted to developers of virtualization software. To request this entitlement, contact your Apple representative. https://developer.apple.com/support/technical/ says: « Request entitlements using entitlement forms and ask for status updates in the resulting email thread. » but I haven't been able to find these "entitlement forms". Does anyone know what the right process is to request an entitlement?
1
0
181
2w
Xcode running in VM cannot load Apple account information
Hello! I'm running MacOS 15.1.1 virtual machine on MacBook M2 Sequoia 15.1.1. While trying to add Apple account in Xcode 16.1 and it fails with error: Decoding Error There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn't be read because it isn't in the correct format. Account information is valid, it's the same account as I used to login in host system. It seems like issue reported here: https://developer.apple.com/forums/thread/767673 Is there any chance to fix this and get it working?
1
0
244
2w
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..
1
0
187
2w
No acc info in Xcode 16.1 in VM
I am using Mac Mini M2 with Sequoia 15.1 OS with Virtual Machine (Virtualization.Framework) with same OS. (almost same as here: https://developer.apple.com/forums/thread/767673) When adding my account in Xcode there is error with: Decoding Error. There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn’t be read because it isn’t in the correct format. Please fix that I can't see information like teams and so on
1
0
179
2w
Virtualization Framework with programmatic keyboard / pointing device.
I'm curious if there is a way to add a programmatically controlled keyboard and pointing device to a virtual machine created using Virtualization.framework (for the purposes of sandboxed automation). All of the types I've found in that framework have very little in the way of configurability and seem to be uniquely intended for use with a VZVirtualMachineView. On the other hand, Hypervisor.framework seems extremely low-level so I'm wondering if there is something in between the two I can use to achieve this.
1
0
177
2w
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..
1
1
250
2w
Developer account can't be added on a virtualised macOS using Virtualization framework
Dear Support Team, I constantly get a 401 unauthorised error, when I try to add my Developer account in Xcode while running a virutalised macOS using https://developer.apple.com/documentation/virtualization. So I can't use signing, entitlements, etc when building within a virutalised macOS. The error shown is below: There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn’t be read because it isn’t in the correct format. I've found probably the same issue here https://developer.apple.com/forums/thread/759877 Unfortunately, I can't find any updates. Are you aware of this problem? Are there any planned fixes in upcoming macOS updates? 15.0 (24A335) Version 16.1 (16B40) Apple M1 Pro, 16 GB Ram Best regards, Evgenii
1
0
257
2w
Troubleshooting "Decoding Error" in Xcode 16.2 on MacMini M1 with Sequoia 15.1
I'm working with a MacMini M1 running Sequoia 15.1 OS, and I've configured a Virtual Machine on this device using the Virtualization.Framework to operate with the same OS version. While I can sign into my account through System Settings without any problems, I encounter difficulties when trying to add my account to Xcode 16.2. Initially, the login appears to succeed, but Xcode quickly presents a "Decoding Error": There was an issue decoding the response: (HTTP 401, 60 bytes) The data couldn’t be read because it is not in the correct format. As a result, I'm unable to access any account details or team information. I found a similar issue but I don't think it was resolved, even if it's marked as such: https://developer.apple.com/forums/thread/767673 Is there an existing workaround?
1
0
197
2w
Rossetta Linux fails with recent kernels>=6.11
Hi, please see detailed findings on: https://github.com/utmapp/UTM/discussions/6799 basically apps that runned via Rosetta Linux now fail in kernels>=6.11 like the included in Ubuntu 24.10 with: /media/rosetta/rosetta hello assertion failed [hash_table != nullptr]: Failed to find vdso DT_HASH (Vdso.cpp:78 get_vdso_dynamic_data) Trace/breakpoint trap the issue seems to be due to this commit. https://github.com/torvalds/linux/commit/48f6430505c0b0498ee9020ce3cf9558b1caaaeb
2
1
200
Nov ’24
Nested Hyper-V Support for VM's
Hello! I am wondering about the status of Nested Hyper-V Support for VM's? This is specifically regarding this issue with Parallels Desktop, which claims the issue is on Apple's side: Parallels Article: https://kb.parallels.com/en/116239 Within the Article, the no longer accessible previous Apple discussion post for this issue (at least I cannot access it): https://discussions.apple.com/thread/255546412 Is this something that will be fixed and supported soon? Thank you! (If this should be posted somewhere else please just let me know where!)
1
0
190
Nov ’24
M4 devices - VMs pre 13.4 fail to boot
Hi, It seems that on M4 devices any virtual machine with macOS version older than 13.4 fail to boot, they stuck with a black screen. This is regardless of the virtualization software used (UTM, VirtualBuddy, Viable, etc...). After talking to many people everyone experiences the same. At least for me, this is a massive limitation of the platform, I really hope this is a bug which can be fixed. Thanks, Csaba
7
7
850
1w
macOS VMs created on 15.x hosts cannot run on 14.x hosts
We're creating macOS VMs on both 15.x and 14.x hosts and only the 14.x created VMs can run on both 15 and 14 hosts. If we create the VMs on 15.x, something is done by Virtualization that prevents it from running on 14.x. We've tried digging in and don't see anything that our code is doing that's special. What is Apple doing to the VMs created on 15.x hosts that's special here?
1
0
209
Nov ’24
Metal passthrough on intel VMs causes com.apple.screensharing.menuextra to crash and screensharing to exit
https://feedbackassistant.apple.com/feedback/15645457 Metal passthrough on intel VMs causes com.apple.screensharing.menuextra to crash and screensharing to exit Create a 15.1 VM with metal passthrough on 15.0.1 or 15.1 host, enable Screen Sharing, then try connecting to with VNC after restarting the machine. I'm using Anka to create the VM. You'll see VNC work (open vnc://192.168.64.3:5900), then a few seconds in show "Reconnecting...", then work, then go to "Reconnecting..." for ~5m until it eventually works consistently. You'll see launchd showing exits/failures (see screenshots) You'll see diagnostic reports showing things like: Thread 0 Crashed:: Dispatch queue: com.apple.RenderBox.Encoder 0 libsystem_kernel.dylib 0x7ff801da5b52 __pthread_kill + 10 1 libsystem_pthread.dylib 0x7ff801ddff85 pthread_kill + 262 2 libsystem_c.dylib 0x7ff801d00b19 abort + 126 3 libsystem_c.dylib 0x7ff801cffddc __assert_rtn + 314 4 Metal 0x7ff80d045d72 MTLReportFailure.cold.1 + 41 5 Metal 0x7ff80d01fa2a MTLReportFailure + 513 6 Metal 0x7ff80cfb74e0 +[MTLLoader sliceIDForDevice:legacyDriverVersion:airntDriverVersion:] + 200 7 Metal 0x7ff80cf265c9 +[_MTLBinaryArchive(MTLBinaryArchiveInternal) deserializeBinaryArchiveHeader:fileData:device:] + 89 8 Metal 0x7ff80cf10f0c -[_MTLBinaryArchive loadFromURL:error:] + 537 9 Metal 0x7ff80cf10288 -[_MTLBinaryArchive initWithOptions:device:url:error:] + 844 10 RenderBox 0x7ff9041a15fd RB::(anonymous namespace)::load_library_archive(NSBundle*,
1
1
242
Nov ’24
Xcode 16.1 can't load the Account information in VM
I have a MacMini M2 machine running Sequoia 15.1 OS. On this machine, I am running a Virtual Machine, utilizing the Virtualization.Framework, with the same OS version, 15.1. Logging into my account in the System Settings is successful. Next, I need to add my account in Xcode 16.1. While the initial login is successful, Xcode immediately displays the following error: Decoding Error. There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn’t be read because it isn’t in the correct format. As a result, I cannot see any account information, teams, etc. A very similar bug has been reported at this issue - https://developer.apple.com/forums/thread/759877, but there has been no progress or updates there. Is there any chance to fix this and get it working?
13
10
841
1w
Sending events to VZVirtualMachineView
I'm trying to send various user input events to a virtual machine. The app is built in SwiftUI, so the VZVirtualMachineView is part of a view controller wrapped in NSViewControllerRepresentable. Non-modified keystrokes and mouse clicks work fine, but I can't send modified keystrokes (e.g., ⌘F). These come through without the modifier (e.g., plain F). I also haven't been able to get mouse scroll wheel events to do anything in the VM. I installed a local event monitor with addLocalMonitorForEvents(matching:handler:). Before the VM boots and the VM view exists, typing myself generates events that I see with the monitor. After the VM boots, though, the monitor does not see any of my keystrokes. The monitor never sees any of my programmatically generated events. I am sending these all through NSWindow.sendEvent(_:). Is there anything special about VZVirtualMachineView that might affect how it handles injected events? It's obvious possible (likely) that I'm doing something wrong with how I build and/or send these events into the application. Can anyone point me to documentation or examples that aren't easily found through search engines?
8
0
401
Oct ’24