Solaris hosts have a fixed number of IPC semaphores IDs per process preventing users from starting more than 120 VMs. While trying to launch more VMs you would be shown a "Cannot create IPC semaphore" error. In order to run more VMs, you will need to increase the semaphore ID limit of the VBoxSVC process.
Execute as root the prctl
command
as shown below for the currently running VBoxSVC process. The process ID
of VBoxSVC can be obtained using the ps
command.
prctl -r -n project.max-sem-ids -v 2048 <pid-of-VBoxSVC>
This will immediately increase the semaphore limit of the currently running VBoxSVC process and allow you to launch more VMs. However, this change is not persistent and will be lost when VBoxSVC terminates.
If the user running VirtualBox is root, execute the following command:
prctl -n project.max-sem-ids -v 2048 -r -i project user.root
From this point, starting new processes will have the increased limit of 2048. You may then re-login or close all VMs and restart VBoxSVC. You can check the current VBoxSVC semaphore ID limit using the following command:
prctl -n project.max-sem-ids -i process <pid-of-VBoxSVC>
If the user running VirtualBox is not root, you must add the property to the user's default project. Create the default project and set the limit by executing as root:
projadd -U <username> user.<username> projmod -s -K "project.max-sem-ids=(priv,2048,deny)" user.<username>
Substitute "<username>" with the name of the user running VirtualBox. Then re-login as this user to be able to run more than 120 VMs.