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)
Virtualization
RSS for tagCreate hardware-accelerated virtual machines to run macOS and Linux-based operating systems.
Posts under Virtualization tag
53 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
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?
This morning I installed podman on my new Apple laptop. It can be inited successfully but failed to start.
The error is: Error: Error Domain=VZErrorDomain Code=1 Description="Internal Virtualization error. The virtual machine failed to start." UserInfo={
NSLocalizedFailure = "Internal Virtualization error.";
NSLocalizedFailureReason = "The virtual machine failed to start.";
My new Mac laptop with the latest OS version: 15.3.1 and it is Apple M4 chip.
I verified that my Virtualization.framework is good by ls -l /System/Library/Frameworks/Virtualization.framework also my MacOS support virtualization because sysctl kern.hv_support returns kern.hv_support: 1.
I tried to install it on my old Apple laptop which is intel core, same OS version - everything is good.
How to fix this issue?
Windows 10 使用 VirtualBox 创建的 Monterey 12.6.7 macOS 虚拟机不能识别到 iPhone 7 手机。
iPhone 7 已经连接到电脑主机 (win 10) 的 USB 3.0 口子,手机已经信任电脑。
在 win 10,我看到了 “此电脑\Apple iPhone”,就是说,宿主机识别到了 手机。
现在,开启macOS 虚拟机,虚拟机右下角的 usb 图标,显示并且勾选到了 "Apple Inc. iPhone [0901]",但虚拟机还是没看到手机设备,导致 Xcode 也看不到手机设备。
虚拟机运行后,插拔 iPhone 7 手机,通过
sudo log show --predicate 'eventMessage contains "usbmuxd"' --info
看到了报错信息:
2025-02-13 10:31:06.541201+0800 0xa3c Error 0x0 0 0 kernel: (Sandbox) 1 duplicate report for System Policy: usbmuxd(22583) deny(1) file-write-mode /private/var/db/lockdown
2025-02-13 10:31:07.090321+0800 0xf807 Error 0x0 140 0 sandboxd: [com.apple.sandbox.reporting:violation] System Policy: usbmuxd(22583) deny(1) file-write-mode /private/var/db/lockdown
Violation: deny(1) file-write-mode /private/var/db/lockdown
Process: usbmuxd [22583]
Path: /usr/local/sbin/usbmuxd
Load Address: 0x10564b000
Identifier: usbmuxd
Version: ??? (???)
Code Type: x86_64 (Native)
Parent Process: sudo [22582]
Responsible: /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
User ID: 0
Date/Time: 2025-02-13 10:31:06.793 GMT+8
OS Version: macOS 12.6.7 (21G651)
Release Type: User
Report Version: 8
MetaData: {"vnode-type":"DIRECTORY","hardlinked":false,"pid":22583,"process":"usbmuxd","primary-filter-value":"/private/var/db/lockdown","platform-policy":true,"binary-in-trust-cache":false,"path":"/private/var/db/lockdown","primary-filter":"path","action":"deny","matched-extension":false,"process-path":"/usr/local/sbin/usbmuxd","file-flags":0,"responsible-process-path":"/System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal","flags":21,"platform-binary":false,"rdev":0,"summary":"deny(1) file-write-mode /private/var/db/lockdown","target":"/private/var/db/lockdown","mount-flags":76582912,"profile":"platform","matched-user-intent-extension":false,"apple-internal":false,"storage-class":"Lockdown","platform_binary":"no","operation":"file-write-mode","profile-flags":0,"normalized_target":["private","var","db","lockdown"],"file-mode":448,"errno":1,"build":"macOS 12.6.7 (21G651)","policy-description":"System Policy","responsible-process-signing-id":"com.apple.Terminal","hardware":"Mac","uid":0,"release-type":"User"}
Thread 0 (id: 63477):
0 libsystem_kernel.dylib 0x00007ff80d8368ae __chmod + 10
1 usbmuxd 0x000000010565584e main + 3582 (main.c:816)
2 dyld 0x0000000114e3f52e start + 462
Binary Images:
0x10564b000 - 0x10565afff usbmuxd (0) <0fc9b657-d311-38b5-bf02-e294b175a615> /usr/local/sbin/usbmuxd
0x114e3a000 - 0x114ea3567 dyld (960) <2517e9fe-884a-3855-8532-92bffba3f81c> /usr/lib/dyld
0x7ff80d832000 - 0x7ff80d869fff libsystem_kernel.dylib (8020.240.18.701.6) /usr/lib/system/libsystem_kernel.dylib
2025-02-13 10:35:39.751714+0800 0x27f Default 0x0 0 0 kernel: (Sandbox) Sandbox: usbmuxd(119) allow iokit-get-properties kCDCDoNotMatchThisDevice
2025-02-13 10:35:45.025063+0800 0x27f Default 0x0 0 0 kernel: (Sandbox) Sandbox: usbmuxd(119) allow iokit-get-properties kCDCDoNotMatchThisDevice
After upgrading the virtual machines used for building and testing our macOS application, it seems that something new in Sequoia is preventing virtual machines from running anything signed with a Mac Development certificate.
At first glance the issue seems very similar to this thread, but it could be unrelated. We are using the tart toolset to build and run our VMs. People seem to be having related issues there with Sequoia in particular.
I have added the VM's hardware UUID to the Devices list of our account. I have included that device in the devices list of our Mac Development provisioning profile. I have re-downloaded the profile, ensured that it is properly getting built into the app, and ensured that the hardware UUID of the VM matches the embedded provisioning profile:
Virtual-Machine App.app/Contents % system_profiler SPHardwareDataType | grep UUID
Hardware UUID: 0CAE034E-C837-53E6-BA67-3B2CC7AD3719
Virtual-Machine App.app/Contents % grep 0CAE034E-C837-53E6-BA67-3B2CC7AD3719 ../../App.app/Contents/embedded.provisionprofile
Binary file ../../App.app/Contents/embedded.provisionprofile matches
However, when I try to run the application, it fails, and while I have searched the system logs to find a more informative error message, the only thing I can find is that the profile doesn't match the device somehow:
Virtual-Machine App.app/Contents % open ../../App.app
The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x6000039440f0 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}
Virtual-Machine App.app/Contents % log show --info --debug --signpost --last 3m | grep -i embedded.provisionprofile
2025-01-21 16:33:32.369829+0000 0x65ba Error 0x0 2872 7 taskgated-helper: (ConfigurationProfiles) [com.apple.ManagedClient:ProvisioningProfiles] embedded provisioning profile not valid: file:///private/tmp/builds/app/.caches/Xcode/DerivedData/Build/Products/Debug/App.app/Contents/embedded.provisionprofile error: Error Domain=CPProfileManager Code=-212 "Provisioning profile does not allow this device." UserInfo={NSLocalizedDescription=Provisioning profile does not allow this device.}
I don't understand why the provisioning profile wouldn't allow the device if the hardware UUID matches. I have also attempted to add the Provisioning UDID in the devices list instead, but the form rejects that value because it's a different format (the form specifically requests a hardware UUID for macOS development, and a provisioning UDID for everything else).
If there is any debugging tool that lets me check a provisioning profile against the running hardware and print a more verbose reason for why it's not allowed on the device, please let me know.
Otherwise I'd have to conclude that, since I haven't experienced this issue before on an earlier OS, it has something to do with virtual machines running macOS Sequoia. (The same Mac Development-signed application runs just fine on my MacBook Pro running 15.2, as well as the VM host, which is also running 15.2.) I have also tried resetting the VM's hardware UUID and adding that one to the devices list, to no effect.
This is obviously seriously impacting our CI/CD pipelines to allow for proper UI testing of our application. If anyone is aware of any workarounds, I would love to hear them!
Hi everyone!
I'm developing a system where an application running in a VM communicates with the host operating system's components using vsock sockets (VZVirtioSocketDevice in Virtualization.framework). Both systems are running macOS. There may be multiple guests, and the existing implementation for other OSes relies on VM's CID to differentiate them.
In macOS, getting the CID from inside the guest VM is straightforward—it is returned by IOCTL_VM_SOCKETS_GET_LOCAL_CID.
However, in macOS the regular vsock API is not available on the host side, replaced by Virtualization.framework. I could not find anything in the Virtualization.framework's documentation that could be used to query (or set?) the CID for the specific virtual machine instance (which is certainly possible on other platforms utilizing Virtio drivers, e.g. Linux/QEMU). Am I overlooking something?
I can see that a MacOS VM guest running on top of an Apple Silicon MacOS host has GPU acceleration - indicating GPU sharing capabilities for the hardware.
Is there also a way to have GPU acceleration in Linux guests (with Vulkan/Mesa drivers)?
I am trying to play with the sample code that you provided to run the fedora distribution. However, when I compiled it with swift terminal, I get the following error.
error: 'VZVirtualMachineConfiguration' is only available in macOS 11.0 or newer
How can I instruct swift to fetch the proper framework?
PS: I am running all from my terminal, I am not an IDE user
Following the presentation from 2022 https://developer.apple.com/videos/play/wwdc2022/10002/ that show how to create a MacOs virtual machine, I was wondering if there was a way to share the clipboard between the host and the VM create?
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?
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.
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?
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?
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?
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..
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
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.
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..
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
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?
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
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!)