Using Account Plans

Posted 2009-05-17 19:02 by andreychek

This legacy document is here only to insure incoming links continue to work. You likely want to start with the new documentation index or search for what you want to know about. This document is unmaintained!

Using Account Plans

Account plans in Virtualmin are sets of limits that can be applied to virtual servers. Each plan defines disk quotas, limits on domains, mailboxes and aliases, allowed features and allowed editing capabilities for servers. When creating a top-level virtual server, a plan can be selected to set its initial limits. The plan for a server can also be changed after creation.

Typically, a hosting provider will charge customers different amounts depending on the plans their domains are on. Plans are set only on top-level virtual servers, but their limits apply to all sub-servers. So if a plan sets a disk quota of 100 MB, disk usage by the top-level server and all sub-servers cannot exceeded 100 MB in total. Similarly, plan limits on database, mailbox and alias counts apply to the sum total of those objects in all sub-servers.

Plans are a new feature in Virtualmin 3.66 - older versions included similar functionality in templates, which were too complex for most users. As of the 3.66 version, all limits in templates have been automatically converted to plans.

Creating Plans

Plans can be created by the master administrator and by resellers. By default a newly installed Virtualmin system will have a single Default Plan, but you can create others by following the steps below :

  1. Open the System Settings menu, and click on Account Plans.
  2. Click on Add a new account plan.
  3. Enter a unique name for the plan, and fill in the limits as you wish. Typical plans include disk quota, domain and bandwidth limits.
  4. Click the Create button.

To make a new plan to default for new virtual servers, select it from the Set default plan menu and click Change Default.

Assigning Plans to Virtual Servers

Once a plan has been created, it can be selected on the Create Virtual Server page for top-level servers. This is done using the Account plan field. When the server is created, all limits in the plan will be applied to the new domain.

After creation, you can change the plan a virtual server is on by selecting it from the left menu and clicking Edit Virtual Server. In the Configurable settings section you will see the Account plan field, with the currently applied plan selected. To switch, just choose a new one from the menu and click Save Virtual Server.

Limits from plans can be changed on a per-virtual-server basis using the Edit Owner Limits page, under the Administration Options menu category. These will remain in effect until the virtual server's plan is changed, at which time the new plan settings will override any customization you make here.

Editing Plans

After plan has been created, it can be edited at any time by clicking on its name on the Account Plans page. Make whatever changes you like, and then click on the Save and Apply button to apply the new limits to all servers on the plan. Or you can choose to just modify the plan itself by clicking the Save button.

The Virtual servers on plan section on the Edit Account Plan page shows which domains will be effected when Save and Apply is clicked.

To delete one or more plans, check the boxes next to them in the list of plans, then click the Delete Selected Plans button. Deletion of plans currently used by virtual servers is allowed, and will have no effect on those domains.

Resellers and Plans

If you have created any reseller accounts, they also have the ability to create and edit their own account plans. The user interface for this is exactly the same, except that plans created by root or other resellers are not visible. However, the master administrator can see and edit plans created by all resellers.

When creating or editing a virtual server, a reseller will be able to select from his own plans and those created by the master administrator. However, the master can limit plans to some or no resellers using the Resellers settings section of the Account Plan form.

No matter what limits a reseller defines in his plans, global limits on the number of domains, mailboxes and disk space a reseller's domains can consume still apply. So a reseller with a maximum combined disk quota of 100 GB would be able to create a plan with a 200 GB disk quota, but not actually use it when creating a virtual server.

Command line API for Plans

Plans can be created, modified, listed and deleted from the command line using the Virtualmin scripting API. Full documentation on these functions is available on the Account Plans page.

The plan for a new virtual server can be set with the --plan flag to create-domain. To change the plan of an existing server, use the --apply-plan or --plan flag to modify-domain.