VF VirtFusion Documentation
বাংলা

Phase 1 — What it is, and how it fits together#

6 lessons · Level: beginner

This phase tells you what VirtFusion does, how it is arranged inside, and what each word means.

What is in this phase#

LessonWhat you learn
1 — What VirtFusion is, and the problem it solvesThe layer VirtFusion adds on top of plain KVM, and what it leaves to you
2 — The control server and the hypervisorWhat each part does, and the port they speak on
3 — The words you needThe words that come back in the other six phases
4 — Licences and what they costOne key for each cluster, and a VM limit for each node
5 — The ports you must openWhich port must be open, and in which direction
6 — VirtFusion or Proxmox: a first lookWhere the purpose of the two products differs

Lesson 1 — What VirtFusion is, and the problem it solves#

In plain words#

You have a bare-metal server. You want to divide it into VPS and sell them.

You can do this with KVM alone. Then you must build everything yourself: the customer panel, IP allocation, OS templates, bandwidth accounting, the VNC console, and the billing connection.

VirtFusion gives you that layer. It is not a hypervisor itself. Plain Linux KVM runs below it, with libvirt and QEMU. VirtFusion sits on top and gives management, a panel, and an API.

What it gives you#

It givesWhat that means
Two panelsOne for the administrator, one for the customer
The VM lifecycleCreate, build, start, stop, rebuild, resize, delete
IP managementIPv4 and IPv6 blocks, automatic allocation, rDNS
OS templatesLinux and Windows templates, based on cloud-init
A consoleVNC in the browser, with no SSH
Traffic accountingBandwidth count and limit for each server
BackupsIncremental backups, with more than one storage backend
A billing connectionModules for 7 billing systems, WHMCS among them
An APIA full REST API. You can script every task

What it does not give you#

  • It does not do the billing. Invoices, payment gateways, and tax belong

to a separate system. The one exception is the hourly credit in Self Service. See phase 6.

  • It does not run containers. There is no LXC and no Docker, only full VMs.
  • It does not configure network switches. VLANs and routing stay your work.

Lesson 2 — The control server and the hypervisor#

In plain words#

VirtFusion installs in two parts. If you do not understand this division, the rest stays unclear.

PartWhat it runsHow many you need
Control serverThe web panel, the API, the database, the task queueOne for each cluster
HypervisorKVM, libvirt, and the real VMsAs many as you want

The control server runs no VM. It only gives instructions. The hypervisor obeys the instructions and reports the result.

How they talk to each other#

CODE
customer browser ──443──▶ control server
                               │
                               │ 8892 (HTTPS, both directions)
                               ▼
                       hypervisor 1 … n
                               │
customer browser ──5900+───────┘   (VNC console)
  • The control server sends work to the hypervisor on port 8892.
  • The hypervisor reports back on the same port. Open it in both directions.
  • The VNC console goes from the customer browser straight to port 5900+

on the hypervisor.

Both on one machine?#

This works for a test, but it is not advised. With NAT it does not work at all, because the proxy ports collide. See phase 3, lesson 4.


Lesson 3 — The words you need#

In plain words#

Every object in VirtFusion has one exact name. You do not have to learn this table, but come back to it. The other six phases use these words.

WordWhat it means
HypervisorOne bare-metal node, where the VMs run
Hypervisor GroupA set of hypervisors. Usually one location is one group
Server DistributionThe rule for which node inside a group gets a new VM
PackageA resource plan: vCPU, RAM, disk, traffic, and a number of IPs
ServerOne VM
TemplateAn OS image, ready for cloud-init, that a server is built from
MediaWhere the templates and the ISO files are kept
IP BlockAn IPv4 or IPv6 range that is allocated to a hypervisor
UserA customer account
extRelationIdThe user id in your own system, joined to a VirtFusion user
ProvisionerA script that runs at first boot (bash, python, or cloud-init)
Queue / TaskBackground work. Builds, reboots, and backups all queue here
Self ServiceThe arrangement where a customer makes and deletes servers
Resource PackThe resource quota a customer gets for Self Service
AssetHardware such as a GPU or a USB device, passed through to a VM
ElevateA temporary change to a server, to commit or to discard later

extRelationId — the most important idea here#

Put the user id from your own application, or from WHMCS, into VirtFusion as the extRelationId. Then you do not have to remember the internal VirtFusion user id. You can find the user with your own id:

CODE
GET /api/v1/users/{your-system-user-id}/byExtRelation

Rule: Do not keep the VirtFusion user id as the primary key in your own database. Between your id and the VirtFusion user, extRelationId is the only reliable link. If a user is deleted and made again, the internal id changes. Your id does not.


Lesson 4 — Licences and what they cost#

In plain words#

One licence covers one cluster. It is tied to the control server. However many hypervisors you have, you need only one key. But you must choose a tier for each hypervisor.

TierMaximum VMs on that hypervisor
UnlimitedNo limit
35 servers35
5 servers5
1 server1
Branding RemovalRemoves VirtFusion branding. This is an add-on

You can use different tiers together under one licence. For example, use Unlimited on a large node and 5 on a small test node.

Practical points#

  • You can upgrade or downgrade at any time from the account portal, if no

invoice is unpaid.

  • The licence locks to the control server. To move it to a new server you

must re-issue it, and the number of re-issues is limited.

  • If you open more than one account with the same details, the accounts can be

cancelled automatically.

CAUTION: Keep NTP running on the control server. If its clock is more than 60 seconds away from real time, licence validation fails. Compare the time with chronyc or ntpdate.


Lesson 5 — The ports you must open#

The port list#

ComponentPortProtocolDirectionPurpose
Control server80HTTPInboundGet the SSL certificate (ACME)
Control server443HTTPSInboundThe panel and the API
Hypervisor8892HTTPSBoth directionsControl server to hypervisor traffic
Hypervisor5900+VNCInboundThe console. One port for each session

UFW is installed and running on the hypervisor by default. Remember this when you add rules.

CAUTION: If a VM has no internet but the host does, UFW is blocking the routed packets. This is the most common cause. Correct it on the hypervisor:

BASH
ufw default allow routed

Common mistakes#

  • Port 8892 is open in one direction only. The hypervisor never shows as

"commissioned".

  • Ports 5900+ are blocked. The console shows a black screen.
  • The IP of the control server changed and the hypervisor does not know. Every

call returns a 401 error. Phase 7, lesson 3 corrects this.


Lesson 6 — VirtFusion or Proxmox: a first look#

In plain words#

Both run KVM. The difference is the purpose.

VirtFusionProxmox VE
Who it is forHosting providers, many tenantsSystem administrators, your own infrastructure
Customer panelYes, from the startNo. Everyone sees the administrator UI
ContainersNoYes, LXC
Storagelocal, Ceph, StorPool, Lightbits, remote FSLVM, ZFS, Ceph, NFS, iSCSI
ClusteringControl server and nodes. No quorum neededCorosync quorum, QDevice
HA failoverNo. If a node fails, recovery is manualYes, but it needs fencing
Billing connectionModules for 7 billing systemsNone
LicenceCommercial, one for each clusterFree. A subscription is optional

In short: to sell VPS, use VirtFusion. To run your own servers, use Proxmox. The full comparison and the migration path are in phase 7.


At the end of phase 1 you can#

  • Separate what VirtFusion gives you from what it does not
  • Say what the control server does, and what the hypervisor does
  • Give the meaning of each of the main words
  • Explain how a licence is counted
  • Say which port is needed, and why

Next: Phase 2 — Installation