VMware WHMCS Installation Guide & Documentation

From WHMCS Global Services Module Documentation
(Redirected from VMware WHMCS Module)
Jump to: navigation, search

About WGS VMware WHMCS Module

WGS VMware vSphere is fully automated module that will reduce 90% of your IT person cost. With VMware WHMCS module once user orders the service, admin does not need to create VM manually and install OS etc. Moreover network adapter also manages itself and once server is provisioned, module will send all the details to end user. We are providing the rich client area UI feature where user can manage all the controls like start,stop,reinstall the server as well as manage the server snapshot.

How to install VMware module?

How to upload files with WHMCS?

1. Log in to your client area https://whmcsglobalservices.com/members/clientarea.php and download VMware module .

2. Extract module folder.

3. Upload addons folder to WHMCS (whmcs_root/modules/addons/).

4. Upload servers folder to WHMCS (whmcs_root/modules/servers/).

5. Upload crons folder file to WHMCS (whmcs_root/crons/).

Module Requirements

1. WHMCS v6, v7.x
2. SOAP must be enabled on your server
3. Please grant 0777 permission to cache file ".clone_ticket.cache" (/modules/servers/vmware/vmwarephp/library/Vmwarephp/.clone_ticket.cache)
4. XML, XML Reader, XML Writter (PHP Extension) enabled.
5. WHMCS DB User must have all permissions of the DB before installation and activation of this ADDON
GRANT ALL PRIVILEGES ON db_base.* TO db_user @'localhost' IDENTIFIED BY 'db_passwd';

Required : vCenter port 9443, ESXi port 902

Addon Module

VMware addon module For WHMCS.

Features

  • Multi-Language Supported
  • Supported version Whmcs V6,V7.x
  • Supported PHP 5.6 to 7.2

How to activate the addon module with WHMCS?

Let's configure addon module with your WHMCS.

1. Login as WHMCS admin and then Go to Setup -> Addon Modules. Afterwards, find VMware and press Activate button.

2. Enter your module license key.

3. Enable to delete the DB module tables, when deactivating the module.

4. Enable Logs (Enable to see module activity logs in addon module)

5. Assign user(s), who can access this module.

Vm addon config2.png

Addon Module View

VMware addon module For WHMCS allows us to manage things as below.

Server Setup

First of all you need to setup the vCenter/vSphere/ESXI server for API connection. You can add multiple servers.
1. Server Name (Enter any name which you want to display)
2. vCenter/vSphere/ESXI IP Address or Hostname Address should be like https://127.0.0.1, http://127.0.0.1
3. vCenter/vSphere/ESXI Username
4. vCenter/vSphere/ESXI Password
5. ESXI host (enable it, if you are using ESXI server detail)
Config-vserver.png

Guest Operating System

A guest operating system is an operating system that is secondary to the OS originally installed on a computer. List of guest OS will be shown at the front side during order process. User can select desired operating system to install on his VM. Admin can predict his own custom name to Guest OS and that will be shown in order form.
1. Select vCenter (Your vCenter servers are those servers, you added under Server Setup tab)
2. Select Datacenter
3. Select Hostname
4. Select Resource Pool
5. Select Network Adapter
6. Select Datastore (Your host datastore, where ISO files exists)
7. Guest OS Family (Like Windows, Linux, Others)
8. Guest OS Version Like (Windows 7, Ubuntu Linux, Windows 7 Vista)
9. ISO File (Image file for OS, For this you need to upload your ISO files in iso directory for specifc datastore)
10. Guest OS Version ID (module will auto fill this id on behalf of OS version)
11. Hide from order form (You can hide configure OS from order form)
Wiki template2.png

How to add more OS version?

Click on given link "Add more OS version" and then open the guestOsIdentifier.txt file (/modules/addons/vmware/guestOs/) in your editor. in this file you can add the more OS.
Copy the OS version and version id from given link and paste in this guestOsIdentifier.txt file according to OS family like (Windows/Linux)
Instructions for add new OS
Format like "OS Family-OS Version-OS Version ID".
Add all values with hyphen (-) separator
Os.png

