Virtualization

RSS for tag

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

Virtualization Documentation

Posts under Virtualization tag

38 Posts
Sort by:
Post not yet marked as solved
3 Replies
153 Views
https://developer.apple.com/documentation/virtualization/running_macos_in_a_virtual_machine_on_apple_silicon_macs I want to know whether I can launch the virtual machine using terminal. If so, what are the commands to do so? Does it require Xcode or Xcode Command Line Tools to be installed beforehand?
Posted
by joeljohnk.
Last updated
.
Post not yet marked as solved
1 Replies
162 Views
i.e. basically the same question as here: https://developer.apple.com/forums/thread/653009 (https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment#Determine-Whether-Your-App-Is-Running-as-a-Translated-Binary) is there any way to find this thing out under linux? i.e. the sysctl method of course does not work.
Posted
by schmitch.
Last updated
.
Post not yet marked as solved
7 Replies
1.4k 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
3 Replies
995 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 not yet marked as solved
3 Replies
697 Views
Given that the new iPads have M1 chips, would it be possible to use the virtualization framework on the on an iPad/iPhone? Though it is not currently listed as a possibility in the documentation, is it possible to modify any configuration settings to make it work in a mobile environment? I would like to run a virtual machine on an iPad/iOS to run python applications.
Posted
by mby2.
Last updated
.
Post not yet marked as solved
1 Replies
259 Views
Im playing a bit with Virtualization framework. I have problem starting Gentoo Linux on x86_64 machine. It shows EFI boot device selection screen, and after that black screen with just carriage (not blinking). Not sure how to check what is going on. I tried with different settings and devices. I think probably something is missing from Gentoo installer iso, that I need to add to the kernel? How would I learn what is missing?
Posted Last updated
.
Post marked as solved
3 Replies
290 Views
I have a Mac OS virtual machine (VM) on my Macbook Pro with M1 Pro chip. The VM was set up using Apple's sample code in https://developer.apple.com/documentation/virtualization. I wonder how I can enable an external USB microphone on it. The host can recognize and record with the microphone without a problem. The VM did recognize the microphone first time I plugged in, asked for permission, and was given permission. However, it doesn't show up on my sound setting.
Posted Last updated
.
Post not yet marked as solved
2 Replies
302 Views
I created a fresh SwiftUI project and added a button with no code. I built and ran the app and clicked the do nothing button. My app promptly crashed with the following complaint: validateComputeFunctionArguments:830: failed assertion `Compute Function(ciKernelMain): writes texture ([0]) whose usage (0x00) doesn't specify MTLTextureUsageShaderWrite (0x02)' Since the only unusual is that I am running under Parallels virtualization, it implies a conflict between it and a simple swift build.
Posted
by mauricev.
Last updated
.
Post not yet marked as solved
1 Replies
386 Views
I was wondering if there is any possibility to somehow implement compression of VZStorageDeviceAttachment like VZDiskImageStorageDeviceAttachment used for the VZVirtioBlockDeviceConfiguration. I know that APFS is doing some work here, but I would also wanto to be able to store attachments on other filesystems and still keep them use only the space required. From what I searched there is no other attachment that can be used instead, but maybe there are some clever tricks that could be done to achieve this? I don't think its possible to write own implementation of VZStorageDeviceAttachment correct?
Posted Last updated
.
Post not yet marked as solved
1 Replies
328 Views
I would like to use VZVirtualMachineView to display grid of previews for multiple Virtual Machines. The problem is that VZVirtualMachineView always captures mouse events, and hired host cursor when it's on top of it. Is it possible to somehow disable these behaviors for VZVirtualMachineView? So that cursor of the host is not hiding and guest on this view is not receiving any mouse events?
Posted Last updated
.
Post not yet marked as solved
7 Replies
1.7k Views
Hi, I use MacVM to install Ventura on a VM. With macOS Ventura beta 2 I have several problems that I would have liked to report via the "Feedback assistant" application. The problem is that the application refuses my Apple ID and display the message "An error occurred during authentication." To verify my Apple ID I logged into my developer account via Safari. I was able to do it with no problem.
Posted
by ZeTof.
Last updated
.
Post not yet marked as solved
1 Replies
604 Views
hello developers, First priority I couldn't find a proper title for the question :( The reason why I open a topic here is not to find the answer by direct point shooting; My goal is what do Apple, Developer, Companies and Devops teams think and comments about the subject I'm going to ask here? We use Jenkins as the Devops CI/CD tool at our company, and in Macos/Apple/iOS development, we use a lot of Mac Mini devices. Since we build/compilers on a project-based, version-based basis, we cannot get 100% efficiency from our devices. (For example, because the dependencies of a project are different from other projects; we dedicate only 1 Mac Mini to that project. (As the dependecys of the projects are too many and large, the migration process is very difficult for us, the cost of moving to a lower-level Mac Mini device is high / but this is just an example)) While researching, I saw that there is no docker container image for MacOs X (enterprise or legal) and I know about the Apple EULA. (For virtualization, Apple hardware must be used as a basis. Because the MacOs system is paid for on a device-based basis.) What I want to ask here is can I find or create a MacOs docker container image legally? How is the structure of other companies in their CI processes? If I install MacOs with more than one VMware/VirtualBox on Mac Mini, What harm could it do me in Jenkins? (I'm curious about people's comments on this.)
Posted Last updated
.
Post marked as solved
1 Replies
472 Views
Im learning about Virtualization framework from Apple, and Im currently trying to create an Arch Linux environment to run on top of it. Im still a bit confused about few concepts regarding how this works, so I gathered them into 3 sections. Kernel and Initial Ram Disk (initrd) usage. From what I learned to start Virtual Machine, I need to have extracted linuz and initrdfiles, and use them to create a bootloader. This is kind of different approach from other VMsolutions, but I think I get why it is. But to make sure few questions: Since Im loading the kernel and initramdisk at this step, I can extract exact files from my linux distribution disk image, and remove them from linux /boot folder right? And going forward since this is a bootloader, I don’t really need to install Grub to run it, right? Kernel and inited capabilities and format. Until now I was only able to run a single kernel and initrd - some Ubuntu cloud 20.04images downloaded from the internet. I tried also other versions of Ubuntu, and my own Arch build, but it usually ends with either some error or sometimes virtualMachine.start()returns success but after that nothing is happening. I think I need either to compile some required features into the kernel (but have no idea which) or have these files with some specific format. I noticed that when using file command on initrd I get different information about these files. For example, the one from Ubuntu that works for me is: LZ4 compressed data (v0.1-v0.9). The other one I tried, but didn’t work was Zstandard compressed data (v0.8+), Dictionary ID: None. Does that play a role here? If so how to prepare initrd in correct format? Virtual disk format. After booting into the environment I would like to perform Arch Linux installation on separate virtual disk, and later switch to use this disk as the main one. How should I prepare .img empty file to use? From Disk utility Im only able to prepare .dmg format. Can I use some other formats as well? And later how should I partition this disk? I was planning to create GTP partition table with just a single Linux ext4 partition. On other Virtual Machine I was also creating a 1MB partition for Grub, but I think this can be skipped here. Is that correct? Do I need initrd? I think that I will need to compile my own kernel to achieve nicely working environment. And this might be the good solution for me. If that's the case do I really need initrd at all? Would it be possible to create fully prepared kernel that boots without it? If so what features do I need to use in kernel config?
Posted Last updated
.
Post not yet marked as solved
3 Replies
918 Views
macOS Monterey iMac (21.5-inch, 2017) I had to erase my Mac because I was having problems with Xcode getting stuck installing in the App Store so I just decided to start fresh. I downloaded the current version of VirtualBox (7.0) and the proper iso for Kali and ParrotOS. Both of them will begin to start and load up then unexpectedly crash. I get the report and when I open it, it's basically issuing the same problem. I've seen different things about this in regards to apple specific apps like iTunes & Apple Library so I'm hoping someone with experience with this can kindly explain the steps I need to take to fix this. I'm currently in a networking program at the community college and would like to start my journey in cyber security as blue or red team though I still haven't decided. Thanks in advance! **Termination Reason:    Namespace TCC, Code 0  This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an com.apple.security.device.audio-input key with a string value explaining to the user how the app uses this data.**
Posted
by TQueen21.
Last updated
.
Post not yet marked as solved
1 Replies
563 Views
I want to create a linux vm by the  Virtualization framework on mac.And There are disk configure i should set. my code  VZDiskImageStorageDeviceAttachment *disc_sda = [[VZDiskImageStorageDeviceAttachment alloc]                             initWithURL:discURL                             readOnly:dinfo[i].readOnly error:nil];     if (disc_sda) {       VZVirtioBlockDeviceConfiguration *disc_conf = [[VZVirtioBlockDeviceConfiguration alloc]                             initWithAttachment:disc_sda];       discs = [discs arrayByAddingObject:disc_conf];     } else {       NSLog(@"--- Couldn't open disc%d at %@ (URL %@)\n", i, disc_path, discURL);     } The value of param discUrl is /dev/disk6.the info of the device. diskutil info /dev/disk6     Device Identifier:     disk6   Device Node:        /dev/disk6   Whole:           Yes   Part of Whole:       disk6   Device / Media Name:    ZVOL matpool/fromBin   Volume Name:        Not applicable (no file system)   Mounted:          Not applicable (no file system)   File System:        None   Content (IOContent):    GUID_partition_scheme   OS Can Be Installed:    No   Media Type:        Generic   Protocol:         Disk Image   SMART Status:       Not Supported   Disk Size:         10.7 GB (10737418240 Bytes) (exactly 20971520 512-Byte-Units)   Device Block Size:     512 Bytes   Media OS Use Only:     No   Media Read-Only:      No   Volume Read-Only:     Not applicable (no file system)   Device Location:      External   Removable Media:      Fixed   Solid State:        Yes   Virtual:          Yes and i put data to the disk from data.raw.If the discUrl is data.raw, the vm will create successfully. sudo dd if=/Users/zhangkeli/Downloads/data.raw of=/dev/disk6 but the follow info will be shown while i create the vm by the disk. Loading, please wait... Starting version 245.4-4ubuntu3.17 [  1.160420] virtio_blk virtio2: [vda] 0 512-byte logical blocks (0 B/0 B) [  1.176709] cryptd: max_cpu_qlen set to 1000 [  1.212226] AVX version of gcm_enc/dec engaged. [  1.212414] AES CTR mode by8 optimization enabled [  1.233134] virtio_net virtio0 enp0s1: renamed from eth0 [  1.764724] tsc: Refined TSC clocksource calibration: 2304.011 MHz [  1.765456] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x21360249f5a, max_idle_ns: 440795291588 ns [  1.766393] clocksource: Switched to clocksource tsc Begin: Loading essential drivers ... [  2.424787] raid6: sse2x4  gen() 17701 MB/s [  2.472679] raid6: sse2x4  xor() 11138 MB/s [  2.520689] raid6: sse2x2  gen() 16157 MB/s [  2.568793] raid6: sse2x2  xor() 9438 MB/s [  2.616876] raid6: sse2x1  gen() 11038 MB/s [  2.664726] raid6: sse2x1  xor() 9349 MB/s [  2.664979] raid6: using algorithm sse2x4 gen() 17701 MB/s [  2.665083] raid6: .... xor() 11138 MB/s, rmw enabled [  2.665253] raid6: using ssse3x2 recovery algorithm [  2.666442] xor: automatically using best checksumming function  avx     [  2.667482] async_tx: api initialized (async) done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... [  2.710909] Btrfs loaded, crc32c=crc32c-intel Scanning for Btrfs filesystems done. ... some info mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: error opening /dev/md?*: No such file or directory mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. mdadm: No devices listed in conf file were found. done. Gave up waiting for root file system device. Common problems:  - Boot args (cat /proc/cmdline)   - Check rootdelay= (did the system wait long enough?)  - Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/vda does not exist. Dropping to a shell! BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.4) built-in shell (ash) Enter 'help' for a list of built-in commands. So i have a question, how can i use the disk? Thank you for you reply.
Posted
by clear.
Last updated
.
Post not yet marked as solved
1 Replies
437 Views
Hi. Is there any way to change macos Identifier (i mean this one) for some reasons. For example, telegram using this identifier to show you connection list: is there any way to specify (for example) A telegram that I'm connecting with a Macbook Pro 2019? In my understanding, I just need to change the macbook ID in the system. Even if i want to do this in virtual machine (parallels for example)
Posted
by Katsil.
Last updated
.
Post marked as solved
1 Replies
518 Views
Apple Docs describe how to create a Swift executable to run Linux on an Intel based Mac, but the docs don't include the import statements required for the code to compile. I've determined I need to import both Cocoa and Virtualization but the following code from the final section Instantiate and Start the Virtual Machine is still generating an error: let virtualMachine = VZVirtualMachine(configuration: configuration) let delegate = Delegate() // Cannot find 'Delegate' in scope virtualMachine.delegate = delegate How do I resolve the Delegate() constructor?
Posted
by harr1424.
Last updated
.
Post not yet marked as solved
0 Replies
623 Views
Trying to get some minimum development working again, I've been waiting to be able to macOS in VMs on M1. Currently both VirtualBuddy, and UTM, can install macOS, I can go to Recovery Boot to disable SIP and enable 3rd party extensions. My M1 runs: ProductVersion: 13.0 BuildVersion: 22A5331f I've tested VM macOS versions of Monterey and Ventura. Here is my old kext (known to be working) loaded on M1 (Ventura) bare-metal 250 0 0xfffffe0006b70000 0x862ac 0x862ac org.openzfsonosx.zfs (2.1.0) BE4DF1D3-FF77-3E58-BC9A-C0B8E175DD97 <21 7 5 4 3 1> The same pkg, using the same steps in the VM, will after clicking Allow, ask to reboot (suspiciously fast), then come up with: System Extension Error: An error occurred with your system extensions during startup and they need to be rebuilt before they can be used. Of course clicking Allow just does the same, reboot, fail, ask to approve again, reboot..fail... Directly on the hardware, the dialog "rebuilding cache" pops up for a few seconds, but with the VMs I do not see it. I'm unfamiliar with the new system, so I'm not sure which log files to look at, but here is the output from kmtuil log, both at Allow and after reboot: https://www.lundman.net/kmutil-log.txt If I was going to make an uneducated guess and pull out some lines by random, maybe: 2022-08-29 20:01:13.169897+0900 0x251 Error 0x0 100 0 kernelmanagerd: Kcgen roundtrip failed with: Boot policy error: Error creating linked manifest: code BOOTPOLICY_ERROR_ACM 2022-08-29 20:01:13.170200+0900 0x251 Error 0x0 100 0 kernelmanagerd: Kcgen roundtrip failed checkpoint saveAuxkc: status:error fatalError:Optional("Boot policy error: Error creating linked manifest: code BOOTPOLICY_ERROR_ACM") 2022-08-29 20:01:13.170201+0900 0x251 Error 0x0 100 0 kernelmanagerd: Kcgen roundtrip failed: missing last checkpoint or errors found 2022-08-29 20:01:13.170242+0900 0x251 Default 0x0 100 0 kernelmanagerd: Deleting Preboot content Any work arounds? Loading kexts on my only M1 is a hard way to develop.
Posted
by lundman.
Last updated
.