Virtualization

RSS for tag

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

Posts under Virtualization tag

24 Posts

Post

Replies

Boosts

Views

Activity

VZVirtualMachineView disable mouse capture
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?
1
1
982
Nov ’22
Virtualization framework, linux environment
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?
1
1
2.3k
Oct ’22
Virtual Box won't load Kali Linux or ParrotOS (Info.plist error)
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.**
3
0
2.9k
Oct ’22
How to use 'VZVirtioBlockDeviceConfiguration' with block device which create by zfs zvol.
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.
1
2
1.5k
Sep ’22
MacOs Change Identifier
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)
1
0
1.1k
Sep ’22
Required Import Statements and Unresolved Identifiers in `Running Linux in a Virtual Machine`
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?
1
0
1.4k
Sep ’22
Use of Apple Developer Certificate in a VM on Apple hardware
Hi there, I'm posting this here as directed by Apple Developer Program Support over email. I was wondering if I can use a developer certificate and notary services in a macOS VM running on Apple hardware? My VMs run under QEMU/KVM on top of Linux (as I'm more familiar with the tooling and platform) on Intel Apple hardware. I'd like to confirm that using these with a developer certificate and notary services wouldn't be in breach of Apple's EULA, or be generally disliked by Apple or undesirable for any other reason. I have not joined the Developer program yet. Thanks in advance, Hamish
2
0
857
Aug ’22
Virtualization Framework: Does it require administrative privileges to use?
I'd like to be able to run Linux in a virtual environment on my M1 macOS Monterey system that is managed by my IT department. Can I use the Virtualization Framework Virtualization Framework to do the installation without any admin privileges? Are there other virtualization products (eg, Parallels, VMware, VirtualBox) that are usable without admin privileges? The side-by-side comparison that I found (at https://www.pcmag.com/picks/the-best-virtualization-software) doesn't have any indication either way. In asking about these 3rd-party ones, I'm not looking for a recommendation per se, but just a yay/nay on being able to work within an unprivileged account.
3
1
2.5k
Jul ’22
Basic example of Virtualization fails with Error Domain=VZErrorDomain Code=1
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.}
2
2
2.4k
Jul ’22
Authentication working on VM? ...sort of
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?
1
0
1.6k
Jun ’22
Ability to customise OS installation in Virtualized guest
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.
0
0
1.3k
Jun ’22
Virtualization sample code erratum?
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.
10
1
2.7k
Jun ’22
virtualOS: VZMacOSInstaller Error
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
5
0
1.4k
Jun ’22
Virtualization
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
1
0
890
Jun ’22
VZVirtualMachineView disable mouse capture
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?
Replies
1
Boosts
1
Views
982
Activity
Nov ’22
Virtualization framework, linux environment
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?
Replies
1
Boosts
1
Views
2.3k
Activity
Oct ’22
Virtual Box won't load Kali Linux or ParrotOS (Info.plist error)
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.**
Replies
3
Boosts
0
Views
2.9k
Activity
Oct ’22
How to use 'VZVirtioBlockDeviceConfiguration' with block device which create by zfs zvol.
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.
Replies
1
Boosts
2
Views
1.5k
Activity
Sep ’22
MacOs Change Identifier
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)
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’22
Required Import Statements and Unresolved Identifiers in `Running Linux in a Virtual Machine`
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?
Replies
1
Boosts
0
Views
1.4k
Activity
Sep ’22
Virtualization Framework: Enabling Nested Virt
Now that M2 has support for FEAT_NV2 will the virtualization framework expose a setting to enable nested virt, or is the thinking that it will just be always on? Any plans for this to land in Ventura?
Replies
2
Boosts
0
Views
1.8k
Activity
Aug ’22
Use of Apple Developer Certificate in a VM on Apple hardware
Hi there, I'm posting this here as directed by Apple Developer Program Support over email. I was wondering if I can use a developer certificate and notary services in a macOS VM running on Apple hardware? My VMs run under QEMU/KVM on top of Linux (as I'm more familiar with the tooling and platform) on Intel Apple hardware. I'd like to confirm that using these with a developer certificate and notary services wouldn't be in breach of Apple's EULA, or be generally disliked by Apple or undesirable for any other reason. I have not joined the Developer program yet. Thanks in advance, Hamish
Replies
2
Boosts
0
Views
857
Activity
Aug ’22
Virtualization Framework: Does it require administrative privileges to use?
I'd like to be able to run Linux in a virtual environment on my M1 macOS Monterey system that is managed by my IT department. Can I use the Virtualization Framework Virtualization Framework to do the installation without any admin privileges? Are there other virtualization products (eg, Parallels, VMware, VirtualBox) that are usable without admin privileges? The side-by-side comparison that I found (at https://www.pcmag.com/picks/the-best-virtualization-software) doesn't have any indication either way. In asking about these 3rd-party ones, I'm not looking for a recommendation per se, but just a yay/nay on being able to work within an unprivileged account.
Replies
3
Boosts
1
Views
2.5k
Activity
Jul ’22
MacOS based VM and XCode
Hi, Can I use MacOS based VM inside my windows system to build an XCode application and will I be able to test the same on my iPhone device? If yes, how do I connect the iPhone to VM. Can I publish this app to Apple Store.
Replies
1
Boosts
0
Views
1.2k
Activity
Jul ’22
.swift:119: Fatal error: Internal Virtualization error. Installation failed.
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
Replies
2
Boosts
1
Views
1.1k
Activity
Jul ’22
Basic example of Virtualization fails with Error Domain=VZErrorDomain Code=1
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.}
Replies
2
Boosts
2
Views
2.4k
Activity
Jul ’22
Linux VM on M1
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
Replies
1
Boosts
2
Views
1.3k
Activity
Jul ’22
Can I use apple virtualization in swiftUI?
Can I use apple virtualization in swiftUI? the tutorials use the Storyboard so I don't now if is possible.
Replies
2
Boosts
0
Views
1.3k
Activity
Jul ’22
MacOS Virtualization recovery mode
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!
Replies
1
Boosts
1
Views
1.4k
Activity
Jul ’22
Authentication working on VM? ...sort of
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?
Replies
1
Boosts
0
Views
1.6k
Activity
Jun ’22
Ability to customise OS installation in Virtualized guest
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.
Replies
0
Boosts
0
Views
1.3k
Activity
Jun ’22
Virtualization sample code erratum?
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.
Replies
10
Boosts
1
Views
2.7k
Activity
Jun ’22
virtualOS: VZMacOSInstaller Error
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
Replies
5
Boosts
0
Views
1.4k
Activity
Jun ’22
Virtualization
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
Replies
1
Boosts
0
Views
890
Activity
Jun ’22