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

gpg: signing failed ioctl

While signing PGP keys the following error occured:

gpg: signing failed: Unpassender IOCTL (I/O-Control) für das Gerät

Which is german so googling for the following words:

gpg: signing failed ioctl

Revealed a possible solution that actually worked:

GPG_TTY=$(tty)
export GPG_TTY