Virtualization

RSS for tag

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

Virtualization Documentation

Posts under Virtualization tag

17 Posts
Sort by:
Post not yet marked as solved
2 Replies
72 Views
Hi, I run the RunningMacOSInAVirtualMachineOnAppleSiliconMacs to build the VM and I get the error ".swift:119: Fatal error: Internal Virtualization error. Installation failed." when it go to install step. I am using M1 Mac Studios and MacOS Monterey 12.4 Thanks, Gavin
Posted Last updated
.
Post not yet marked as solved
2 Replies
124 Views
System details MacBook Pro macOS Monterey: 12.4 Chip: Apple M1 Max Mem: 32 GB Language & Region config Primary Language: English Secondary Langauge: Polish STR: goto https://developer.apple.com/documentation/virtualization/running_linux_in_a_virtual_machine?language=objc download recommended https://fedora.cu.be/linux/releases/36/Everything/aarch64/os/images/pxeboot/ Build it in XCode run LinuxVirtualMachine passing downloaded pxeboot files Result: Failed to start the virtual machine. Error Domain=VZErrorDomain Code=1 "The virtual machine failed to start." UserInfo={NSLocalizedFailure=Internal Virtualization error., NSLocalizedFailureReason=The virtual machine failed to start.}
Posted Last updated
.
Post not yet marked as solved
1 Replies
118 Views
Hi, I am trying the GUILinuxVirtualMachineSampleApp.xcodeproj to build the Linux VM to also take advantage of the Rosetta in there. However, I get some errors compiling the sample app. Cannot find 'VZGenericMachineIdentifier' in scope I have the Macbook Pro M1 laptop with MacOS Monterey 12.4 Thanks, Saeed
Posted
by hashe038.
Last updated
.
Post not yet marked as solved
4 Replies
462 Views
The new Virtualization framework (and sample code!) are great. It's a lot of fun to run the sample code and quickly fire up multiple VMs of macOS running as a guest. However, the inability to authenticate with any iCloud services is a significant roadblock. Xcode, for example, is not allowing me to authenticate my developer account. Are there any plans to resolve this issue so that iCloud accounts can be authenticated from within a VM?
Posted
by kennyc.
Last updated
.
Post not yet marked as solved
1 Replies
98 Views
Is there a way to boot macos in a virtualization env without using the "startUpFromMacOSRecovery" flag which is only available on MacOS 13+? I want to disable SIP (System Integrity Protection). If there is another way to do that, please suggest. Thank you!
Posted
by Yousifa.
Last updated
.
Post not yet marked as solved
1 Replies
136 Views
Most of the time I find myself asking the question why something doesn't work when I had reasonable expectation that it would. In this case I find my self asking why something worked when I had NO expectation that it would! It is well known that Apple's virtual machine sample code does not support authentication with Apple services: iCloud, iTunes, Developer, etc. So it was a great surprise when I attempted to update Ventura beta 1 to beta 2...IT WORKED! System Update was able to authenticate with the Developer Beta Seed program and determine that my VM was enrolled and the update was applied without any issue. Can anyone tell me why this worked while other attempts to authenticate fail?
Posted
by Buzz.
Last updated
.
Post not yet marked as solved
0 Replies
81 Views
I'm posting this here hoping somebody may have some ideas for solutions, or if they can point me to any useful resources. We want to be able to customise macOS installations created from the Virtualization framework for the purposes of driving automated testing of our software. In an ideal world these Virtual Machines become very much transitory, where they can be removed once they are finished with. My company writes security software for enterprise customers leveraging the Endpoint Security framework, and one of the ways in which we ease the pressure on our QA team during regression testing is to use a lot of automation. Given that the nature of automation testing is that you test systems against known configuration states, we have always made heavy use of Virtualized environments to ensure our test results are reliable. With the progression of macOS over time it has made it ever more difficult to reduce the amount of manual setup required to ensure the virtualized macOS installation is in a ready state to begin testing. For example, we currently have to join virtualized macs to an MDM server simply to be able to install configuration profiles that pre-authorize system extensions, or to send PPPC payloads to ensure our automation framework can work without the user having to manually approve PPPC requests for Accessibility access. We also then have to manually install the test harness in the virtualized mac as there is no way for us to mount the disk image after OS installation (you can almost do this, but you cannot unlock the APFS volume due to needing to know a passphrase to unlock said disk which I presume the Virtualization framework has safely stored somewhere in a Keychain on the host system) We would like some solution to being able to place configuration profiles in to a Virtualized mac (we would be happy for this to be available to Apple Silicon platform only, ignoring Intel) without having to involve an MDM, or as a next best thing, some way of instantiating the enrollment with an MDM from the host side, rather than the guest side, so that it behaves more similarly to DEP auto enrollment. As things stand right now, there is no possibility of us using what would be our preferred solution of an IaC style definition declaring software test suite, and OS version to be created to run the tests, because we always have to instantiate test hosts manually by joining them to an MDM to deploy configuration profiles, and to install the test runner.
Posted Last updated
.
Post not yet marked as solved
10 Replies
499 Views
I have been building virtual machines and running macOS 12 & 13 on them for over a week now using the "macOSVirtualMachineSampleApp" referenced in wwdc2022-10002 session "Create macOS or Linux virtual machines", but not without some initial issues and only after considerable sleuthing. I need someone to explain what's going on. I followed the instruction given at: "https://developer.apple.com/documentation/virtualization/running_macos_in_a_virtual_machine_on_apple_silicon_macs" I ran "InstallationTool-Swift" and it created "VM.bundle" in my home directory as per the documentation. However... Running "macOSVirtualMachineSampleApp-Swift" the VM fails to load and the app returns :"Thread 1: Fatal error: Missing Virtual Machine Bundle at /Users/myUserName/Library/Containers/com.example.apple-samplecode.macOSVirtualMachineSampleAppBA8MNGZ7WS.macOSVirtualMachineSampleApp/Data/VM.bundle/. Run InstallationTool first to create it." The app seems to have created a series of nested folders in myUserName/Library/Containers/ and is looking for "VM.bundle" there! Only after I copy "VM.bundle" to the location above will the VM load and run without issue. "Path.swift" sets vmBundlePath = NSHomeDirectory() + "/VM.bundle/" and one would think "macOSVirtualMachineSampleApp" would look for it there. Why isn't it? What am I missing? Where in the code in "vmBundlePath" is being changed if that is in fact what's happening? I want to teak the code so that when the installer creates "VM.bundle", the app runs it from there. NOTE: "vmBundlePath" cannot be set to the location where "macOSVirtualMachineSampleApp" currently wants to find it because only after that app runs does the path get created but the installer needs that path to create the bundle.
Posted
by Buzz.
Last updated
.
Post not yet marked as solved
5 Replies
307 Views
Hello after trying installing a virtual macOS via virtualOS from the Mac App Store, I always get this error: Error: Install failed: Error Domain=VZErrorDomain Code=1 "Installation failed." Userinfo={NSLocalizedFailure=Internal Virtualization error., NSLocalizedFailureReason=Installation failed., NSUnderlyingError=0x600001c55980 {Error Domain=VZErrorDomain Code=1 " (null)"}} It seems the issue is with the VZMacOSInstaller object. What can be the problem, that this error occurs? It happens on a Mac Studio M1 Max running macOS 12.4. Thank you. Best Stefan
Posted
by becreart.
Last updated
.
Post not yet marked as solved
1 Replies
144 Views
I know how to use Virtualization now But I don't know how to write interface in AppKit So I should find a way to embed a NSView(the VM's UI) in a SwiftUI View However I couldn't find any reference on how except NSViewRepresentable which, of course, will not work I know there must be a easy way to do this But I'm just can't find it... any help is appreciated
Posted Last updated
.
Post not yet marked as solved
2 Replies
242 Views
My device is MacBook Pro 13-inch, M1, 2020 Use source code provided by article https://developer.apple.com/documentation/virtualization/running_gui_linux_in_a_virtual_machine_on_a_mac When installing Debian, Fedora or Ubuntu, installation process can stuck at any point and cause the installation failed. Even if it is lucky enough to pass the installation phase, stuck could still happen at any time when the virtual machine is started. It seems that there is some low level error that cause the Linux kernel panic, while during this process error seems to be accumulated--it starts with some user level application in Linux starts to behave weirdly, such as sudo does not authenticate a valid user, apt can not run properly, then Linux kernel panic. Sometimes it behaves like the VM get stuck where it is not sure what happened inside it. I can't provide more detail as it happens randomly and the phenomenon differs each time. While generally it appears to be an accumulated error and eventually the VM get stuck.
Posted
by mark07.
Last updated
.
Post marked as solved
1 Replies
190 Views
When SandBox is turned on, /Library/Apple/usr/libexec/oah/RosettaLinux is blocked by SandBox which cause the Rosetta file sharing to be failed. A possible solution is to manually ask user to select /Library/Apple/usr/libexec/oah/RosettaLinux in the file importer so that the app is allowed to access the corresponding path.
Posted
by mark07.
Last updated
.
Post not yet marked as solved
1 Replies
225 Views
Hi, i'm trying to follow the steps from the Virtualization WWDC22 session. The sample app provided works ok "as is", but if I use the same APIs in my own app (i.e. a project I started from scratch), I get errors such as Internal Virtualization error. Installation service returned an unexpected error. when downloading the "best supported" image via VZMacOSRestoreImage.fetchLatestSupportedWithCompletionHandler, and Internal Virtualization error. Unable to connect to installation service. if I try and install one I downloaded myself. I did add the <key>com.apple.security.virtualization</key> <true/> entitlement to my own app and (since this is arm), it is codesigned (with -) . But could it be that there is some other application-level flag or setup needed to enable virtualization use? Since I'm calling the exact same APIs, and neither seem to depend on much prior setup I could get wrong, it seems weird that they work in the sample app but not when called from my own app... Ideas? thanx!
Posted
by dwarfland.
Last updated
.
Post not yet marked as solved
1 Replies
262 Views
I've seen this video - https://developer.apple.com/videos/play/wwdc2022/10002/ It seems to me that using the Virtualization framework, I can create an application similar to VirtualBox or Gnome Boxes. Is there any other use case for the Virtualization framework? If that would be the only kind of application for it, isn't one virtualization app enough? I mean, wouldn't it make more sense for Apple to release a GUI on top of the Virtualization framework, a kind of VM Manager, similar to VirtualBox? Why do developers actually need to play with such kind of code?
Posted
by Loreno.
Last updated
.