Question: The VZ limit number of VM vs. VM shutdown
honzajerabek opened this issue · 3 comments
Hi, first let me thank for this brilliant tool!
Sometimes, I'm experiencing troubles that after several ephemeral VM startups and shutdowns the next startup ends with the The maximum supported number of active virtual machines has been reached.
error.
At that point none of the macosvm
or com.apple.Virtualization.VirtualMachine
processes are running.
I've tried both terminating the macosvm
process and sudo shutdown -h now
from within the VM.
I cannot confidently reproduce this problem, it happens quite randomly and the only solution seems to reboot the host machine.
Is there a way of better VM management, maybe a list of running VMs, or somehow refresh the VZ framework so it doesn't indicate the limit?
Or more reliable option to shutdown the VM?
Any idea would be much appreciated :)
Honzo, thanks for the head-up. To be honest, I don't think there is much we can do, because the Virtualization framework provides no API to enumerate existing VMs, nor anything other than just a way to create new VMs. Also the limit is checked somehow inside the VZ framework and not exposed at the user level.
So I'd say it would be probably a good idea to report it to Apple. FWIW Ventura just came out and they added few new things so with some luck they may have fixed the issue?
I'll keep this open so we can check in later, but so far I don't see there is anything we can do. If anyone has any ideas, feel free to add it here.
thanks @s-u I'll upgrade to Ventura and keep an eye on it.
I've been working with VMs a lot in past week and haven't experienced this again, so I'll probably close this for now