WHMCS Module to create Reseller Accounts

From Virtualizor Wiki
Jump to: navigation, search

Overview

Softaculous Virtualizor supports Reseller / Cloud accounts. The Cloud accounts can create multiple VMs based on the resources assigned to their account. This guide is intended for hosting providers who wish to sell Cloud Accounts via WHMCS. WHMCS can be configured to create cloud accounts as soon as you accept the Order (Automatically or Manually). We provide a module for WHMCS to enable you to do so. Setting it up is really easy. You can create and delete Cloud / Reseller accounts with this module.

Download

Download the Virtualizor WHMCS Cloud module from HERE.
Unzip it and upload the folder virtualizor_cloud_account (the folder itself), in your /path/to/whmcs/modules/servers/ Directory.
Please make sure that the upload was done properly and the following folder exists :
/path/to/whmcs/modules/servers/virtualizor_cloud_account

Note: You will also need to upgrade your Virtualizor WHMCS Module (to create VPS) to the latest version.

Servers Key


Virtualizor generates a Unique Key and Key Pass when its installed on the server.
You will need the servers Key and Key Pass to add the server to WHMCS.
This information can be found from the Virtualizor Admin Panel -> Configuration -> Server Info

Serverinfo1.jpg


Adding Server to WHMCS

To add the Virtualizor Server to WHMCS login to WHMCS Admin Panel.
Then go to WHMCS Admin Panel -> Setup -> Servers -> Add New Server
Fill the form as shown in the below images :

WHMCS cloud account Add Server.png

Creating a Product

Now, you will need to create a product.


Product

To do so go to WHMCS Admin Panel -> Setup -> Products/Services -> Create a New Product Fill in the details as per the following image and specify the Products Name of your choice

WHMCS cloud account Create Product.png

Module Settings

Now proceed to the Module Settings. Click on the Module Settings Tab and choose the Module Name Virtualizor_cloud_account. A list of fields will load which will be the settings for the new product. A sample configuration is shown in the below image.

WHMCS cloud account Module Settings.png

The fields are self explanatory, but the following is a detailed explanation :

  • Type : The Virtualization type the Cloud account will have access to.
  • Number of VMs : The total number of VPS this cloud account can have.
  • Number of Users : The total number of endusers this cloud account can create.
  • Max Disk Space : The amount of disk space that the Cloud account can use to create VPS.
  • Max RAM : The amount of RAM the Cloud account can use to create VPS.
  • Max Burst / Swap RAM : The amount of Burst / Swap RAM the Cloud account can use to create VPS.
  • Max Bandwidth : The total bandwidth the that this Cloud Account can use.
  • Default CPU Weight : The default CPU Weight that will be assigned to each VM of the Cloud Account.
  • Max Cores : Maximum CPU Cores the cloud account can give to one VM
  • Default CPU % : The default CPU % that will be assigned to each VM of the Cloud Account.
  • Total Cores : Total number of CPU Cores the cloud account can give to all VMs
  • Max IPv4 : The total number of IPv4 this cloud account can have.
  • IPv6 Subnets : The total number of IPv6 Subnets this cloud account can have.
  • IPv6 : The total number of IPv6 Addresses this cloud account can have.
  • Server Groups : Comma seperated values of Server Groups that this cloud account can use to create VMs. NOTE : You must give the Reseller Region Name and not the server group name.
  • Media Groups : Comma seperated values of Media Groups that this cloud account can use to create VMs. If no value is specified then all templates and ISO will become available to the user.
  • API Key : The User API Key will be the respective Reseller API key.
  • API Password : The User API Password will be respective Reseller API Password.

Note : You must specify the API Key and Pass option as they are required for successful creation of Reseller accounts.

Custom Fields

Now Click on the Custom Fields Tab and fill in the form as per the following image

Whmcs cloud account customfields.png

Just for your information the uid is the User ID, ca_apikey and ca_apipass are the new user's API Key and API Pass as per the Virtualizor Database and needs to be stored for any future action like Terminate, Suspend, etc. Please fill it as per the above Image.

Configurable Options

You can also create the following Configurable options :

  • Number of VMs : The total number of VPS this cloud account can have.
  • Number of Users : The total number of endusers this cloud account can create.
  • Space : The amount of disk space that the Cloud account can use to create VPS.
  • RAM : The amount of RAM the Cloud account can use to create VPS.
  • Burst / Swap : The amount of Burst / Swap RAM the Cloud account can use to create VPS.
  • Bandwidth : The total bandwidth the that this Cloud Account can use.
  • Default CPU Weight : The default CPU Weight that will be assigned to each VM of the Cloud Account.
  • Max Cores : Maximum CPU Cores the cloud account can give to one VM
  • Default CPU % : The default CPU % that will be assigned to each VM of the Cloud Account.
  • Total Cores : Total number of CPU Cores the cloud account can give to all VMs
  • Number of IPv4 : The total number of IPv4 this cloud account can have.
  • Number of IPv6 Subnet : The total number of IPv6 Subnets this cloud account can have.
  • Number of IPv6 : The total number of IPv6 Addresses this cloud account can have.
  • Server Groups : Comma seperated values of Server Groups that this cloud account can use to create VMs. NOTE : You must give the Reseller Region Name and not the server group name.
  • Media Groups : Comma seperated values of Media Groups that this cloud account can use to create VMs. If no value is specified then all templates and ISO will become available to the user.


NOTE : The above config names are very important and are defined in virtualizor_cloud_account_conf.php . If you want to change the name of the above configs, please update the virtualizor_cloud_account_conf.php file as well.

Firewall Port

Please make sure, that the whmcs server has ports 4082,4083,4084 and 4085 opened.


Support


If you need any assistance then please contact Softaculous Virtualizor Support. Please send us a screenshot of the Module Settings and the Custom Fields you added to the Product.