VirtFusion
Sell KVM virtual private servers (VPS) on your
VirtFusion control panel.
When an order is activated, BAMCS creates the VPS from your VirtFusion package,
installs the chosen operating system and emails the client their login details.
Clients control their VPS from the BAMCS client area and can open VirtFusion with
one click, without logging in again.
|
|
| Type |
Provisioning (service) module |
| Version |
1.0.0 |
Features
Automatic provisioning
- Create: when a service is activated, the VPS is created from the product's
VirtFusion package in the chosen hypervisor group, with the number of IPv4
addresses you set and optional IPv6.
- Operating system: the product's default OS, or the client's choice, is
installed straight away. You can also leave the OS out so the client installs
one themselves.
- Resource overrides: memory, CPU cores, storage, traffic and network speed
can be raised or lowered per product without creating extra VirtFusion
packages.
- Client options: clients can pick their hostname, OS and other options, and
add an SSH key at checkout.
- VirtFusion account: each BAMCS client is linked to one VirtFusion user. The
user is created on the first order and reused for later orders.
- Login details: the panel login and the VPS root password are stored
encrypted and included in the welcome email.
- Suspend, unsuspend and terminate follow the service status in BAMCS. For
example, an overdue service is suspended and unsuspended once it is paid.
- Upgrades and downgrades move the VPS to the new product's package and
apply its memory, CPU and traffic settings.
- Safe to retry:
- The VPS is linked to the service as soon as it is created, so a retry
continues with the same VPS instead of creating a second one.
- Deleting a VPS that is already gone counts as done. A wrong panel address
never counts as deleted.
- Failures: failed actions are retried automatically. If they still fail,
staff get an alert and can retry the action from the service page. The client
is told their setup is delayed.
Client area
The client's service page shows a VPS panel with:
- Live status: running, stopped, paused, suspended, installing, install failed
or no OS installed.
- Boot, Restart, Shut down and Power off buttons.
- Open control panel, which signs the client straight into VirtFusion for
this VPS (single sign-on).
- Reset root password, which sets a new root password through the guest
agent and shows it once.
- The hostname, IPv4 addresses, IPv6 subnets, CPU cores, memory, storage, and
traffic used against the limit.
Actions are rate limited per service to prevent abuse.
Server inventory
- Several panels: add one or more VirtFusion panels to the BAMCS server
inventory and group them into server groups.
- Server choice: new orders go to a panel in the product's group that still
has room.
- Locations: each panel can set its own hypervisor group, so a server group
can stand for a location. Clients can also pick the hypervisor group per
order.
- Health check: every panel is checked hourly. A panel that stops responding
gets no new servers, and staff are alerted.
Requirements
- A VirtFusion control panel reachable from your BAMCS server over HTTPS.
- A VirtFusion API token created in your VirtFusion admin area.
- At least one package and one hypervisor group set up and enabled in
VirtFusion.
- OS templates with the QEMU guest agent, if clients should be able to reset
the root password from BAMCS.
- The BAMCS queue worker and scheduler running. Provisioning runs in the
background, and the health check runs on the scheduler.
Installation
- In BAMCS, go to Modules → Marketplace and install VirtFusion.
Alternatively, upload the module
.zip under Upload a module package.
- Under Installed Modules, click Activate.
Configuration
Step 1: Add your panel
Go to System → Server Inventory → Add Server:
| Field |
Value |
| Name |
Any name, for example "VirtFusion Amsterdam". |
| Hostname |
Your VirtFusion URL, for example https://cp.example.com. |
| Module |
VirtFusion |
| Server Group |
The group this panel belongs to. Create one first with Add Server Group. |
| Username |
Not used. Leave empty. |
| API Key / Password |
Your VirtFusion API token. |
| Maximum Services |
Optional cap on the number of VPS placed on this panel. |
Optionally, save the server, open it again with Edit, and set the
Hypervisor group ID to deploy every VPS on this panel into that group. Click
Test connection to check the URL and the token.
Step 2: Module settings (optional)
Modules → VirtFusion → Settings has a fallback Panel URL and API
token, with a Test saved connection button. They are only used for
products without a VirtFusion server in the inventory. With the inventory set up
as in Step 1, you can leave them empty.
Step 3: Create a product
Go to System → Services Catalog and create or edit a product.
- On the Module Settings tab, choose VirtFusion as the module and select
the Server Group.
- Set Auto Setup to control when the VPS is created:
- Payment: once the first invoice is paid.
- Invoice Created: as soon as the order's invoice exists.
- Manual: when staff activate the service.
- Fill in the VirtFusion fields. Packages, hypervisor groups and operating
systems are loaded from your panel.
| Field |
Default |
Description |
| Package |
– |
Required. The VirtFusion package the VPS is built from. |
| Hypervisor group |
– |
Where the VPS is deployed. Required unless the inventory server or the client's choice sets one. |
| Default operating system |
– |
OS installed on creation. Choose "None, the customer installs one" to skip it. |
| IPv4 addresses |
1 |
Number of IPv4 addresses. |
| Memory (MB) |
Package value |
Leave blank to use the package's value. |
| CPU cores |
Package value |
Leave blank to use the package's value. |
| Storage (GB) |
Package value |
Leave blank to use the package's value. |
| Traffic (GB) |
Package value |
Leave blank to use the package's value; 0 = unlimited. |
| Inbound speed (kB/s) |
Package value |
Leave blank to use the package's value. |
| Outbound speed (kB/s) |
Package value |
Leave blank to use the package's value. |
| Enable IPv6 |
Off |
Assigns an IPv6 subnet. |
| VirtFusion emails build details |
Off |
Lets VirtFusion send its own build email as well. BAMCS already sends a welcome email, so this is usually left off. |
| Enable client area panel |
On |
Shows the VPS panel on the client's service page. |
Client choices
Configurable options can override any field above. Name the option after
the field's variable, variable|Label, and name each choice value|Label. For
example, a "Memory" option memory_mb|Memory with the choices 4096|4 GB and
8192|8 GB.
The variables are package_id, hypervisor_group_id, os_template_id,
ipv4, memory_mb, cpu_cores, storage_gb, traffic_gb,
network_speed_inbound, network_speed_outbound and ipv6.
Custom fields let the client type a value at checkout. Three are supported:
| Custom field |
Purpose |
hostname|Hostname |
The VPS hostname. Invalid hostnames are ignored. |
ssh_key|SSH public key |
An OpenSSH public key that is added to the VPS. |
os_template_id|Operating system |
A VirtFusion OS template ID. A configurable option is usually the better choice here. |
The client's choice wins over the product setting. For the hypervisor group, the
order is:
- The client's choice.
- The inventory server's Hypervisor group ID.
- The product setting.
Welcome email
After the VPS is created, BAMCS sends the product's welcome email. Without a
custom welcome email, it sends the standard "service activated" email. Put
{{access_details}} in the template to include:
- the VirtFusion panel URL, email and password
- the root password
- the hostname
- the IPv4 address and IPv6 subnet
Limitations
- No reinstall from BAMCS: reinstalling or changing the OS isn't available in
BAMCS. Clients do it in VirtFusion through Open control panel.
- Root password only: the password reset changes the
root password, so it
is meant for Linux templates.
- Package changes: upgrades and downgrades apply the new package, memory, CPU
cores and traffic. Storage, network speed, IPv4 count and hypervisor group
changes are not applied to an existing VPS.
- Install failures: BAMCS starts the OS installation but doesn't wait for it
to finish. If VirtFusion's installation fails, the client sees "Install failed",
and staff must rebuild the VPS in VirtFusion.
- Existing VirtFusion users: a client who already has a VirtFusion account
linked to their BAMCS account gets no panel password in the welcome email. They
sign in with Open control panel.
- Hostname: the hostname comes only from the
hostname custom field or
option. A domain entered on the order isn't used.
- Capacity: the inventory's Memory Capacity and Disk Capacity limits
don't apply to VirtFusion panels. Use Maximum Services to cap a panel.