Libvirt Realms
The Libvirt realm uses KVM/QEMU to control VMs. Realm configuration is defined in a file included from the realms section of ticrypt-vm.conf.
Libvirt realms require:
- Root SSH access from
ticrypt-vmto all VM hosts (RSA-2048 public key injected into/root/.ssh/authorized_keyson each host) - A distributed file system shared by all VM hosts, large enough for VM images, drives, and Libvirt temporary files
See the Installation Guide for host preparation and Libvirt pool setup.
Realm Parameters
All parameters go in the included realm file and should not be nested inside additional sections.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
disabled | Boolean | false | When true, the realm is disabled and its other options are not checked | |
driver | libvirt | ✅ | Must be set to libvirt | |
name | String | The realm ID | Display name of the realm | |
volumes-pool | String | ticrypt-vm | Libvirt storage pool where the temporary OS drives of VMs are created | |
drives-pool | String | ticrypt-vm-drives | Libvirt storage pool where new drives are created | |
bricks-pool | String | ticrypt-bricks | Libvirt storage pool for VM images | |
iso-pool | String | ticrypt-vm-isos | Libvirt storage pool for uploaded ISO images | |
secure-network | String | default | Name of the libvirt network that secure VMs attach to | |
service-network | String | service | Name of the libvirt network that service VMs attach to | |
network-filter | String | Libvirt network filter applied to VMs whose image does not name one. See nwfilter docs. | ||
enabled-hosts | ArrString | [] | Names of the hosts in this realm that are enabled and connected to. Hosts are registered in the web app; see Hosts | |
log-scheduling | Boolean | false | Enable debug logging for the VM scheduler | |
max-host-options | Int | 5 | Maximum number of hosts to try when creating a VM | |
registration-timeout | Duration | 4 minutes | Maximum time for a VM to boot and register | |
registration-timeout-debug | Duration | 2 hours | The same limit for VMs started from an image with a video or console debug option | |
poll-frequency | Duration | 10 seconds | How often to check VM status | |
attach-sleep-time | Int | 2000 | Milliseconds to wait between refreshing the storage pools and attaching a drive | |
cache | String | "writeback" | Cache strategy for the main VM image. Same values as drives.cache (see below) | |
io | String | "default" | I/O strategy for the main VM image: default, native, or threads | |
drives.min-size | Size | 8 MiB | Minimum allowed drive size | |
drives.max-size | Size | 8 GiB | Maximum allowed drive size | |
drives.lazy-allocation | on, off | on | Whether to delay drive space allocation | |
drives.cache | String | "default" | Drive cache strategy (see below) | |
drives.io | String | "default" | I/O strategy for attached drives: default, native, or threads | |
drives.queues | Int | 0 | I/O queues per disk. 0 uses the hypervisor default, a negative value matches the VM's CPU cores, a positive value sets the exact count. Set it to 0 if QEMU reports that num-queues is not supported | |
uploads | Section | Chunk size, staging directory, and storage pool for uploaded images and drives | ||
scaling | Section | Hosts obtained from a reservation system. Off unless scaling.enabled = true | ||
vm-controllers | Section | Names and descriptions of extra VM Controller versions, such as a beta channel. A default version always exists |
The parameters inside uploads, scaling, and vm-controllers are listed under Realm Configuration in the Configuration Explorer.
The default pool names are sufficient for single-instance deployments. Change them only when multiple tiCrypt instances share the same Libvirt infrastructure.
Do not set registration-timeout too short. VMs that cannot boot and register within this window are terminated.
Set drives.lazy-allocation to on in nearly all cases. Storage space is consumed only as data is written, rather than being fully allocated upfront.
Drive Cache Strategies
The drives.cache parameter controls how the host OS caches drive I/O. Leave it at "default" unless you have a specific reason to change it.
| Value | Behavior |
|---|---|
"default" | System default. May be writethrough or writeback depending on the qemu-kvm version. |
"writethrough" | Host page cache enabled, disk write cache disabled. Writes complete only when committed to storage. Similar to O_DSYNC. |
"writeback" | Both host page cache and disk write cache enabled. Behaves like a RAID controller with RAM cache. |
"none" | Bypasses host page cache entirely. Similar to O_DIRECT. |
Example Realm Configuration
disabled = false
driver = libvirt
name = "Primary Libvirt Realm"
volumes-pool = "ticrypt-vm"
drives-pool = "ticrypt-vm-drives"
bricks-pool = "ticrypt-bricks"
registration-timeout = 5 minutes
poll-frequency = 30 seconds
drives.lazy-allocation = on
drives.cache = "default"
drives.max-size = 500 GiB
All three pools share the same underlying distributed file system.
Related Configuration
The following are configured at the service level in ticrypt-vm.conf and apply across all realms:
- Cost Functions: Rules that determine scheduling cost for VM placement
- Hardware Profiles: Hardware descriptions assigned to hosts
- Hosts: Individual machines managed via the tiCrypt UI
- Curves: Built-in functions used within cost functions