Personal tools
Namespaces

Variants
Actions

Proxmox Cloud 2.X For WHMCS

From ModulesGarden Wiki
(Difference between revisions)
Jump to: navigation, search
(About Proxmox Cloud For WHMCS)
Line 164: Line 164:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Supports Templates Five and Six
+
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS Templates Five and Six
 
|}
 
|}
 
{|
 
{|

Revision as of 16:25, 18 September 2015

Contents

About Proxmox Cloud For WHMCS

Proxmox Cloud For WHMCS offers your clients the possibilities to create, remove and freely resize their own virtual servers within resource limits defined by you.

With our module your customers will be able to single-handedly create as many servers as they need and manage aspects like backups, network devices or firewall.
This gorgeous product lets you also conveniently manage servers, IP addresses and clusters owing to the unique Proxmox Addon attached to the module.

  • Admin Area Features:
✔ Create Server/User
✔ Suspend/Unsuspend Server/User
✔ Terminate Server/User
✔ Migrate Server Between Nodes
✔ Import Server
✔ Change User Role
✔ View Server Status, Details And Statistics
✔ View Graphs - With Ability To Change The Time Scale of MRTG Graphs
✔ Display Disk And Bandwidth Usage Of Each Product
✔ Display CPU, SWAP and Memory Usage Of Each Product
✔ Import IP Address To Hosting IP Addresses Table
✔ Return IP Address To IP Addresses Pool
✔ Add Additional IP Address To VM
✔ Configure Functionalities Displayed In The Client Area
  • Proxmox Addon Features:
✔ Servers List (VPS And Cloud)
✔ IP Management (Per Server)
✔ Clusters (Per Server)
✔ KVM Templates
✔ Define VM ID Ranges Per Product
✔ Set Minimum VM ID For Product Without ID Ranges Defined
✔ VM Cleaner - Manage VM Not Existing In Your WHMCS
  • Client Area Features:
✔ Add/Manage/Delete Servers
✔ View Available Resources
✔ Boot/Reboot/Stop/Shutdown Server
✔ Edit Server
✔ VNC/SPICE/noVNC Console
✔ Create/Restore Backups
✔ Backup Routing
✔ Backup Jobs
✔ Backup Limits (Max Number Of Files & Max Size Of Files)
✔ Schedule Backup Limit (Max Number Of Files & Max Size Of Files)
✔ View Graphs - With Ability To Change The Time Scale of MRTG Graphs
✔ Task History
✔ Manage Network Devices
✔ Create Snapshots
✔ Manage Firewall
✔ View Server Status, Details And Statistics
✔ Display Disk And Bandwidth Usage
✔ Display CPU, SWAP and Memory Usage
✔ Change Boot Order (KVM)
✔ Change ISO Image (KVM)
✔ Easy VM Upgrade/Downgrade
  • General Info:
✔ Supports PVE And PAM Authentication
✔ Dynamically Chosen Server Resources While Ordering And Possibility To Upgrade Those Resources
✔ Integrated With Advanced Billing For WHMCS - Server Resource Usage Billing (read more)
✔ Integrated With IP Manager For WHMCS - Complete Management of IP Pools (read more)
✔ Multi-Language Support
✔ Supports Proxmox VE 3 and Later
✔ Supports IPv4 and IPv6
✔ Supports Custom Hooks
✔ Supports WHMCS Templates Five and Six
✔ Supports WHMCS V5 and V6
✔ Requires PHP 5.3 and Later
  • Available Configurable Options:
KVM:
✔ CPU Sockets Limit
✔ CPU Cores Limit
✔ CPU Weight Limit
✔ Memory Limit
✔ Storage Limit
✔ Bandwidth Limit
✔ IPv4 Addresses Limit
✔ IPv6 Addresses Limit
✔ Backups Size Limit
✔ Backups Files Limit
OpenVZ:
✔ CPU Cores Limit
✔ CPU Weight Limit
✔ SWAP Limit
✔ Memory Limit
✔ Storage Limit
✔ Bandwidth Limit
✔ IPv4 Addresses Limit
✔ IPv6 Addresses Limit
✔ Backups Size Limit
✔ Backups Files Limit

Installation and Configuration

This tutorial will show you how to successfully install and configure Proxmox Cloud For WHMCS.

We will guide you step by step through the whole installation and configuration process.

Installation

1. Log in to your client area and download Proxmox Cloud For WHMCS.
File:PXC 1.png
2. Extract the module and upload content of 'UploadOnProxmoxServer' on all Proxmox servers into '/usr/share/novnc-pve/' folder.

Note: If you wish to allow noVNC consoles, you need to configure product using PVE realm and user permissions set to 'PVEVMUser '.

3. Upload and extract the module into the main WHMCS directory.
File:PXC 2.png
4. When you install Proxmox Cloud for the first time you have to rename 'license_RENAME.php' file.

File is located in 'modules/servers/proxmoxCloud/license_RENAME.php' . Rename it from 'license_RENAME.php' to 'license.php' .

File:PXC 3.png
5. In order to configure your license key, you have to edit a previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen.
You can find your license key in your client area → 'My Products' .

File:PXC 4.png

Activation of Proxmox Addon

6. Firstly, you should activate Proxmox Addon.

To do so, log in into your WHMCS and press 'Setup' → 'Addon Modules' . Find 'Proxmox Addon' and press 'Activate' .

File:PXC 5.png
7. In next step you need to permit access to this module.

To do so, click on 'Configure' button. Tick 'Full Administrator' and press 'Save Changes' .

File:PXC 6.png

Configuration of Server

8. Now, we will show you how to configure a new product.

Go to 'Setup' 'Products/Services' 'Servers' and press 'Add New Server' .

File:PXC 7.png
9. Next, enter your server name, IP address, username and password.

Choose 'ProxmoxCloud' from a dropdown menu and press 'Save Changes' .
The last step is choosing authentication from the 'Authentication' dropdown menu.
Note: Authentication depends on the realm used by user on Proxmox server.

File:PXC 8.png
10. After you configure your server correctly, you will see a following screen.

You can check connection with Proxmox server. To do so, simply press 'Test Connection' as shown on the screen below.

File:PXC 9.png
11. It is time to create a server group. To do so, click on 'Create New Group' .
File:PXC 10.png
12. Enter name, click on your previously created server, press 'Add' and afterwards 'Save Changes' .
File:PXC 11.png

Configuration of Product

13. In order to create and configure a product go to 'Setup' → 'Products/Services' → 'Products/Services' .

Click on 'Create a New Group' .

File:PXC 12.png
14. Enter product group name and press 'Save Changes' .
File:PXC 13.png
15. When you have a product group, you are able to create your product.

To create a product click on 'Create a New Product' .

File:PXC 14.png
16. Afterwards, choose your product group and type from dropdown menus, enter your product name and press 'Continue' .

'Product Type' should be set to 'Dedicated/VPS Server' in order to add nameservers later.

File:PXC 15.png
17. Now, go to 'Module Settings' section, choose both 'ProxmoxCloud' and your previously created server group from dropdown menus.

Next, click on 'Save Changes' .

File:PXC 16.png
18. From dropdown menus choose 'Virtualization Type' , 'Default Node' , 'Template & ISO Storage' and 'User Permission' .

You can also choose how often bandwidth usage should be counted.
Afterwards, press 'Save Changes' .
Note: If you choose 'Auto-Node' as 'Default Note', new virtual servers will be created on the least used node.

File:PXC 17.png
19. Setting of KVM virtualization type (skip, if you have chosen OpenVZ virtualization type).

From dropdown menus choose 'KVM OS Type' , 'Default Storage' , 'Disk Type' and 'CD/DVD-ROM Type' .
Additionally, choose ISO images available for your clients by marking them in 'ISO Image' .
Set network through selecting from 'Network Mode' , 'Network Model' and 'Bridge' dropdown menus.
Type your VM description in 'Container Description' , set backup location in 'Storage' dropdown menu and click 'Save Changes' .

File:PXC 18.png
20. Setting of OpenVZ virtualization type (skip, if you have chosen KVM virtualization type).

From dropdown menus choose 'OpenVZ OS Templates' , 'Default Storage' , 'Network Mode' and 'Bridge' .
Type your virtual servers description in 'Container Description' and press 'Save Changes' .

File:PXC 19.png
21. The next step is setting up configuration of backups.

Define backup settings in 'Backups' section through selecting values from 'Storage' and 'Backups Routing' dropdown menus.
Backups routing automatically removes the oldest backup when a new backup is created and a backup limit is reached.
Additionally, you can limit the time period for storing backups by providing the number of days into 'Store The Backup For N Days' field.
Furthermore, you can define firewall rules limit and interface to apply rules to.
Finish configuration at 'Module Settings' tab through pressing 'Save Changes' .
Important: Keep in mind that the root password is generated automatically for KVM virtualization upon its creation and reset.
There is no possibility to set your own password due to Proxmox API limitations to KVM virtualization.

File:PXC 20.png
22. The final step is generating custom fields and deciding whether to set up product with static or configurable resources.

Press 'Generate default' next to 'Custom Fields' .
Static Resources: Fill in the fields in 'Default Configuration' section with desired values.
Configurable Resources: Click on 'Generate Default' next to 'Configurable Options' .
Press 'Save Changes' in the bottom of the page.

File:PXC 21.png
23. In the end of product configuration you have to add cron job shown below (each 5 minutes suggested).
php -q /your_whmcs/modules/servers/proxmoxCloud/cron/cron.php

Do not forget to replace 'your_whmcs' with your WHMCS root location.

Congratulations! You have just finished the installation and configuration of the module.

Configuration of Addon

24. Adding a new IP address.

In order to create a new product you have to add dedicated IP pool to 'IP Addresses' list in 'Proxmox' addon module.
To do so, go to 'Addons' 'Proxmox Addon' 'IP Management' and press 'New IP Addresses' .
Note: You can add both IPv4 and IPv6 addresses.

File:PXC 22.png
25. Type desired IP and mask in 'IP Pool' and choose server from a 'Server' dropdown menu.

Afterwards, press 'Add Pool' .
Note! Automatic IP assignment works only for OpenVZ machines.
KVM virtualization does not support IP Management from module. Instead, IP can be assigned via the console.

File:PXC 23.png
26. You are now able to create new virtual machines at product.

If you used KVM virtualization type, the client area of successfully created product should look similar to the one on the screen below.

File:PXC 24.png
27. The client area of product using OpenVZ virtualization type looks quite similar.
File:PXC 25.png

Management

Proxmox Cloud For WHMCS allows your customers to manage their PVE accounts via client area in your WHMCS system.

You can monitor and manage each product from your WHMCS admin area.
To view VM details(1), migrate VM(2) or update VMs node(3), press a specific button.
To view details of virtual server created by your client simply press 'Load Status' button.

File:PXC 26.png
On the following screen you can see loaded details of the VM as well as opened migration popup.

Migration is useful when you want to request migration from the WHMCS admin area, while editing node is useful for updating details after migrating VM from Proxmox panel.

File:PXC 27.png

Management of Addon

Server List

In 'Addons' 'Proxmox Addon' 'Server List' you can find servers you have configured.

To see the list of products created and assigned to your Proxmox server simply click on its 'Server Name' .

File:PX 28.png
As you can see on the screen below, you can find a lot of useful information here like e.g. IP Address, VM ID or VM Type.
File:PX 29.png

ID Ranges

This page contain feature, which helps you sort created VM.

It enables you to define VM ID ranges configured per product.
any product without ID range defined will be created with ID greater than minimum ID, which can be configured on the same page.

File:PX 29 1.png

IP Management

At 'IP Management' tab you can add, edit and remove IP addresses of Proxmox products.
File:PX 30.png

Clusters

'Clusters' tab contains the list of clusters. To view information about a cluster simply press its name.
File:PX 31.png
Here you can find various information about a cluster, from available resource to usage graphs.
File:PX 32.png

Templates

You can easily convert any VM on your server to a template.

In order to convert VM, go to 'Proxmox Addon' 'Templates' 'Create Template' .
Choose server on which VM to convert exists and press 'Next Step' .
Important: VM will be destroyed in the process.

File:PX 33.png
Next, choose node and VM to convert.

Fill in 'Template Friendly Name' and press 'Save Changes' .

File:PX 34.png
To access the list of all available templates go to 'Proxmox Addon' 'Templates' 'Show Templates' .
File:PX 35.png

VM Cleaner

VM Cleaner allows you to track all VM existing only on your Proxmox server and easily remove any of them.
File:PX 35 1.png

Client Area

Client area interface of Proxmox Cloud For WHMCS allows your clients to create their own virtual servers.

They can also view resources used and manage existing virtual servers.

File:PXC 36.png
In order to add a new server, press 'Add New Server' button.
File:PXC 37.png
Afterwards, enter 'Hostname' , 'Nameserver 1' , 'Nameserver 2' and 'Root Password' .

Choose 'Template' from a dropdown menu and select resources for your server by using sliders.
Instead of using the sliders you can also enter resources values into textboxes.
Confirm creation through pressing 'Add New Virtual Server' .

File:PXC 38.png
To manage your virtual server simply press 'Manage' button next to it.

You can find information about managing your virtual servers in next section.

File:PXC 39.png
If you do not need a particular virtual server anymore, press 'Delete' button to remove it.
File:PXC 40.png

Client Area - VM Management

Client area interface of virtual server should look like the one on the screen below.

As you can see, control panel contains useful options needed for managing VPS.
The module allows your customers to easily boot, stop, reboot and shutdown their servers through pressing a specific button.
Clients can also edit server, access VNC, SPICE and noVNC consoles and view the graphs of resource usage.
Additionally, they are able to create backup, set up backup jobs, access task history and manage network devices.
They can also find here server details and IP addresses assigned to the server.

File:PXC 41.png

Edit VM

Edit feature allows you to change server details and resources except 'Template' and 'Password' . To edit your server, click on 'Edit VM' (5) button.
File:PXC 42.png
Afterwards, alter options you desire and confirm through pressing 'Save Changes' button.
File:PXC 43.png

VNC Console

VNC console allows your clients to remotely manage the server. To access it, simply press the 'VNC Console' (6) button.

Console requires Java software and you need to accept security risk to run it.

File:PXC 44.png

SPICE Console

Spice console(7) enables you to connect with virtual machine using SPICE.

Note: Your client needs to download and install client side SPICE application in order to connect with VM.

File:PXC 45.png

noVNC Console

noVNC console (8) allows your clients to connect with their server in the easiest possible way.
File:PX 39 1.png

Usage Graphs

Under 'Usage Graphs' (9) page, a client can find graph with CPU usage, memory usage, network traffic and disc I/O.

They can also switch the timeline of the graphs by choosing it from a dropdown menu pointed on the following screen.

File:PXC 46.png

Backup

To create a single backup, press 'Backup' (10) button and click on 'New Backup' as shown on the following screen.
File:PXC 47.png
Now choose 'Compress Dump File' and 'Backup Mode' from dropdown menus.

Afterwards, press 'Add Backup' .

File:PXC 48.png
To restore VM from a backup simply press 'Restore' and then click 'OK' button in a popup window to confirm.
File:PXC 49.png

Backup Jobs

By pressing 'Backup Jobs' (11) in the client area, you will be carried to a backup jobs management page.

To add a new backup job press 'New Job' as shown on the following screen.

File:PXC 50.png
Now, define backup time, mark days to run it and choose 'Compression Dump File' and 'Backup Mode' from dropdown menus.

Next, press 'Add' button.

File:PXC 51.png

Task History

All changes of VM status are listed in 'Task History' (12).

Additionally, each access to the VM through SPICE console is shown here.

File:PXC 52.png

Network

'Network' (13) tab allows your clients to view their VM's network interface.

Depending on the settings of the product, they can also create/remove them.

File:PXC 53.png

Firewall

Owing to 'Firewall' page, your clients can set up firewall rules and enable security group for theirs servers from your WHMCS client area.

As you can see, you can easily modify and remove a previously added rules and security groups.
To add a new firewall rule (1) or predefined security group(2) use the buttons marked on the following screen.

File:PXC 53 1.png
You can add a firewall rule in two ways. Both of them require choosing direction, action, interface, source and destination.

The first way (red) is by choosing macro from a 'Macro' dropdown field.
The second way (blue) consist of choosing protocol and filling source and destination ports out.
Additionally, you can enable rule and add a comment to it.
Press 'Add' to create a rule.

File:PXC 53 2.png
Inserting a security group consists of choosing security group and interface on which group has to be used.

Additionally, you can enable security group and add a comment to it.
Click 'Add' to use the security group.

File:PXC 53 3.png

IP Manager Integration

Owing to integration with IP Manager For WHMCS you are able to easily create pools of IP addresses and assign them to desired products.

1. Proceed to IP Manager For WHMCS → IP Pools tab in order to prepare IP addresses pool for Proxmox Cloud For WHMCS.
2. Edit a previously created IP addresses pool and create custom field 'MAC Address' with desired MAC address at each IP address in the pool.
More about creating custom fields can be found here.

PX 49.png
3. Afterwards, create a new configuration and assign a previously created pool to it.

Note: Multiple IP addresses pools can be assigned to a single configuration.
4. Now, link the configuration with Proxmox Cloud product via product, server or configurable option.
On the following screen we have linked them via a configurable option assigned to the Proxmox Cloud product.

PX 50.png
5. Now, enable integration by proceeding to '3rd Party Integration' tab.

Press 'Activate' next to 'proxmoxVPS' module type as shown on the following screen.

PXC 54.png
5. Next, assign a previously created configuration to the submodule.

Press 'Configure' , choose the configuration and press 'Save Changes' .

PXC 55.png

Importing VM

Our module allows you to easily import VM into your cloud product.

To do so, press 'Import VM' as shown on the following screen.

File:PXC45 3.png
Afterwards, select the node on which the server exists and fill in both 'VMID' and 'Password' fields.

Confirm importing through pressing 'Save Changes' button.
Note: If you fill in 'Password' field with an incorrect value, import will be completed successfully but some features may not work for that VM.

File:PXC45 4.png

Custom Hooks

Our module allows you to use custom hooks, all you need is knowledge of PHP programming language.

Custom hooks are placed in 'your_whmcs/modules/servers/proxmoxCloud/customhooks.php' .
You can find there all custom hook and basic information about them.
Full list of available custom hooks:

proxmoxCloud_beforeCreateVM 
proxmoxCloud_afterCreateVM
proxmoxCloud_beforeTerminateVM
proxmoxCloud_afterTerminateVM
proxmoxCloud_beforeCreate
proxmoxCloud_afterCreate
proxmoxCloud_beforeTerminate
proxmoxCloud_afterTerminate
proxmoxCloud_afterSuspend
proxmoxCloud_afterUnsuspend
proxmoxCloud_afterIPAdditionByAdmin
proxmoxCloud_afterIPDeletionByAdmin
proxmoxCloud_afterIPAdditionByUpgrade

Configurable Options

When you successfully set up a product, your clients can order it by choosing from the default configurable options.
File:PXC46.png
If automatically generated configurable options do not seem to fulfill your clients needs, you can edit them using this guide.
File:PXC47.png
If you decide to set up pricing per server resource ordered, you can find instruction to proceed here.
File:PXC48.png

Management of Billing

When you combine Proxmox Cloud For WHMCS with Advanced Billing For WHMCS, you will be able to set up additional billing options.

Module allows you to charge your customers basing on the server resources used by them.

PXC49.png
With Advanced Billing For WHMCS module, you can also display your customers current server resource usage and their cost.
PXC50.png

Tips

1. Operations performed on the virtual servers are not executed immediately. Give your Proxmox Virtual Environment some time for processing the request and execution of operation.
2. Multiple physical Proxmox servers can be joined into one cluster.

When they are joined into one cluster, you can access all of them by connecting to any of them.
While auto-node creates new VM on the server(node) with the most free resources, server-node creates VM on the server(node) which IP address it has (WHMCS's server configuration).

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. Error 'Could not create PVE2_API object' during connecting via noVNC console.

Reason: User account does not have permission to access noVNC console.
Solution: Proceed to product's 'Module Settings' tab and check whether selected user permission grant right for noVNC console.
Afterwards, proceed to client's hosting and run 'Change User Role' on it.

3. Error 'This connection is untrusted' during connecting via noVNC console.

Reason: Your certificate is not valid.
Quick Solution: Your client needs to add Proxmox address to certificate exception list.
Best Solution: Configure valid certificate.

4. Blank page during connecting via noVNC console.

Reason: You did not uploaded 'mgnovnc.html' on to the Proxmox server.
Solution: Extract the module and upload 'mgnovnc.html' file located in 'UploadOnProxmoxServer' on all Proxmox servers into '/usr/share/novnc-pve/' folder.

Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
Proxmox Cloud 2.X For WHMCS