Skip to main content
tiCrypt

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.

Prerequisites

Libvirt realms require:

  1. Root SSH access from ticrypt-vm to all VM hosts (RSA-2048 public key injected into /root/.ssh/authorized_keys on each host)
  2. 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.

ParameterTypeRequiredDefaultDescription
disabledBooleanfalseWhen true, the realm is disabled and its other options are not checked
driverlibvirt✅Must be set to libvirt
nameStringThe realm IDDisplay name of the realm
volumes-poolStringticrypt-vmLibvirt storage pool where the temporary OS drives of VMs are created
drives-poolStringticrypt-vm-drivesLibvirt storage pool where new drives are created
bricks-poolStringticrypt-bricksLibvirt storage pool for VM images
iso-poolStringticrypt-vm-isosLibvirt storage pool for uploaded ISO images
secure-networkStringdefaultName of the libvirt network that secure VMs attach to
service-networkStringserviceName of the libvirt network that service VMs attach to
network-filterStringLibvirt network filter applied to VMs whose image does not name one. See nwfilter docs.
enabled-hostsArrString[]Names of the hosts in this realm that are enabled and connected to. Hosts are registered in the web app; see Hosts
log-schedulingBooleanfalseEnable debug logging for the VM scheduler
max-host-optionsInt5Maximum number of hosts to try when creating a VM
registration-timeoutDuration4 minutesMaximum time for a VM to boot and register
registration-timeout-debugDuration2 hoursThe same limit for VMs started from an image with a video or console debug option
poll-frequencyDuration10 secondsHow often to check VM status
attach-sleep-timeInt2000Milliseconds to wait between refreshing the storage pools and attaching a drive
cacheString"writeback"Cache strategy for the main VM image. Same values as drives.cache (see below)
ioString"default"I/O strategy for the main VM image: default, native, or threads
drives.min-sizeSize8 MiBMinimum allowed drive size
drives.max-sizeSize8 GiBMaximum allowed drive size
drives.lazy-allocationon, offonWhether to delay drive space allocation
drives.cacheString"default"Drive cache strategy (see below)
drives.ioString"default"I/O strategy for attached drives: default, native, or threads
drives.queuesInt0I/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
uploadsSectionChunk size, staging directory, and storage pool for uploaded images and drives
scalingSectionHosts obtained from a reservation system. Off unless scaling.enabled = true
vm-controllersSectionNames 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.

info

The default pool names are sufficient for single-instance deployments. Change them only when multiple tiCrypt instances share the same Libvirt infrastructure.

warning

Do not set registration-timeout too short. VMs that cannot boot and register within this window are terminated.

tip

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.

ValueBehavior
"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.

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