Code Monkey home page Code Monkey logo

macvm's People

Contributors

franklefebvre avatar iambenmitchell avatar jenshor avatar john-k avatar khaost avatar miked2318 avatar oxcug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

macvm's Issues

"Installation service connection unexpectedly terminated" error

Host OS: Monterey Beta 9
Model: 13" Macbook Pro M1

Error message(s):
`2021-10-06 20:45:03.505441-0500 MacVM[22434:192301] Error: Error Domain=VZErrorDomain Code=1 "Installation service connection unexpectedly terminated." UserInfo={NSLocalizedFailure=Internal Virtualization error., NSLocalizedFailureReason=Installation service connection unexpectedly terminated.}

2021-10-06 20:45:08.688250-0500 MacVM[22434:192779] [logging-persist] cannot open file at line 45340 of [d24547a13b]

2021-10-06 20:45:08.688828-0500 MacVM[22434:192779] [logging-persist] os_unix.c:45340: (0) open(/var/db/DetachedSignatures) - Undefined error: 0
`

Steps to reproduce:

  1. download and unzip cloned zip from github
  2. open xcodeproj
  3. clear signing (set team to "none", set signing certificate to "sign to run locally")
  4. run project
  5. create doc
  6. set cpu count, mem size, disk size
  7. save doc
  8. select downloaded ipsw (monterey beta 9)
  9. click install button
  10. notice error in xcode console

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

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. (#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". ๐Ÿ˜ฑ
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)

MDM

Is there a way to change virtual machine serial number and hardware model identifier? So it could be enrolled in an MDM such as Intune? If so please tell me how.

Thanks
Kristian

Can not login by blank password

I'd reset my macvm password to empty pwd, after restart vm, it can not login by simply press enter button.
But it can pass the recovery choose disk asking permission password dialog.

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

Removing unneeded software to reduce the size of the VM

First, thanks again for putting this project together. I'm wondering if there are ways to reduce the size of the VM by removing unneeded or unwanted software?

The smallest usable sized VM I was able to create was about 30GB. This didn't leave a lot of room to install other tools. However, macOS comes with all kinds of software by default which is not needed. If I could delete GarageBand, Keynote, Pages, and Numbers, that would save approximately 3GB in disk size.

I learned that these programs are kept on a different partition on a read-only drive. The only way I have thought to remove them is to disable the system integrity protection via the recovery partition. However, on Mac M1 computers, this requires powering down the machine and holding the power button until the options menu appears. I'm not sure how to do this on a VM since the VM has no physical keyboard with a power button.

Is there any known way or other ideas for creating macOS virtual machines that have a smaller disk footprint? We won't necessarily need every piece of software if we're just looking to test a specific product. Thank you again!

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.

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.

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?

IP keep increasing

Great project!

Each time I turned on the VM the IP is increasing by one (e.g. from 192.168.64.4 to 192.168.64.5) and I'm afraid that there are some forgotten cleaning that when it reaches 192.168.4.254 it would no longer be able to turned on

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 ...)

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

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.

How to disable SIP

I haven't found a way to get the VM into recovery mode so that I can disable SIP. Anyone any idea?

BTW: Great work and thank you, @KhaosT!!!

VM freezes after 5 seconds

The macOS 12.1 installer freezes about 5 seconds (e.g. in the "select language" screen) after the start of the VM. No log messages are shown in the console.

resize disk space...

I'm fighting with command line since yesterday to resize the disk to apply the macOS 12.1 update.

with "hdiutil resize -size 80g -imageonly disk.img" I was able to increase the size but inside the VM I don't find the good command to extend the APFS partition

I was betting on "diskutil apfs resizeContainer disk0s2 0" but it's not working ...
any idea?

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.

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.

Is there a way to specify serial?

So, just read the API docs and I see vague information regarding machine identifier and hardware model but nothing specific about the serial. Are you aware of any means of specifying the serial of the VM?

Could not attach to pid

When I run this project on my Xcode, I got an error as: "Could not attach to pid : โ€œ36574. the platform is not currently connected". I'm using Macbook Pro 14 (M1 Pro).

And the error detail is as below:
`
Could not attach to pid : โ€œ36574โ€
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: the platform is not currently connected
User Info: {
DVTErrorCreationDateKey = "2023-03-17 06:31:25 +0000";
DVTRadarComponentKey = 855031;
IDERunOperationFailingWorker = DBGLLDBLauncher;
RawUnderlyingErrorMessage = "the platform is not currently connected";
}

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
"device_model" = "MacBookPro18,3";
"device_osBuild" = "13.2.1 (22D68)";
"device_platform" = "com.apple.platform.macosx";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 908;
"operation_errorCode" = 3;
"operation_errorDomain" = IDEDebugSessionErrorDomain;
"operation_errorWorker" = DBGLLDBLauncher;
"operation_name" = IDERunOperationWorkerGroup;
"param_consoleMode" = 0;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.macosx";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 8192;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_runnable_type" = 2;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "macosx13.1";
"sdk_osVersion" = "13.1";
"sdk_variant" = macos;
}

System Information

macOS Version 13.2.1 (Build 22D68)
Xcode 14.2 (21534) (Build 14C18)`

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?

Is it possible to sign-in to Apple ID in VM?

Getting the "Verification failed" error when trying to sign-in an Apple ID, which I think is required to install Rosetta 2? It's certainly required to grab anything out of the Mac App Store or install updates, I believe.

FN key not being forwarded

It looks like FN key is not being forwarded to the guest OS: pressing FN + Back key on my host OS correctly deletes one character to the right of the cursor, but this action has no effect in the guest OS. Also Keyboard configuration in the guest OS is missing "Use F1, F2, etc. as standard function keys" option.

This means the "Delete" key on my Logitech keyboard does not work in the VM, neither do the "Back"/"Forward" buttons on my mouse. It seems like the VZUSBKeyboardConfiguration is not working correctly, so it might be Apple issue...

Cannot build project

hi. i am trying to build the project and i was watching the video and tried on both xcode beta and xcode 13 full and instead of the vm image i get a finder window and then in xcode i see a line [org.oltica.MacVM] copy_read_only: vm copy failed: status 1. I did not get any prompts for access to disk and this machine is a brand new M1 with Monterey and nothing else on it. any ideas?

Possible with Intel Macs too?

Will this become possible on Intel-based Macs too? Or does it depend on virtualization functions only the ARM-based processors offer?

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.

No network connection

I can't see a way to configure the network connectivity for the VM.
Currently, It's showing a "connected" Ethernet adapter but there's no connection to the network, bridged or NAT, doesn't receive DHCP and even with manual config, it doesn't communicate.

How do i fix this?

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

macOS Big Sur (ARM) Support

This is not an issue, but rather a question: why is there no alternative to virtualizing macOS Big Sur on M-Series machines? I've seen that even Parallels cannot virtualize operative systems under Monterrey; why isn't it possible when this is an arm-based system?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.