KVM & VPS Engine

Provision and operate KVM virtual machines locally or across Fleet hypervisors, including snapshots, patching and migration.

One-Click documentation · Step-by-step guide

One-Click can turn suitable controller or Fleet members into KVM hypervisors and manage guests through the same shell-native control model.

Before You Enable Virtualisation

The KVM VPS engine is disabled by default. Configure it on the intended controller or hypervisor before creating any guests. Work from an out-of-band console or with a tested recovery path: initialisation can install KVM/libvirt packages and configure networking, firewall/NAT, WireGuard and host bridges. These changes can interrupt a remote SSH session.

sudo grep -E "^(ENABLE_VPS|VG_ALLOC|REQ_BUFFER|ALLOC_THRESHOLD|IMG_STORAGE_PATH|VNC_WEB_TIMEOUT)=" /usr/local/bin/one-click
sudo cp -a /usr/local/bin/one-click /root/one-click.pre-vps.bak
sudoedit /usr/local/bin/one-click

The installed launcher contains the configuration block near its beginning. Review the storage capacity and networking first, and make a backup of the configuration before editing. When ENABLE_VPS=false, the one-click --vps entry point can prompt to enable it. Alternatively set ENABLE_VPS=true in /usr/local/bin/one-click using a privileged editor. Do not modify unrelated shell functions.

ENABLE_VPSFeature gate. Defaults to false; enable before setup.
VG_ALLOCPercentage of applicable host storage allocated to the virtual-machine LVM pool; default 50. Size against free capacity, not just total disk size.
REQ_BUFFERFree-space buffer for selected Windows provisioning operations; default 20 (GiB in this configuration).
ALLOC_THRESHOLDMinimum allocation threshold in MiB for volume provisioning; default 5120.
IMG_STORAGE_PATHWhere downloaded/base VM images are staged: /etc/one-click/virtualization/storage by default.
VNC_WEB_TIMEOUTLifetime of the temporary browser console; default 600 seconds.

First-Use Preparation During Creation

Initialise Fleet on the controller and register the intended hypervisor first. After planning the host and enabling VPS functionality, use a complete guest creation command. One-Click prepares a missing virtualisation environment as part of that workflow; VPS preparation is not a separate CLI subcommand.

Follow a NAT Linux VPS from controller setup to a published service. Expand each stage for the commands and decisions involved.

01Establish Fleet

Run from the intended controller. Add the target hypervisor by its reachable address and verify SSH/Ansible access before provisioning.

one-click fleet init
one-click fleet add <hypervisor-ip> hypervisor1 [ssh-port]
one-click fleet list
one-click fleet verify
02Plan and enable VPS hosting

Confirm hardware virtualisation, recovery-console access, storage capacity and the host network plan. Review ENABLE_VPS and the allocation settings in /usr/local/bin/one-click. The VPS entry point offers to enable the feature if it is disabled. Preparation can change host bridges and network services, including when starting with a NAT guest.

sudoedit /usr/local/bin/one-click
03Request a guest

Choose a unique name, a Fleet hypervisor, an image, CPU, RAM, disk and network mode. This Linux example omits --password and uses the Fleet SSH key. Supply your own values and use a supported image profile.

one-click --vps create --target hypervisor1 --name web1 --image debian13 --cpu 2 --ram 2048 --disk 20G --mode nat
04Prepare the environment on first use

The create workflow resolves the image and checks the selected host. If its virtualisation environment is missing, One-Click invokes setup within that workflow. Confirm the initialisation prompt only after reviewing the host plan. Setup prepares controller tracking, address pools, WireGuard configuration and the target KVM/libvirt networks. Subsequent creations reuse the prepared environment.

05Build and start the VPS

Provisioning checks target resources, prepares guest storage and configuration, creates the libvirt guest and waits for network access. The path varies by image: Linux cloud-image provisioning, installation media and Windows builds have different stages. Larger downloads and OS installations take longer.

06Verify inventory and access

Inspect the guest and its owning hypervisor, confirm Fleet registration and test SSH. Check the hypervisor network and guest service before exposing a workload. If libvirt contains the VM but the inventory does not, investigate registration before creating it again.

one-click --vps list
one-click --vps info web1
one-click fleet list
one-click fleet verify
one-click --ssh web1
07Publish the required service

For NAT guests, configure HAProxy on the owning hypervisor after the guest service is running. DNS points to that hypervisor’s public address. This HTTPS example forwards to port 443 in the guest, where its web server presents the certificate.

