utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.51k stars 1.33k forks source link

Cannot open macOS VM - limit exceeded #5563

Open markbattistella opened 1 year ago

markbattistella commented 1 year ago

BEFORE SUBMITTING YOUR ISSUE, PLEASE LOOK AT THE PINNED ISSUES AND USE THE SEARCH FUNCTION TO MAKE SURE IT IS NOT ALREADY REPORTED. ALWAYS COMMENT ON AN EXISTING ISSUE INSTEAD OF MAKING A NEW ONE.

Describe the issue

I have searched the previous issues and found nothing about the VM limits for running macOS on UTM. As I understand there is a hard limit imposed by Apple to not allow more than 2 macOS VMs to run.

The issue I face is that when I shutdown my VM via the VM system, and UTM lists the VM as offline, I can still not re-launch it.

I receive the error:

Error
The number of virtual machines exceeds the limit. The maximum supported number of active virtual machines has been reached.

I have no other VMs running, I have quit the UTM app, and even checked Activity Monitor. The only way to reset the "count" is a system reboot.

I haven't been able to find anything on fixing this, or if there is an issue at the moment with the way shutting down doesnt minus a count number.

Configuration

ideologysec commented 1 year ago

Is Virtual Machine Service still running? This is the actual process that runs the virtual machine. If you force quit that, does the issue resolve?

 2023-08-15 at 23 37 35
markbattistella commented 1 year ago

@ideologysec so I waited for the issue to occur again.

But, after using the VM all day yesterday today it now reports the error message.

Chronology

2023-08-18:

Notes:

2023-08-18:

2023-08-19:

Notes:


At this point I can't replicate it, it just occurs at times without any UTM or Virtualisation services running.

I don't have any knowledge on collecting logs or ways to see what is occurring when I get the error message.

runwaygoats commented 1 year ago

https://kb.parallels.com/128867

running more than two such VMs simultaneously is impossible.

Needs to be verified if this is an Apple Virtualization Framework limit.

ideologysec commented 1 year ago

Yes. Apple has hardcoded into the released OS' a check for how many macOS VMs are running at one time.

Here's a technical deep dive with more info: https://khronokernel.github.io/macos/2023/08/08/AS-VM.html

howieisaacks commented 1 year ago

For me, this is happening when NONE of my VMs are already running. It's now affecting both UTM and Parallels.

pthexton commented 1 year ago

This is the same issue as I raised with #4257 - I would suggest there may be other issues reported that are also basically the same problem and maybe a bit of house cleaning is needed to merge them / close duplicates.

Anyhow, as far as I've been able to tell the Mac firmware tracks the active number of VMs somehow but somewhere along the line this tracking gets it wrong and it thinks there are still macOS Guest VMs running even though there aren't.

When I do run in to this issue (very rare now as I use the CLI tart utility instead of using UTM where I don't seem to run in to this problem), the easiest solution I've found is to log off the mac and back in again (a full reboot isn't required)

danik85sh commented 6 months ago

Same issue here with M1 MacBookPro running UTM 4.4.5(94) on MacOS Sonoma 14.4.

Screenshot 2024-03-13 at 10 49 57

Restart/Log Out solves it, but it totally disturbed the dev process.