VF VirtFusion Documentation
বাংলা

Phase 2 — Installation#

7 lessons · Level: beginner to intermediate

This phase takes you from empty hardware to a panel that runs, with the first security work done.

What is in this phase#

LessonWhat you learn
1 — Plan the hardware, the OS, and the partitionsWhat to decide before you install
2 — Install the control serverOne script installs nginx, PHP, MariaDB, Redis, and the application
3 — SSL, domains, and CloudflareReplace the self-signed certificate with your own
4 — Install a hypervisor nodeOne command on each bare-metal node
5 — Commission a hypervisor and set its limitsAdd the node, then decide how much of it you sell
6 — The task queue, the services, and updatesMove heavy work to a Redis queue, and keep the software current
7 — Security after the installationThe work to do on the first day

Lesson 1 — Plan the hardware, the OS, and the partitions#

The control server#

ItemMinimumAdvised
RAM2 GB4 GB or more
Disk20 GB40 GB, because the logs and the database grow
Architecturex86_64x86_64

A small VPS is enough. The control server runs no VM, so it does not need a large machine.

But it is the single point of failure. You must keep a backup of it. See phase 4, lesson 9.

Supported OS — the control server (x86_64 only)#

OSCondition
Debian 12 (Bookworm)Fully supported
Debian 13 (Trixie)Fully supported
Ubuntu 22.04 / 24.04Fully supported
AlmaLinux 9 / 10Fully supported
Rocky Linux 9 / 10Fully supported

Supported OS — the hypervisor#

OSx86_64AArch64
Debian 12 / 13YesYes
AlmaLinux 9YesNo
AlmaLinux 10YesYes
Rocky Linux 9YesNo
Rocky Linux 10YesYes
Ubuntu 22.04 / 24.04YesNo
Fedora 44For tests onlyNo

The documentation gives more attention to Debian-based systems. On a hypervisor, Debian is the preference of VirtFusion.

Partitions — the most common mistake#

By default the VM disks are in /home. Therefore:

  • Make /home the largest partition. Give it almost the whole disk.
  • Use the ext4 file system.
  • 30 to 50 GB is enough for /, the root partition.

CAUTION: Set the partitions before you install the OS. The default installer usually gives the whole disk to / and leaves /home small. The space then runs out after a few VMs, and the partitions are hard to change later.


Lesson 2 — Install the control server#

In plain words#

One script does all of it: nginx, PHP, MariaDB, Redis, and the VirtFusion application.

BASH
# Debian 12
apt install curl -y
curl https://install.virtfusion.net/install-control-debian-12.sh | sh -s -- --verbose

# Debian 13
apt install curl -y
curl https://install.virtfusion.net/install-control-debian-13.sh | sh -s -- --verbose

# Ubuntu 22.04 / 24.04 (change VERSION)
apt install curl -y
curl https://install.virtfusion.net/install-control-ubuntu-22-04.sh | sh -s -- --verbose

# AlmaLinux / Rocky 9
dnf install curl -y
curl https://install.virtfusion.net/install-control-rhel-9.sh | sh -s -- --verbose

# AlmaLinux / Rocky 10
dnf install curl -y
curl https://install.virtfusion.net/install-control-rhel-10.sh | sh -s -- --verbose

After the installation#

At the end the script shows two things on the screen:

  • The address of the panel, with a self-signed SSL certificate
  • A temporary administrator account and its password

Write this information in a safe place at once. If you lose the screen, you must reset the password:

BASH
vfcli-ctrl user:reset-admin-password

At the first login you get two choices. You can make an evaluation licence for 30 days, or you can enter a licence key that you bought.


Lesson 3 — SSL, domains, and Cloudflare#

Install your own certificate#

The installer gives a self-signed certificate, and the browser shows a warning. In production, replace it:

BASH
# put your own key and certificate here
/opt/virtfusion/ssl/ssl.key
/opt/virtfusion/ssl/ssl.crt

# then reload nginx
systemctl reload vf-nginx