one-click proxy --target web1 --website app.example.org --proto https
one-click --vps snapshot create --target web1 --name before-change

How the VPS Network Fits Together

Management

One-Click controller

Fleet inventory, SSH/Ansible orchestration and VPS operations

Fleet hypervisor A

Public address ALocal HAProxyPublished service traffic to this host’s guest
NAT VPS · web1Guest application and HTTPS certificate

Guest outbound traffic uses this hypervisor’s NAT.

Fleet hypervisor B

Public address BLocal HAProxyPublished service traffic to this host’s guest
NAT VPS · web2Guest application and HTTPS certificate

Guest outbound traffic uses this hypervisor’s NAT.

The controller can also host guests when configured as a hypervisor. WireGuard connectivity does not move a public IP or provide service failover; availability depends on the configured routing and recovery design.

Create a Guest

one-click --vps create --target hypervisor1 --name db1 --image ubuntu24 --cpu 2 --ram 4G --disk 40G --mode nat

Guests can be built with NAT or public networking depending on the environment. NAT guests can later be published through the edge proxy or reached through the private mesh.

Lifecycle Operations

--vps start / stopPower state.
--vps editGuest configuration.
--vps snapshotSnapshot lifecycle.
--vps backupGuest backup.
--vps patchPatch workflow.
--vps reinstallOS reinstallation.
--vps migrateMove a guest between suitable hypervisors.
one-click --vps snapshot create --target web1 --name backup_v1
one-click --vps migrate --target hypervisor2 --name web1
one-click --vps reinstall -n web1 -i ubuntu24 --password '<temporary-password>'

VPS Movement: Fleet-to-Fleet Migration vs Import/export

One-Click has two intentionally different VPS movement mechanisms.

Fleet-to-Fleet migrationone-click --vps migrate is a hypervisor-level move. The VM is shut down, its libvirt XML and disk artifacts are copied to another trusted Fleet hypervisor, the VM is defined and started there, and the virtualization ledger is updated.
External import/exportone-click --vps import and one-click --vps export --name <vps_name> are guest-filesystem migrations. They are intended for crossing the Fleet boundary or moving into a freshly provisioned replacement while preserving destination boot/network/SSH identity.

Use Fleet-to-Fleet migration when both hypervisors are already part of the same Fleet and you want to move the actual VM disks and configuration. Use import/export when the source or destination is outside the Fleet or when the replacement machine must retain its own infrastructure identity.

Safeguarded Fleet-to-Fleet migration stages the destination first, validates the copied VM before committing inventory, and retains the original source VM shut down with autostart disabled after success. If migration fails before commit, the destination copy is removed and the original VM is restarted with its previous autostart state restored.

Create, Inspect and Connect

The following illustrates a NAT guest once the engine and Fleet hypervisor are ready. Replace the name, target and credentials with your own values; avoid leaving real passwords in shared shell histories or documentation.

one-click fleet list
one-click fleet verify
one-click --vps create --target hypervisor1 --name web1 --image debian13 --cpu 2 --ram 2048 --disk 20G --mode nat --password <password>
one-click --vps list
one-click --vps info web1
one-click --ssh web1

Confirm the VM appears in both the VPS inventory and Fleet inventory and can be reached using the expected route. If a VM is visible in libvirt but not in the ledger, investigate registration rather than recreating the VM. NAT guests can be published through the HAProxy edge proxy after verifying backend networking and required ports.

Snapshots, Backups and Migration

SnapshotA short-term guest rollback point associated with the hypervisor. Not an independent off-host backup.
VPS BackupA hypervisor-side backup workflow. Check storage usage, archive verification and the exact restore scope before relying on it.
Data BackupRsync/rclone-backed file and application data copies, ideally with an off-host destination and tested restoration.
Fleet MigrationMoves a VM to another trusted Fleet hypervisor. It is not a substitute for recovery copies.
Import / ExportMoves guest filesystem data across the Fleet boundary while preserving destination-specific infrastructure identity.
one-click --vps snapshot create --target web1 --name before-upgrade
one-click --vps view
one-click --vps backup create --target web1 --name weekly-copy
one-click --vps migrate --target hypervisor2 --name web1

Take recovery points before maintenance, keep separate off-host data backups, test restores on non-production guests and retain access to the hypervisor console. For migration and export differences, read VPS Import & Export and Backup & Restore.

For step-by-step serial-console recovery and time-limited browser VNC sessions, see the VPS Console & Temporary Web VNC guide.