Skip to main content

VM Service (ticrypt-vm)

Last updated: May 31, 2026Latest Frontend Version: 2.16.20
Configuration File

/etc/ticrypt/ticrypt-vm.conf — All options in the ticrypt.vm section.

Service Parameters

ParameterTypeRequiredDescription
mongodbSectionDatabase connection. See mongodb.
cost-functionsSectionVM scheduling cost rules. See Cost Functions.
hardware-profilesSectionHardware descriptions for hosts. See Hardware Profiles.
realmsSectionVM execution environments. See Realms.
licensing-server-driverStringFirewall driver: none or firewalld
reload-freqDurationHow often to rebuild firewall rules
firewalldSectionRequired if licensing-server-driver is firewalld
akka.remote.netty.tcp.hostnameSee Akka
akka.remote.netty.tcp.portSee Akka

Firewalld

If using the firewalld licensing server driver:

ParameterTypeRequiredDescription
file-accessStringFile where firewall rules are written
warning

The file-access path must match the mechanism that transforms rules into firewall access. If using the ticrypt-allowedlist service, set this to /etc/ticrypt/allowedlist.txt.


Realms

A realm is a fully independent VM execution environment with its own VM images and drives.

The realms section includes config files for each realm:

realms {
libvirt1 = { include "realms/libvirt1.conf" }
libvirt2 = { include "realms/libvirt2.conf" }
}

You can define multiple realms. Each realm file contains parameters documented on the Libvirt Realms page.


Hardware Specification

There are four components in VM host hardware configuration:

ComponentDescriptionManaged In
CurvesBuilt-in functions that compute a scheduling cost from a single attribute (VM count, memory, device count)ticrypt-vm.conf
Cost FunctionsRules combining multiple curves to determine total scheduling cost for a hostticrypt-vm.conf
Hardware ProfilesHardware descriptions linking a cost function with resource informationticrypt-vm.conf
HostsIndividual machines that run VMs, each assigned a hardware profiletiCrypt UI

Value Types

TypeExampleDescription
String"an example"String value
Int42Whole number value
Bytes32, 64 MiB, 18 GiBNumber with optional byte unit
Real1.0, 1Real number with optional decimal
RealOrBytes1.0, 32 MiB, 2 GiBReal number or byte value with unit
Curve{curve: invalid}A curve definition
CurveMap{id1: {...}, id2: {...}}Mapping of IDs to curve definitions
Device{type: "gpu", addr: "02:03.4"}Device type and PCI address
DeviceList[{...}, {...}]List of Device entries

Curves

Curves are configuration objects with a required curve parameter that selects a built-in function. The function takes a single numeric input (VM count, memory bytes, or device count) and returns a scheduling cost.

Common parameters (apply to all curve types):

ParameterTypeDefaultDescription
scaleReal1.0Scale factor applied to the curve result
maxRealNoneInput values past this return Infinity (prevents scheduling)

Constant Curve

Type: constant

Returns a fixed value regardless of input.

ParameterTypeRequiredDescription
valueRealThe constant value to return
{ curve: constant, value: 1.0 }

Invalid Curve

Type: invalid

Always returns positive infinity, preventing VMs from being scheduled. Useful in combination with the Piecewise Curve.

{ curve: invalid }

Linear Curve

Type: linear

Computes cost from a line with a given slope and base.

ParameterTypeRequiredDescription
slopeRealOrBytesSlope of the line
baseRealOrBytesValue returned when input is 0
{ curve: linear, slope: 1.0, base: 0.0 }
{ curve: linear, slope: 10.0, base: 5.0 }

Hard-Soft Curve

Types: hard-soft, soft-hard

Piecewise linear curve with a soft and hard cap. Cost ramps slowly until soft, then ramps steeply until hard. Past hard, cost is infinite (prevents scheduling).

ParameterTypeRequiredDefaultDescription
softRealOrBytesInput value at which softAmt is returned
hardRealOrBytesInput value at which hardAmt is returned
softAmtReal1.0Cost when input reaches soft
hardAmtReal10.0Cost when input reaches hard
# Returns 0 at 0, 1 at 1, 10 at 2, infinity past 2
{ curve: "hard-soft", soft: 1.0, hard: 2.0 }

# These two are equivalent
{ curve: "hard-soft", soft: 32 GiB, hard: 48 GiB, softAmt: 10, hardAmt: 100 }
{ curve: "hard-soft", soft: 32 GiB, hard: 48 GiB, scale: 10.0 }

Unavailable Curve

Type: unavailable

Returns 0 if input is zero or less, infinity otherwise. This is the default curve for any devices without explicit curve definitions.

{ curve: unavailable }

Piecewise Curve

Types: piecewise, low-high, high-low

Returns the result of one of two sub-curves depending on whether the input is below or above a cutoff. Enables complex cost functions.

ParameterTypeRequiredDescription
cutoffRealOrBytesThreshold for switching from low to high curve
lowCurveCurve used when input ≤ cutoff
highCurveCurve used when input > cutoff
# Constant cost of 5 up to a hard cutoff at 6
{ curve: piecewise, cutoff: 6.0, low: { curve: constant, value: 5}, high: { curve: invalid } }

