Limiting Users’ Resources Consumption¶
In SolusVM 2, you can set limits on the number of servers a specific user can create and can keep in the running state. It helps limit resources consumption by users and prevent resources overuse.
To set limits, use limit groups. You need to create a limit group first and then to assign it to the desired users. You can also choose the default limit group that all new users will have. It helps avoid the hassle of assigning limit groups to new users. By default, new users don’t have any set limits.
To create a limit group:¶
- Go to Access > Limit Groups and then click Add Limit Group.
- Give your limit group a name.
- Specify the maximum number of servers, running servers, and/or additional IP addresses users can have.
- Click Save.
You can also create a limit group via the API.
You’ve created a limit group. You now need to assign it to the desired users.
To assign a limit group to a user:¶
- Go to Access > Users.
You can assign a limit group while editing an existing user or creating a new one:
- To assign the limit group to an existing user, click the icon on the user’s row.
- To assign the limit group to a new user, click Add User.
Under “Limit group”, select the limit group. If you're creating a user, also fill in the required fields.
- Click Save.
You’ve assigned the limit group to the user. The number of the user’s resources is now limited.
If you set a limit lower than the number of resources the user already has, it won't affect already assigned resources. For example, it won't automatically delete or stop servers in excess of the limit. But the user won't be able to create and/or run new servers.
In the SolusVM 2 interface, you can assign the limit group only manually for each specific user.
If you have a large number of users, assign the limit group automatically via the API.
To do so, use the API requests for :solusapi:
editing an existing user <operation/update-user>
creating a new user <operation/create-user>.
You can also have a limit group automatically assigned to all new users. To do so, choose the desired limit group as the default one.
To choose the default limit group:
- Go to Settings > User Area.
- Under “Default limit group for a new user”, select the limit group and then click Save.
All new users will now have the selected limit group.