Virtualbox OSX freeze

From time to time, esp. after starting a few virtual systems at the same time, the whole OSX system can freeze and there is basically nothing to rescue the system but cold reboot.

This is due to some limits set to low, which can be fixed by:

sudo sysctl -w kern.aiomax=512 kern.aioprocmax=128 kern.aiothreads=16

That will be effective till reboot, it can be made persistent by adding the following line to /etc/sysctl.conf


kern.aiomax=512
kern.aioprocmax=128
kern.aiothreads=16

Found at http://www.firewing1.com/blog/2013/08/02/setting-os-x-kernel-asynchronous-io-limits-avoid-virtualbox-crashing-os-x