macOS VM for Apple Silicon using Virtualization API

Related tags

Networking MacVM
Overview

MacVM

macOS Monterey added support for virtualizing macOS with Apple silicon host.

This project provides an example project for the setup.

Currently on macOS 12.0 Beta 2, the installer may not work correctly unless you manually override the AuthInstallSigningServerURL.

You can do so with defaults write com.apple.Virtualization.Installation AuthInstallSigningServerURL https://gs.apple.com.

Config

Install

Run

Comments
  • Failed to install after the IPSW file selection and also run when multiple display are connected

    Failed to install after the IPSW file selection and also run when multiple display are connected

    When my 2 monitors are connected and my laptop lid is closed (probably even when it's not) I can't press install and no error is shown this is also happening when I trying to start the VM

    I found out in the Console app, the error was

    Error: Error Domain=VZErrorDomain Code=2 "More than one display is configured." UserInfo={NSLocalizedFailure=Invalid virtual machine configuration., NSLocalizedFailureReason=More than one display is configured.}
    

    I plugged the 2nd external screen and pressed install and return it and it worked

    opened by rluvaton 6
  • Resource temporarily unavailable (35)

    Resource temporarily unavailable (35)

    I am receiving the following message inside XCode when I try to open the .macosxvm file:

    2022-01-05 11:06:24.442236-0600 MacVM[61795:1484276] Error: Error Domain=VZErrorDomain Code=2 "A storage device configuration is invalid." UserInfo={NSLocalizedFailure=Invalid virtual machine configuration., NSLocalizedFailureReason=A storage device configuration is invalid., NSUnderlyingError=0x6000001c52f0 {Error Domain=VZErrorDomain Code=2 "The storage device attachment is invalid." UserInfo={NSLocalizedFailure=Invalid virtual machine configuration., NSLocalizedFailureReason=The storage device attachment is invalid.}}}
    2022-01-05 11:06:26.513352-0600 MacVM[61795:1484276] [Document] Popover failed to show
    

    Before that it was running fine until I needed to expand the drive size. I hadn't realized that maybe the right way to do it was to edit the metadata file, and instead I had tried the resize mentioned in one of the Issues on here. (https://github.com/KhaosT/MacVM/issues/19)

    $ hdiutil resize -size 80g -imageonly disk.img
    hdiutil: resize: failed. Resource temporarily unavailable (35)
    

    I had shutdown the VM before that.

    Essentially I can no longer use the VM, which unfortunately is my work "computer". :scream: Any thoughts on how to recover?

    metadata file:

    {
        "hardwareModelData": "YnBsaXN0MDDTAQIDBAUGXxAZRGF0YVJlcHJlc2VudGF0aW9uVmVyc2lvbl8QD1BsYXRmb3JtVmVyc2lvbl8QEk1pbmltdW1TdXBwb3J0ZWRPUxQAAAAAAAAAAAAAAAAAAAABEAKjBwgIEAwQAAgPKz1SY2VpawAAAAAAAAEBAAAAAAAAAAkAAAAAAAAAAAAAAAAAAABt",
        "cpuCount": 4,
        "identifier": "D94C024E-51B0-4DF8-82D3-F35F0DA84871",
        "machineIdentifierData": "YnBsaXN0MDDRAQJURUNJRBNuPkK7jq7GlQgLEAAAAAAAAAEBAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAZ",
        "diskSize": 32,
        "installed": true,
        "memorySize": 17179869184,
        "audio": true
    }
    

    I'd like to change the size to 80GB

    ----- Additional Info -----

    $ hdiutil resize -size 80g -imageonly disk.img -verbose
    DIBackingStoreInstantiatorProbe: interface  0, score      100, CBSDBackingStore
    DIBackingStoreInstantiatorProbe: interface  1, score    -1000, CBundleBackingStore
    DIBackingStoreInstantiatorProbe: interface  2, score    -1000, CRAMBackingStore
    DIBackingStoreInstantiatorProbe: interface  3, score    -1000, CDevBackingStore
    DIBackingStoreInstantiatorProbe: interface  4, score    -1000, CCURLBackingStore
    DIBackingStoreInstantiatorProbe: interface  5, score    -1000, CVectoredBackingStore
    hdiutil: resize: failed. Resource temporarily unavailable (35)
    
    opened by nodeGarden 6
  • macOS Ventura VM Support

    macOS Ventura VM Support

    I have a developer account and wanted to try to create a VM with the macOS Ventura support with the ipsw. It doesn't seem to do anything as the install process is stuck at 0%.

    Also noticed that nothing is written to the image file either.

    0+0 records in 0+0 records out 0 bytes transferred in 0.000006 secs (0 bytes/sec)

    Is it because I'm running macOS Monterey and creating and running a Ventura VM requires me to also run the same OS? I don't want to do that since of compatibility issues and I kind of want to try to run it in a VM first. Anyone experiencing the same issue?

    opened by moyitpro 4
  • App Beeps when Attempting to Type

    App Beeps when Attempting to Type

    I've got an odd issue; after building on 12.0.1 in Xcode 13.1, the install of UniversalMac_12.0.1_21A559_Restore.ipsw goes fine, until I need to type. While the mouse works perfectly, I get a beep with every keystroke, and nothing appears on the screen.

    opened by ajacocks 4
  • docs: added setup instructions

    docs: added setup instructions

    Added short description on how to set up and use the tool.

    List of issues which are fixed by the PR

    closes #36

    Open questions

    • I had Apple Configurator 2 already installed - is this mandatory or used at all?
    • Is there a better/more trustworthy source for obtaining the ipsw file than https://mrmacintosh.com/apple-silicon-m1-full-macos-restore-ipsw-firmware-files-database/. I've seen that the site uses Apple CDN, so I'm assuming it's fine. However, I could also compile a list for the readme which provides this information without the need to reference 3rd party sites.
    opened by jenshor 3
  • What is the file picker dialog for? What am I supposed to select after running the project?

    What is the file picker dialog for? What am I supposed to select after running the project?

    When I run the project in XCode, a file picker dialog pops up. Can someone please tell me what am I supposed to select at this point?

    I'm running XCode 13 on macOS 12.0.1 Monterey.

    I did get a Monterey VM created using Ming's repository here, which is based on Khaos's work, and thanks to Mr. Macintosh's walkthrough of Ming's instructions, but I want to give it a try with Khaos's original solution as well.

    I should also add I'm on an ARM64 Mac M1.

    opened by jamesmortensen 3
  • Trying to use MacVM with Monterey Beta 3 getting

    Trying to use MacVM with Monterey Beta 3 getting "unrecognized selector sent to instance"

    On Monterey Beta 3. When I try to install after setting the IPSW file I get:

    -[VZMacOSInstaller initWithVirtualMachine:restoreImage:]: unrecognized selector sent to instance

    VMInstance line 125.

    Seems odd since the Swift to Obj-C bridge seems to be there. Not too expert at Swift though.

    opened by jamesdbailey 3
  • No signing certificate for team ID '7C2EXSD3YV'

    No signing certificate for team ID '7C2EXSD3YV'

    I get these 2 errors when I try to build the project:

    "There are no accounts registered with Xcode. Add your developer account to Xcode"

    and

    "No signing certificate 'Mac Development' found: No 'Mac Development' signing certificate matching team ID '7C2EXSD3YV' with a private key was found."

    If I edit MacVM.xcodeproj/project.pbxproj and change the 2 instances of "DEVELOPMENT_TEAM = 7C2EXSD3YV;" to 'DEVELOPMENT_TEAM = "";' then it builds and runs without error.

    opened by magnusviri 2
  • Graphics Issue - Chrome

    Graphics Issue - Chrome

    Has anyone had an issue with Menu's and Hover States not working? Basically the area affected just blanks out. This is most notable in Chrome, making it nearly unusable. image

    Safari works pretty well so far. Sadly, we use a set of custom chrome extensions for daily work, so switching to Safari isn't an option right now.

    opened by nodeGarden 2
  • Do I need an Apple Developer ID to compile and run this program?

    Do I need an Apple Developer ID to compile and run this program?

    I upgraded my operating system to Mac OS Monterey v12.0.1 and also updated Xcode to v13.1. While the compile errors I was facing before have all been resolved, I'm now faced with these errors about the signing certificate and developer account.

    Do I need to pay for a developer account with Apple? I'm just wanting to compile this and run it and try it out. Thank you.

    Screenshot 2021-11-01 at 11 38 18 AM Screenshot 2021-11-01 at 11 38 07 AM
    opened by jamesmortensen 2
  • Documentation for setup

    Documentation for setup

    Similar to #12, I was confused on how to use this code due to the file picker dialog.

    I think a short documentation can help to get this working for users unfamiliar to the specifics of MacOS virtualisation.

    opened by jenshor 1
  • cannot build project

    cannot build project

    Hello, thank you for this project. I am unable to build project and no technical knowledge, do you please know how to fix this? Running Monterey 12.6 with Xcode 14.0.1 on M1.

    Errors / warnings:

    • Cannot find 'VZMacOSVirtualMachineStartOp tions' in scope
    • Argument passed to call that takes no arguments
    • Unable to infer type of a closure parameter 'error' in the current context

    Screenshot 2022-10-31 at 17 28 45

    opened by lastrebel 0
  • Suddenly can not connect to network

    Suddenly can not connect to network

    It works yesterday, but suddenly can not connect to network by ethernet, even if I rebuild a new VM.

    I'd try to remove ethernet and add a new one, but still not work. It shows connected but can not browsing any site.

     2022-08-10 at 00 12 00
    opened by zenkarsha 2
  • IP on local network instead of NAT

    IP on local network instead of NAT

    I recently saw that there is a way to use an Internal IP instead of a NAT one in VMs with Apple Silicon. I don't know it's implemented but it's working with Parallels .. any chance to have it here too?

    opened by mcnahum 0
  • macOS Ventura new settings & Linux

    macOS Ventura new settings & Linux

    Any plan to have an early version to support macOS Ventura as host for the new settings?

    maybe an option for the Unix VM too ( the sample code provided by Apple is light and don't include the Rosseta part ...)

    opened by mcnahum 2
  • Start multiple VMs on boot?

    Start multiple VMs on boot?

    Thanks so much for this project! Wondering if its possible to start a few VMs via launchctl on boot? I'm able to start multiple VMs manually but I can't figure out the CLI equivalent.

    opened by jmif 0
Owner
Khaos Tian
Khaos Tian
The civilized way to write REST API clients for iOS / macOS

The elegant way to write iOS / macOS REST clients Drastically simplifies app code by providing a client-side cache of observable models for RESTful re

Bust Out 2.2k Nov 20, 2022
Login-screen-using-Swift - Firebase Apple Open Source Development

Firebase Apple Open Source Development This repository contains all Apple platfo

Kushal Shingote 1 Feb 3, 2022
NWReachability - a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

NWReachability is a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

null 4 Dec 2, 2022
Postie - The Next-Level HTTP API Client using Combine

Postie - The Next-Level HTTP API Client using Combine Postie is a pure Swift library for building URLRequests using property wrappers.

kula 28 Jul 23, 2022
A web API client in Swift built using Async/Await

Get A modern web API client in Swift built using Async/Await and Actors. let cli

Alexander Grebenyuk 745 Jan 3, 2023
Near-Earth Asteroids Information using NeoWs Api.

AsteroidNews Example project which uses SceneKit framework to show objects with Near-Earth Asteroids information. Frameworks SceneKit Alamofire Swifty

Simranjeet 1 Dec 30, 2021
Approov Integration Examples 0 Jan 26, 2022
Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-5.1

Kitura 1.3k Dec 26, 2022
Replacement for Apple's Reachability re-written in Swift with closures

Reachability.swift Reachability.swift is a replacement for Apple's Reachability sample, re-written in Swift with closures. It is compatible with iOS (

Ashley Mills 7.7k Jan 1, 2023
The easy way to use sockets on Apple platforms

SwiftSocket SwiftSocket library provides as easy to use interface for socket based connections on server or client side. Supports both TCP and UDP soc

null 1.6k Dec 21, 2022
Apple Push Notifications (APNs) Server-Side library.

Perfect-Notifications 简体中文 APNs remote Notifications for Perfect. This package adds push notification support to your server. Send notifications to iO

PerfectlySoft Inc. 113 Oct 28, 2022
Google ProtocolBuffers for Apple Swift

Protocol Buffers for Swift An implementation of Protocol Buffers in Swift. Protocol Buffers are a way of encoding structured data in an efficient yet

Alexey Khokhlov 933 Nov 4, 2022
Updates to Apple's AVKitPlayerOSX sample code.

AVKitPlayerOSX =========================================================================== DESCRIPTION: This sample demonstrates usage of AVPlayerView

George Toledo 0 Nov 5, 2021
Simplified access to Apple's CloudKit

EVCloudKitDao Discuss EVCloudKitDao : What is this With Apple CloudKit, you can focus on your client-side app development and let iCloud eliminate the

Edwin Vermeer 632 Dec 29, 2022
Apple watch app to interface with Transmission Client

TransmissionWatch Apple watch app to interface with Transmission Client Currrent

Aayush 2 Dec 23, 2021
Simple iOS app in Swift to show AQI for some cities using websocket using Combine + MVVM

AQI Simple iOS app in Swift to show AQI for some cities using websocket using Combine + MVVM This app follows MVVM This app uses combine framework The

Amey Vikkram Tiwari 2 Nov 6, 2022
🌸 Powerful Codable API requests builder and manager for iOS.

This lib is about network requests with blackjack, roulette and craps! Using it you will be able to convert your massive API layer code into an awesom

CodyFire 251 Jan 8, 2023
Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)

Perfect: Server-Side Swift 简体中文 Perfect: Server-Side Swift Perfect is a complete and powerful toolbox, framework, and application server for Linux, iO

PerfectlySoft Inc. 13.9k Jan 6, 2023
Access Xcode Server API with native Swift objects.

Xcode Server SDK Use Xcode Server's API with native Swift objects. First brought to you in Buildasaur, now in an independent project. This is an unoff

Buildasaurs 401 Dec 29, 2022