Nested piecewise example (equivalent to hard-soft with soft=1, hard=2):

{
curve: piecewise
cutoff: 1
low: {
curve: linear
slope: 1
base: 0
}
high: {
curve: piecewise
cutoff: 2
low: {
curve: linear
slope: 9
base: -8
}
high: {
curve: invalid
}
}
}

Cost Functions

Cost functions are defined in the ticrypt.vm.cost-functions section. Each entry maps an ID to a definition that combines curves for different resource types.

ParameterTypeDefaultDescription
nameStringSame as IDHuman-readable name
descriptionStringEmptyDescription of the cost function
vmsCurveNoneCost based on number of running VMs
vcpusCurveNoneCost based on virtual CPU cores in use
memoryCurveNoneCost based on memory usage in bytes
devicesCurveMapNonePer-device-type cost curves (keyed by device ID)
scaleReal1.0Multiplier applied to all costs
offsetReal0.0Static cost added after scaling
note

Device types not listed in devices default to the unavailable curve.

warning

At least one of vms, vcpus, or memory must define a curve. Without any resource curve, VMs using no devices face no scheduling restriction, which will cause rapid resource exhaustion.

Examples

Basic cost function:

ticrypt.vm.cost-functions {
simple {
name: "Simple"
description: "A basic cost function"

vms: { curve: "linear", slope: 1, base: 0 }
vcpus: { curve: "hard-soft", soft: 8, hard: 16, softAmt: 4, hardAmt: 32 }
memory: { curve: "hard-soft", soft: 16 GiB, hard: 32 GiB, scale: 10 }
}
}

Cost function with GPU devices:

ticrypt.vm.cost-functions {
nvidia-gpu {
name: "GPU Node"
description: "Used for GPU nodes with the standard configuration"

vms: { curve: "linear", slope: 1, base: 0 }
vcpus: { curve: "hard-soft", soft: 8, hard: 16, softAmt: 4, hardAmt: 32 }
memory: { curve: "hard-soft", soft: 16 GiB, hard: 32 GiB, scale: 10 }

devices.nvidia-gpu: { curve: linear, slope: 1, base: 0, max: 2 }

# High offset so VMs prefer non-GPU hosts when possible
offset: 100000
}
}

Shared cost functions using includes:

ticrypt-vm.conf:

ticrypt.vm.cost-functions {
pool1 {
include "cost-functions/pool-common.conf"
name: "Pool 1"
}
pool2 {
include "cost-functions/pool-common.conf"
name: "Pool 2"
offset: 1000
}
}

cost-functions/pool-common.conf:

vms: { curve: "linear", slope: 1, base: 0 }
vcpus: { curve: "hard-soft", soft: 8, hard: 16, softAmt: 4, hardAmt: 32 }
memory: { curve: "hard-soft", soft: 16 GiB, hard: 32 GiB, scale: 10 }

Hardware Profiles

Hardware profiles are defined in ticrypt.vm.hardware-profiles. Each profile maps an ID to a hardware description linked to a cost function.

ParameterTypeRequiredDefaultDescription
nameStringSame as IDHuman-readable name
descriptionStringEmptyDescription of the hardware profile
coresIntCPU cores available on the host
memoryBytesMemory available on the host
devicesDeviceList[]PCI devices available for VM passthrough
cost-functionStringID of the cost function to use

Examples

ticrypt.vm.hardware-profiles {
pool1: {
name: "Pool 1"
description: "Standard host in pool 1"
cores: 8
memory: 32 GiB
cost-function: "pool1"
}

pool2: {
name: "Pool 2"
description: "Standard host in pool 2"
cores: 8
memory: 32 GiB
cost-function: "pool2"
}

nvidia-gpu-node: {
name: "NVidia GPU Node"
description: "Special nodes with NVidia GPUs attached"
cores: 8
memory: 32 GiB
cost-function: nvidia-gpu
devices = [
{type: "nvidia-gpu", addr: "0000:01:02.0"}
{type: "nvidia-gpu", addr: "02:03.0"}
]
}
}

Hosts

Hosts are managed from the Management section in the tiCrypt user interface. Administrators can add, enable, disable, and remove hosts.

Each host requires:

Name A descriptive name for the host.

URI The Libvirt connection URI. See Libvirt URI documentation for all formats.

Connection TypeURI Format
Local QEMUqemu:///system
Remote QEMUqemu+ssh://[user@]host[:port]/system

Hardware Profile One of the defined hardware profiles.

State

StateBehavior
EnabledConnected to host, VMs scheduled normally
No SchedulingConnected to host, but no new VMs scheduled. Existing VMs can still be managed. Useful for graceful node maintenance.
DisabledNo connection made, no VMs scheduled

Static Address Translation Optional. Used when VMs are on networks not directly reachable from the tiCrypt server. Specify an IP address and base port; tiCrypt connects to the translated address with port = base port + last octet of the VM's IP.