Create macOS or Linux virtual machines

RSS for tag

Discuss the WWDC22 Session Create macOS or Linux virtual machines

Posts under wwdc2022-10002 tag

12 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
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
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
2 Replies
244 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
191 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
.