Integration with WHMCS
WHMCS is a billing system that allows a provider to sell different types of services. With WHMCS, you can provide virtual servers to your customers automatically. The billing system can perform the following main features:
- register clients and keep track of their funds;
- create tariff plans;
- accept payments from customers;
- manage services automatically: activate, suspend, renew.
The integration is set up in WHMCS. This article goes you through the steps you need to perform.
Note
The integration module was not tested with WHMCS 8.0.5 and later.
Install the module
To install the integration module with VMmanager, in the WHMCS directory download the archive and extract the integration module files:
cd /var/www/html/whmcs/ curl -O http://download.ispsystem.com/extras/whmcs/7/vmmanager6.tar.gz tar -xzvf vmmanager6.tar.gz
Next, log in to the WHMCS web interface and activate the module:
- WHMCS 7 — Setup → Addon Modules → the nodule ISPsystem global module → Activate;
- WHMCS 8 — System settings → Addon Modules → the nodule ISPsystem global module → Activate.
Set up the integration
To connect to VMmanager click on Setup → Products/Services → Servers → Add New Server.
Servers
Enter the following parameters:
- Name — the name of the connection to VMmanager;
- Hostname — the name of the server with VMmanager;
- IP address — the public IP address of the server with VMmanager.
You may not specify the Hostname or IP address. You need to specify only one of these parameters.
Note
Do not specify the port if you use a non-standard configuration.
Server Details
Enter the following parameters:
- Type — select the server type "VMmanager 6";
- Username — the Admin username in VMmanager that will manage servers in VMmanager. Use the account of the first user created after installing VMmanager;
- Password — the admin password.
Configure a tariff plan
To set up a tariff go to Setup → Product/Services → Product/Services → Create a New Product.
Main settings
Enter the following parameters:
- Product type — select Server/VPS;
- Product Name — enter any name for the tariff plan;
- Module — select "VMmanager 6".
Click on Continue to create the tariff and proceed to its configuration.
Module Settings
Enter the following parameters:
- Module Name — the integration module name. Select VMmanager 6;
- Server Group — service server group;
- Cluster ID — cluster ID. You can see it on the Clusters tab in VMmanager;
- Source type — source type in VMmanager: an operating system template or pre-defined VM disk image;
- Source ID — source ID:
- Image IDs can be viewed in VMmanager on the Templates → User Images tab;
- OS template IDs can be viewed in the platform database. To do this, connect to the server with VMmanager via SSH and enter the command:
docker exec -it mysql bash -c "mysql isp -p\$MYSQL_ROOT_PASSWORD -e 'select * from vm_os;' "
- vCPU count — CPU number for a VM;
- RAM — amount of RAM for a VM;
- Disk size — disk size in MB;
- Network bandwith — bandwidth limit of the virtual machine network interface in Mbit/s;
- IP pool ID — ID of the IP pool to allocate an IP address for a virtual machine. You can see it in VMmanager in Networks → IP pools;
- Recipe ID — ID of the recipe or script that will be executed after OS installation. You can see it in VMmanager in Scripts;
- Dont wait the OS install — enable this option if you don't want to wait when an OS is installed during the order activation;
- Add IPv6 Subnet — enable this option to allocate an IPv6 subnet for a virtual server.
Configurable options
Tariff plan options in WHMCS are extra resources available to customer for a separate fee. These resources are billed separate from the main service. Customer defines the number of additional resources independently in the service order form.
Configurable tariff options are consolidated in groups. Each group of options can be activated for several products. We recommend to use a separate group of options for each connection to platform.
To manage option groups, go to Setup → Products/Services → Configurable Options. You can add the following options to the virtual server plan:
- os — List of OS templates available for installation. Should be: template_id|Template name displayed to user. E.g., 1|CentOS 7. Template ids are displayed in VMmanager tab Templates → Operating systems. Option type: Dropdown;
- cpu_number — minimum and maximum number of CPUs for virtual machines. Option type: Quantity;
- ram_mib — minimum and maximum RAM for virtual machines in MiB. Option type: Quantity;
- ipv4_number — minimum and maximum number of IP addresses for virtual machines. Option type: Quantity;
- hdd_mib — minimum and maximum disk space in MiB. Option type Quantity;
- network_bandwidth_mbitps — minimum and maximum bandwidth of virtual machine network interface in Mbps. Option type: Quantity.
Read more about options configuration in official WHMCS documentation.
Configure the tariff options
Logs
The log file of the integration module is located in WHMCS → Utilities → Logs → Module Log.
If the log file contains errors like "Module Create Failed", check whether the integration module is activated.