VMware Name (Cloning VM)

A VMware name is a master copy of a virtual machine that can be used to create many clones. VMware name will be used during order process. Module will create the VM by cloning and assign the IP automatically.
1. Select vCenter (Your vCenter servers are those servers, you added under Server Setup tab)
2. Select Datacenter
3. Select Hostname
4. Select Resource Pool
5. Select Network Adapter
6. Select Datastore (Your host datastore, where ISO files exists)
7. Guest OS Family (Like Windows, Linux, Others)
8. Custom Name (Enter any custom name related to OS which you want to show on order form)
9. Select Sample VM (from which you want to create another VM's)
10. System Password (Sample VM root/administrator password)
11. Product (license) key (only required for Windows oldest version like Windows vista, etc)
12. IP Auto Customization (Auto provision IP/network)
13. From VM template (Enable, if you want to create VM from VM template)
14. Hide from order form (You can hide configure OS from order form)
Wiki template1.png

IP Mapping

In this section Admin can manage IPs, MAC, Netmask, Gateway and DNS according to datacenter. These IP, MAC address will be assigned to VM once order is completed. Admin will assign IP and MAC address (which he wants) to newly created VM manually.
1. Select vCenter (Your vCenter servers are those servers, you added under Server Setup tab)
2. Select Datacenter
3. Select Hostname
4. Select APP (OVH/SoYouStart if activated)
5. Enter random IP (if you want the random IP, then you need to tick this option)
6. IP (IP Pool / Random IP)
7. Mac Address (enter mac address with related IP, mac address for OVH server)
8. Gateway
9. DNS
10. Netmask
IP Mapping Vmware Module.png

Setting

Click on Update Datacenters button to update datacenters in product custom field.

Note: After configured the module with products, once click on this button to update the datacenters options with Datacenter product custom field.

Vm addon sync dc.png

Provisioning Setting

This section will allow you to create VM on multiple hosts even sample VM templates created on single host. Here you can map your Datacenters, Hosts, Datastores, Networks, Host priority, No. of VM's per host, etc. Follow given below steps to configure it.

1. Click on Datacenter name (Module will list all the hosts related to specific datacenter)

2. Click on Host name/IP (Module will get the specific host info and show in the form)

3. If you want to disable any host for provisioning then enable this option "Disable ESXi/Host".

4. Select specific network for VM provisioning

5. Set priority for specific host (means during VM creation module will create VM on that host which has the high priority)

6. Set No. of VM's (means you can set the no. of VM's with particular host so that module will create only x number of VM's not more than assigned value)

7. After No. of VM's option, you can see the list of all Datastores. You can disable/enable specific datastore and also set the priority with Datastore. For example you have 3 datastores (DS1, DS2 and DS3). If you want module that will create only VM's on DS2 and DS3 then you can disable DS1 and set the priority with DS2 and DS3 (means on which datastore module will create VM on high priority).


Note: If any host is disabled then module will not use that host for VM provisioning. Module will create the VM's on that host and datastore which has high priority. If you want to set high priority then set lower number in priority field.

Host Priority, Datastore Priority, No. of VMS are required. You can not leave them empty.

Provisioing setting.png

How it works

Under product "Module Settings" there is an option for "Select Host". You can select specific host or select host as none. Both cases are define as below.

Case 1. In case of none module will get random host as per the priority and create VM on that host and with that datastore which has high priority. Also module will get IP for that host which has high priority.

Case 2. If you have selected specific host with "Select Host" option then module will create VM on that specific host and with that datastore which has high priority.

Case 3. If you have selected specific host with "Select Host" option then module will get IP for that specific host from IP pool and also show the Guest OS for only that specific host.

Vm module config.png

Note. In case of specific host please make sure from "Provisioning Setting" under VMware addon module that host should not be disabled and priority must be set with that host and that datastores.

Server (provisioning) Module

How to configure the server (provisioning) module with WHMCS?

Let's configure server (provisioning) module with WHMCS.

1. Login as WHMCS admin and then Go to Setup -> Products/Services. Afterwards, create a new test product group with your WHMCS and then create a new test product with this group

2. Now you need to configure welcome email template. Look for “Welcome Email ” Select email template name for “VMware Welcome Email”

3. Now, we have to activate the module in your WHMCS system under Module Settings tab

Server (provisioning) module configuration steps.

1. Select the Module Name “WGS VMware”
2. User defined Configurable Options (If you have enabled it then module will create the product configurable options and allow users to manage resources like (RAM, CPU, HDD, etc) from order page.)
3. Select VMname prefix (VM Name should be like Prefix_Customername_Serviceid).
4. Select Server (select API connection server, that you had created in addon module under Server Setup tab)
5. Memory MB (RAM)
6. Number of Additional IP's (How many number of additional IP's will be assigned to VM)
7. Number of CPU's (How many number of CPU will be assigned to VM)
8. Disk1- First disk partition for VM. It is required
9. Disk2- Second disk partition. (optional)
10. Disk3- Third disk partition.(optional)
11. Disk4- Third disk partition.(optional)
12. Bandwidth Limit (like 10 GB)
13. You can set Bandwidth alert. User will get an email alert in his inbox when user reaches this limit. (Say 85%, when user reaches 85% bandwidth )
14. Over bandwidth price (when user crosses the assigned limit then user creates the bill for over usage bandwidth)
15. Suspend on over usage (if you have enabled this option, then module will suspend the service on over usage)
16. Select Host (If you have selected specific host then module will only will create the VM with specific host and also show the Guest OS Version for that host. If you have selected "None" then module will create VM according to host priority under VMware addon module >> "Provisioning Setting")
17. CPU Limit (MHz)
18. Enable console (https). Enable it, if your WHMCS running on HTTPS://
19. Enable DHCP (Enable if you are using DHCP)
20. Snap Shot Limit
21. Allow configurable options as additional resources (If you want to create pre-defined value product and want to use configurable options as additional resources).
22. Choose any option (when module create command will run)
23. Enable suspend VM on terminating (Enable to avoid VM termination on service termination)
24. Create VM on cron (Enable to create VM on cron in background)


