WHMCS OpenVZ/Virtuozzo Automation Module

Specifications

Introduction

Installation

Two ways to install:

Requirements


Installation with installer script

Installer script can be run on WHMCS for Linux server. This is recommended way to install OpenVZ/Virtuozzo module.


Manual installation


Prepare OpenVZ or Virtuozzo server (HN)


Usage Virtuozzo/OpenVZ module in WHMCS

Server configuration


Product / Service configuration

This is the last thing we have to touch here, Next step involves setting up the products.


OS Selection Creation

We've had more than a few people ask about allowing the customers to select which OS they want created. We've done this, and updated our files.

1. There is a new config.inc.php file. It looks like this.

<?php
# Get Variables from storage (retrieve from wherever it's stored - DB, file, etc...)
$licensekey = "vzmod123ab45678cdef9";

/** DO NOT EDIT BELOW THIS LINE **/
$os_templates = array (
        "CentOS 4 32bit"        =>      "centos-4-x86",
        "CentOS 4 64bit"        =>      "centos-4-x86_64",
        "CentOS 5 32bit"        =>      "centos-5-x86",
        "CentOS 5 64bit"        =>      "centos-5-x86_64",
        "Debian 5 32bit"        =>      "debian-5.0-x86",
        "Debian 5 64bit"        =>      "debian-5.0-x86_64",
        "Debian 6 32bit"        =>      "debian-6.0-x86",
        "Debian 6 64bit"        =>      "debian-6.0-x86_64",
        "Fedora Core 11 32bit"  =>      "fedora-core-11-x86",
        "Fedora Core 11 64bit"  =>      "fedora-core-11-x86_64",
        "RedHat EL 5 32bit"     =>      "redhat-el-5-x86",
        "RedHat EL 5 64bit"     =>      "redhat-el-5-x86_64",
        "RedHat EL 6 32bit"     =>      "redhat-el-6-x86",
        "RedHat EL 6 64bit"     =>      "redhat-el-6-x86_64",
        "SuSE 11.3 32bit"       =>      "suse-11.3-x86",
        "SuSE 11.3 64bit"       =>      "suse-11.3-x86_64",
        "SuSE 11.4 32bit"       =>      "suse-11.4-x86",
        "SuSE 11.4 64bit"       =>      "suse-11.4-x86_64",
        "Ubuntu 9.04 32bit"     =>      "ubuntu-9.04-x86",
        "Ubuntu 9.04 64bit"     =>      "ubuntu-9.04-x86_64",
        "Ubuntu 10.04 32bit"    =>      "ubuntu-10.04-x86",
        "Ubuntu 10.04 64bit"    =>      "ubuntu-10.04-x86_64",
);
?>
With OpenVZ/Virtuozzo they use their template name (For Example, "centos-5-x86_64"). We did it this way so it can translate "CentOS 5 64bit" to "centos-5-x86_64" This will allow your customers to choose which OS they want when they purchase an item on your site.

Windows: Virtuozzo for Windows does not allow templates from one to the other. If your hardware node is Windows 32 bit Enterprise ALL of your containers are going to be Windows 32 bit Enterprise. There is no way to change this in windows.

2. Setting up products and services.

You will notice here, we named the Custom Field "Operating System", Field Type "Drop Down", and Field Options "CentOS 4 32bit, CentOS 4 64bit, CentOS 5 32bit, CentOS 5 64bit, Fedora 9 64bit" (Comma separated OS list).

NOTE: Field options have to match the config.inc.php file. If your template name in config.inc.php is "CentOS 5 32Bit", It has to match EXACTLY in the Field Options. (caps matter) You also have to remember that if you want to use this option. In Virtuozzo you have to go into your sample config, you have to remove the Application templates, save, then set the OS to "None".

We are working on a work around to be able to allow you to select this stuff given the OS they want. But right now this is a problem with Virtuozzo, and how it handles ez templates with given the operating system.


Test

This really concludes everything.

Lets do a test run to see if it works!

Our Container was created and works.


Manual order confirmation

If auto-configuration is not setup for a product or something prevents it after order creation and payment, the order takes Pending status. Such orders require manual intervention to be accepted.