If you use ACME (Let's Encrypt), port 80 must be open from outside. The certificate is validated on that port.

More than one domain#

The panel can run on more than one domain, for resellers as an example. A separate certificate is made for each one. In the VirtFusion documentation this is called "Multiple Control Server Domains".

Behind Cloudflare#

You can put the control server behind Cloudflare. Remember two things:

  1. To proxy the VNC WebSocket traffic, WebSocket support must be on in

Cloudflare.

  1. During ACME validation, turn the proxy off (the grey cloud). This causes

fewer problems.

CAUTION: Name the Host headers that the panel accepts. If you do not, cache poisoning and phishing links become possible. In VirtFusion this setting is called "Trusted Hosts". If you change the domain, change this setting too.


Lesson 4 — Install a hypervisor node#

In plain words#

Connect to each bare-metal node with SSH and run one command.

BASH
( set -euo pipefail; \
  (command -v apt-get >/dev/null && apt-get update && apt-get install -y curl) || \
  (command -v dnf >/dev/null && dnf -y install curl); \
  curl -fsSL https://install.virtfusion.net/hypervisor-install.sh | bash )

The script installs KVM, libvirt, QEMU, the VirtFusion agent, and UFW.

Make sure of these before you install#

ItemWhy
Virtualization is on in the CPU (VT-x or AMD-V)Without it KVM does not run
/home is large, and it is ext4The VM disks go here
A static IPThe control server connects to this IP
The clock is in sync (NTP)For the licence and for the logs

The network mode#

You do not have to decide this during the installation. You can choose it later from the panel:

Direct (MacVTap), Bridged, Routed, NAT, Open vSwitch Bridged, and Isolated.

MacVTap is the default, and it usually needs no extra network setup. Phase 3 gives the detail.


Lesson 5 — Commission a hypervisor and set its limits#

Step by step#

  1. In the panel, go to Admin → Hypervisors → Add Hypervisor.
  2. Give the name and the IP. IPv4 or IPv6 are both accepted.
  3. Press start. Commissioning begins, and the control server makes a

handshake with the node.

When the commission succeeds, set the resource limits of the node:

SettingWhat to enter
ServersThe maximum number of VMs. 0 means no limit
Virtual CPU CoresThe maximum vCPU. For overcommit, enter more than the physical count
MemoryThe total RAM, less the part the hypervisor keeps for itself
Maximum DiskThe total space, less the part for templates and temporary files
Primary NetworkThe network type (MacVTap, bridge, and the others)

Turn on each section, then press Update.

Hypervisor groups#

Go to Admin → Hypervisor Groups. A "Default" group exists after the installation.

  • Name the group after the location, such as "Dhaka (DC1)" or "United Kingdom

(London)".

  • Set the Server Distribution, which decides the node a new VM goes to.

The customer usually chooses a location. Your application or billing system sends the group id, and VirtFusion chooses the node.

CAUTION: Was the node attached to another control server before? Then a re-commission fails with the error "Commission status done". If the node is clean, delete /opt/virtfusion/app/hypervisor/conf/auth.json and try again. If it is not clean, install the node again.


Lesson 6 — The task queue, the services, and updates#

The task queue (Redis)#

All heavy work goes to a background queue: builds, reboots, and backups. By default the queue is in the database. On a busy system Redis is better, and the installer already installs Redis.

BASH
systemctl status redis

# /opt/virtfusion/app/control/.env
QUEUE_CONNECTION=redis        # or database

vfcli-ctrl app:restart --services=queue

Keep the software current#

VirtFusion changes quickly. An old version holds errors and security risks. Keep both the control server and every hypervisor current.

Before you update, look for server tasks that are still running. If a task is stuck, clear it first:

BASH
vfcli-ctrl task:cancel        # cancels tasks that ran for more than 10 minutes

Lesson 7 — Security after the installation#

In plain words#

The panel is open on the internet. Do this work on the first day.

1. Restrict the administrator panel to one IP#

BASH
vfcli-ctrl admin:ip-restrict enable
vfcli-ctrl admin:ip-restrict addip 203.0.113.10
vfcli-ctrl admin:ip-restrict list
vfcli-ctrl admin:ip-restrict delip 203.0.113.10
vfcli-ctrl admin:ip-restrict disable

WARNING: Add your own current IP first, then enable the restriction. In the other order you lock yourself out. You can then run disable only from the server console or over SSH.

2. Two-factor authentication (2FA)#

Turn 2FA on for every administrator account. In an emergency, this command turns it off:

BASH
vfcli-ctrl tfa-force-off

3. Trusted Hosts#

Name the Host headers that the panel accepts. This stops cache poisoning and phishing.

4. Patch the host kernel#

Three KVM vulnerabilities became public in 2026: Januscape (CVE-2026-53359), Zapscape (CVE-2026-64561), and ITScape (CVE-2026-46316). The first two are on x86_64. The third is on arm64.

There is one correction: patch the host kernel and reboot. On x86, until the patch arrives, the interim measure is to keep nested virtualization off. On arm64 there is no alternative to the patch.

5. The rest#

TaskCommand or place
Turn the captcha off (only if you must)vfcli-ctrl captcha-off
Reset the system credentialsvfcli-ctrl system:reset-access-credentials
Stop an accidental server deletevfcli-ctrl server:dnd enable SERVER_ID
The QEMU sandboxKeep it on. To turn it off is not advised

At the end of phase 2 you can#

  • Plan the correct OS and partitions
  • Install the control server and a hypervisor
  • Set up SSL and the domain
  • Commission a node and set its resource limits
  • Move the queue to Redis, and keep the software current
  • Do the first-day security work

Next: Phase 3 — Network and storage