Vm server config.png

Order Process descriptions

The Module works in two ways: set product with fixed value by admin or user can choose the configuration like (RAM, CPU, HDD, etc) on their demand.

Fixed Products

1. Datacenter Name
2. Guest OS Family (Windows, Linux, Others)
3. Guest OS Version (Type of Operating System, like Window10, ubunut 14.10 etc)


Wiki template5.png

Configurable Options

1. Datacenter Name
2. Guest OS Family (Windows, Linux, Others)
3. Guest OS Version (Type of Operating System, like Windows10, ubuntu 14.10 etc)
4. RAM (GB)
5. Numbers of CPU's
6. Hard Disk Size
7. Bandwidth Size
8. Additional IP's
9. Numbers of snapshots
Order configurable.png

How your module looks and works

User can manage the following functionality from client area:-

  • Detail (Server Detail, Network detail, Additional Ip's list)
  • Data Usage (Usage graphs,disks)
  • Action (Power Off,Power On,Pause,Unpause,Soft Reboot,Hard Reboot)
  • VMware Tools (Mount,Unmount,Upgrade VMware Tools)
  • Snapshot (Create,Manage Snapshots)
  • Console

Detail (Server Detail)

User can view the Server detail.

Wiki template7.png

Data Usage

User can view the daily, monthly usage graphs and view the disks detail.

Vm graph.png

Action

User can manage Power Off ,Power On ,Pause ,Unpause ,Soft Reboot ,Hard Reboot and Re-install VM.

Wiki template6.png

VMware Tools

User can Mount,Unmount,Upgrade VMware Tools

Vm tool.png

Snapshot

User can create the VM snapshots and manage these snapshots.

Vm spshot.png

Console

User can login to VM console and manage without using SSH from this area

Wiki template8.png

How to access console view with the module?

We recommend you to use HAproxy server. It will work fine with all vCenter versions and also work with private and public network. You just need to install a new CentOS 7/8 (you can use any OS) VM then configure static public IP and then set domain name and install valid SSL on it. Module will communicate with this proxy server and proxy server will communicate with your ESXi hosts.

Follow this link configure HAProxy: How To Set up And Configure The HAProxy server

After installing the HAProxy, login as your WHMCS admin panel. Go to "Addons" >> "WGS VMware" >> "Proxy Setup". On this setting page enter created proxy server IP or domain name (without https://) and click on "Update Proxy" button to save the setting.

Proxy setup.png

After that login with client and access that VM service and click on console button to open the console panel in WHMCS clientarea.

How to handle the bandwidth over usage?

Our module provides a great feature to manage the over usage bandwidth. You can set the quota limit and bandwidth alert limit from module setup in WHMCS admin. If you set the alert limit (90%) when user reaches and crosses this limit, then our module sends a bandwidth notification email to the user. If user reaches and crosses the quota limit (like 1 GB), then our module will suspend the user service.

To calculate bandwidth you have to configure a cron with your WHMCS server as given below.

Set cron command like this php -q /your whmcs dir path/crons/vmware_manage_bw.php

How to set the cron?

With our module, you can see that we are providing some cron files. You have to configure these files with your server cron job setting.

Set cron command like this php -q /your whmcs dir path/crons/file.php.

We recommend that set these files (update_vm_root_pw.php, wgs_create_vm_cron.php, wgs_reinstall_vm.php) with interval of 5 minutes. Others files you can set with once a day.

How to assign the existing VM with WHMCS?

In this module you can assign your existing VM with your WHMCS user.

Go to WGS VMware addon module -> Assign Existing VM

1. User (WHMCS user)
2. Product (WHMCS products which has "WGS VMware" module assigned)
3. Payment method (select payment method to create the new order)
4. Billing cycle (select billing cycle to create the new order)
5. vCenter Server (select connection server)
6. Existing VM (Select VM, which you want to assign with new order service)
7. Guest OS Family (like Windows/Linux)
8. Guest OS version related to OS family
9. Datacenter (location where you want to install VM)
10. Server Name (where server VM will be located)
11. IP's (assign IP to this new VM)
12. Stop Invoice Creation (while assigning existing VM to WHMCS user, enable this option to stop invoice creation for this VM)
Wiki template9.png

How to assign the existing VM with existing WHMCS user service?

With our module, you can assign your existing VM with existing WHMCS user service. For this go to "Products/Services" tab with specific user service. Follow given below steps to configure it.

1. VMname (put you existing VMname, which you want to assign)
2. Select Datacenter
3. Select Guest OS family (Windows, Linux, Others)
4. Select Guest OS Version (Windows 2012 R2 64 bit, CentOS 4/5, etc)
5. Click on Save Changes button to assign VM.

Note: Fields VNC detail and Hostname should be empty while assigning existing VM.

Assign existing user.png


How to create VM on cron?

With our VMware module, you can create VM instantly or via cron. If you want to create VM over cron then you have to enable the "Create VM on cron" option from the product module setting. Afer enable it you have set the module cron file with your server cron job setting. Login with your Cpanel/Plesk. Go to cron job setting section and configure cron like as given below. We recommend you to set this cron with 5 minutes interval.

*/5 * * * * -q /cron directory path/crons/wgs_create_vm_cron

How to configure the OVH app with VMware module?

As you know that our VMware module supports OVH IP's. Now, our VMware module allows you to configure the OVH app with the module and allow your customers to manage OVH IPs from the client area. Users can manage firewall rules (Enable/disable, Configure Firewall, etc), Failover IP, etc. So here is the detailed procedure on how we can enable the OVH app using our VMware module.

1. Navigate to Addons >> WGS VMware >> Manage Apps

2. Click on the "Activate" button to activate the app.

3. Click on the "Manage" button to configure the app.

4. After that, you will redirect to the app configuration page. On this page, you can see two-button "Key Setup" and "IMAP Setting".

WHMCS - WGS VMware1.png

Key Setup

This section will allow you to configure your OVH and SoYouStart account. Follow the given below steps to configure it.

1. Select "Company Name" (OVH/SoYouStart)

2. Select "Server Location" (Canada, Europe, US)

3. Click on the link "Click to create your app first" in front of "Server Location".

4. You will redirect to your OVH/SoYouStart server.

5. Enter your login detail and configure the APP.

6. Copy and paste the "Application Key" and "Secret Key" in the "Key Setup" configuration form.

7. Enter app Username/Email

8. Click on the "Generate Key" button to configure the app.

WHMCS - WGS VMware (5).png

IMAP Setting

The module has the ability to detect the malware and any suspicious attack on the IP. You just have to configure your IMAP setting with your webmail where OVH sends you the notifications about any malware and suspicious attack. Follow the given below steps to configure it.

1. Account user (select that account user which you have created in Key Setup)

2. Mail server name "youmailserver.com"

3. Port

4. SSl Type (default, SSL, TLS)

5. Username (your mail address)

6. Password (your password)

7. Language

After that click on the "Test Connection" button to check the IMAP connection. After that click on Submit to save the changes.

Note Currently module only supported Webmail IMAP configuration.

WHMCS - WGS VMware imap settings.png


How to mark assigned IP as free IP?

Go to VMware adedon module >> IP Manager >> Select IP pool and edit that assigned IP. In edit form, you can see an option "Mark as free". Click on this checkbox and save the changes.


How to suspend VM on service termination?

Go to "System Settings" >> "Products/Services" >> Edit that specific product >> Module Settings and enable the "Enable suspend VM on terminate" option and then save changes.

Vhost Host cannot be empty

This error shows in that case when the API connection is not established. There are two reasons for this error. The reasons are given below.

1. If you have deactivated and activated the VMware addon module.

2. Deleted the existing vCenter/ESXi server from "Server Setup" in module


In this case when you will activate the module again or add the new server under "Server Setup". Then in DB, there will be a new incremental ID that will be created. So, that's why it happens.


Solution:


Go to Setup >> Product/Services >> Product/Services, edit the specific products which have a WGS VMware module. Go to the "Module Settings" tab and save the module configuration again.

How to create VM template in vCenter?

Ans. Follow given below steps to create VM template.

1. Create a new VM with your vCenter using ISO file with your Center.

2. Open console and Install OS on it.

3. After OS installation install VMware tools on it.

4. For VMware tool install, first of all you need to mount VMware tools from your vCenter with that VM to click on Install Vmware tools/Mount VMware tools.


Image.png


5. After complete all installation process. Power off the VM and convert it to template.

Image (1).png


6. Login as WHMCS admin panel. Go to VMware addon module >> OS Mapping >> Cloning Mapping >> Add Sample VM's >> Fill the OS configuration form and Submit it.

Image (2).png


7. Place order with this added OS and enjoy it.

How to configure the configurable options and price for each option?

In product "Module Settings" tab, there is option "User defined Configurable Options". When you enable this option then module will auto create the required configurable options with product. If you have disabled it but assigned the configurable group with product then module will not get value from configurable options.

For configurable options you need to enable this option. There is another option "Allow configurable options as additional resources". If you want to create pre-defined products (with default set resources "RAM, CPU, HDD" values in product configuration fields) and allow customer to select additional resources value from order page then you need to enable this option "Allow configurable options as additional resources".

Download (1).png

To change the configurable option price, please follow the given below steps.

1. Login as your WHMCS admin panel

2. Go to System Settings >> Configurable Options.

3. Edit the configurable group with the name "VMware Resources" or VMware-productid (VMware-1).

4. After that click on the edit icon with a specific configurable option then a popup will open.

5. Enter the price according to you for all currencies.

6. After that save the changes.

Configurable-option sett.png
Image (4).png