Integrating VMmanager with BILLmanager

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM ->INTEGRATIONS
VMmanager Cloud ->INTEGRATIONS

You should integrate BILLmanager with VMmanager KVM/OVZ with administrator privileges (not root).

Add-ons

VMmanager KVM and VMmanager OVZ support the followingVMmanager OVZ add-ons for service packages:

  • Disk size (this parameter cannot be modified upon service activation. We recommend selecting the check box "Forbid clients to change the package"
  • Number of CPU
  • CPU frequency
  • RAM (consider the minimum values allowed for order on a specific OS)
  • Number of IP addresses
  • Number of IPv6 addresses (at least one parameter must be not less than 1, otherwise it will be impossible to create a VPS)
  • Operating system. Should be specified if you use commercial operating system.

For VMmanager OVZ the following add-ons are also supported:

  • Processes - corresponds to proc in BILLmanager.
  • File descriptors - corresponds to files in BILLmanager.
  • Incoming traffic - by default it is not present in BILLmanager. Internal name is chratein
  • Outgoing traffic - by default it is not present in BILLmanager. Internal name is chrateout
  • swap to RAM ratio (in %) - by default it is not present in BILLmanager. Internal name is swapratio

You can bill clients for the following add-ons:

  • traffic - information about both incoming (the in parameter) and outgoing (the out parameter) traffic is taken from VMmanager KVM/VMmanager OVZ

BILLmanager 4.0.76.4 and later collects the following data as well:

  • io - number of input/output operations. These data is collected in hundreds of i/o operations per 24 hours (internal name for the unit of measure is hio), add-ons to the service package can have iops as a unit of measure, that is 864 times less than hio - the total number за i/o operations multiplied by the number of seconds in 24 hours.
  • cpu - CPU usage time. These data is collected in seconds of CPU time per 24 hours

Processing orders

  1. Make sure there is a VMmanager user associated with the client who orders the service.
  2. If not, the account will be created in VMmanager, and all client's services will be associated with that account.
  3. VMmanager will send parameters of the selected OS template. получаются значения параметров выбранного шаблона виртуальной машины.
  4. If add-ons are configured in BILLmanager, default values will be changed into that values.
  5. IP addresses will be checked. If IPv4 is not present, IPv6 address will be assigned to the virtual machine.
  6. The VM creation command will be sent to VMmanager.
  7. After getting response from the server, the OS installation process will be checked every 30 seconds. Once installed, the service will be considered active and a corresponding notification will be sent to the client.

Additional information in XML of the welcome letter

You can add the following parameters into the welcome letter:

<itemparam.password>xxx</itemparam.password> - VMmanager user password 
<itemparam.account>test.recalc</itemparam.account> - VMmanager username 
<itemparam.vnchost>188.120.238.162</itemparam.vnchost> - IP address for connecting via VNC
<itemparam.vncport>5900</itemparam.vncport> - VNC port

Additional information

If integration with IPmanager is used when configuring integration between BILLmanager and VMmanager KVM/OVZ, add Option ExternalIpAllocation into the VMmanager KVM/OVZ configuration file

BILLmanager will get from VMmanager OVZ a list of containers and OS templates after configuring VMmanager OVZ. In VMmanager OVZ be sure to add and configure IP addresses, OS templates, and at least one user, so that BILLmanager could get the required templates.

Data transfer from VDSmanager

BILLmanager 4.0.77.1 and later can automatically synchronize data of virtual machines transferred from VDSmanager into VMmanager OVZ or VMmanager. Run the following:

/usr/local/ispmgr/sbin/cpvmmgr fix

Complete the following steps to transfer virtual machines and containers:

  1. Set VDSmanager to manual processing
  2. Transfer virtual machines or containers on the new server with VMmanager KVM or VMmanager OVZ
  3. Add connection to VMmanager KVM or VMmanager OVZ, if it was not added before
  4. Execute the command
/usr/local/ispmgr/sbin/cpvmmgr fix

While running the above command, the module will be searching for all the virtual servers in BILLmanager that are connected to the server with VMmanager KVM/VMmanager OVZor servers with manual processing. In VMmanager KVM/VMmanager OVZ the following changes will be made(the search is made by IP address):

  1. If the virtual server in BILLmanager does not have the id for identification in VMmanager KVM/VMmanager OVZ, it will be received from the control panel and saved into the database.
  2. If the name of user who owns the virtual server in VMmanager KVM/VMmanager OVZ is not specified in BILLmanager, in the control panel a new user corresponding to the user in BILLmanager will be created, or the name of the existing user will be received. That username will be saved into the database as the owner of the virtual server.
  3. The owner of the virtual server or container will be changed into the user created/received on the previous step.
  4. If previous owner of the virtual machine/container does not have any virtual machines, it will be deleted
  5. If needed, in BILLmanager the processing server will be changed into that with VMmanager KVM/VMmanager OVZ.

Once you have completed the steps above, all of the actions with virtual servers in BILLmanager will be performed automatically.