Skip to main content
tiCrypt

Linux Images: Image Builder Guide

The tiCrypt image builder is a command-line tool that turns a Rocky Linux or AlmaLinux cloud image into a tiCrypt VM image. You describe the image in a short configuration file, image.conf, and one command produces a qcow2 file that is ready to add to tiCrypt. The builder changes the image offline with virt-customize: it never boots a VM.

This page is the complete reference: what to prepare, every command, option and setting, what a build does, and what to do when a build fails. To build your first image step by step, start with the Image Builder Quick Start and come back here for the details.

The builder is not part of a running tiCrypt system. It runs on a build host that you choose, and tiCrypt only sees the image file you copy to a VM host.

Why Use the Builder​

  • Repeatable images: the same image.conf builds the same image again, so bringing an image up to date with the newest operating system packages is one command.
  • tiCrypt requirements built in: every image gets the VM Installer, the NFS client, a disabled SSH server, a firewall and a controller.toml, the steps the manual process lists one by one.
  • No internet in the VM: everything is downloaded while the image is built. The finished VM needs no internet access.
  • Mistakes caught early: the build checks the whole configuration before it writes anything, and build --check runs only that check.
  • Safe to run again: an existing image is never replaced, and a build that fails removes its incomplete image unless you ask to keep it.

When to Use the Builder​

You wantUse
A Rocky Linux or AlmaLinux 9 or 10 image: terminal only, desktop over RDP, Slurm or cluster controllerThe builder
A RHEL imageThe builder, with a setup script that lets dnf install packages, for example by registering with Red Hat Satellite
An Ubuntu or Debian imageThe manual process
A GNOME desktop through GNOME Remote DesktopThe manual process. The builder's desktop images use XRDP
A Windows imageWindows Images

Before You Begin​

RequirementDetails
Build hostRocky Linux, AlmaLinux or RHEL 9 or 10, with root or sudo. Version 8 cannot run the builder because it has no guestfs-tools. A version 9 host can also build version 10 images
KVM/dev/kvm must exist on the build host. If the build host is itself a VM, turn on nested virtualization. Without KVM the build runs in software emulation and takes many times longer
Disk spaceAbout 10 GB free for each build: a copy of the base image grows into the finished image. A desktop image with many applications needs more, and so does a larger disk_size. With base_image_url, the download is also kept in download_dir
Package repositoryThe tiCrypt package repository configured on the build host, the one the tiCrypt backend is installed from. See Components
Internet accessFrom the build host, during the build only. See the list below
CPU, for version 10 imagesAlmaLinux 10 and Rocky Linux 10 only run on CPUs that support x86-64-v3: roughly, Intel CPUs from 2013 on and AMD CPUs from 2015 on. The VM hosts need such CPUs, and tiCrypt must pass a matching CPU model to its VMs
In tiCryptAn account that can create VM images and VM hardware setups, and root access to a VM host

The build host must reach these addresses while it builds:

  • The distribution's mirrors and EPEL: every build installs and updates packages from them.
  • repo-pub.terainsights.net: the tiCrypt public repository, which every image uses. Version 10 desktop images get XRDP and MATE from it.
  • storage.googleapis.com: the builder looks up and downloads the VM Installer from the VM Installer channel there. See VM Installer release.
  • The base image's download site, if you set base_image_url instead of downloading the base image yourself.
  • The sites of the application add-ons you choose, such as packages.microsoft.com for VS Code. The add-on table lists them.

Install the Builder​

The builder is released only as an RPM, ticrypt-image-builder, in the tiCrypt package repository. Install it on the build host, not on the backend or a VM host:

sudo dnf install ticrypt-image-builder

There is no public download address for the RPM. On a build host without the tiCrypt package repository, copy the RPM file to the host and install the file: sudo dnf install ./ticrypt-image-builder-<VERSION>-1.el.noarch.rpm.

dnf also installs what the builder needs: virt-customize, virt-resize and the other virt-* tools (from guestfs-tools), qemu-img, wget, grep and sed. The same RPM installs on version 9 and 10. Check the installation:

ticrypt-image-builder.sh version

To upgrade, run sudo dnf upgrade ticrypt-image-builder. On a host without the repository, copy the newer RPM file and run sudo dnf upgrade ./ticrypt-image-builder-<VERSION>-1.el.noarch.rpm. An upgrade does not change images you already built: rebuild an image to get the changes of a new builder release. The Version Guide lists each release and what it changed.

Upgrading from the .tgz archive

Before version 1.0.0 the builder was a .tgz archive and the command was ticrypt-image.sh. The archive is no longer offered. Before you remove an unpacked copy, move what you added to it: add-ons you wrote go to /usr/share/ticrypt-image-builder/snippets/xrdp/, and edited configs/ files go anywhere outside that directory, named in config_file. Then install the RPM. Your image.conf files keep working.

Installed Files​

PathWhat it is
/usr/bin/ticrypt-image-builder.shThe builder command. It is on the PATH, so it runs from any directory
/usr/share/ticrypt-image-builder/snippets/The scripts that run inside the image, one per build step or image type
/usr/share/ticrypt-image-builder/snippets/xrdp/The application add-ons for desktop images, such as vscode.sh
/usr/share/ticrypt-image-builder/configs/The controller.toml for each image type
/usr/share/doc/ticrypt-image-builder/The README and the original manual build notes

The rest of this page writes snippets/ and configs/ for those directories. An upgrade replaces the files the RPM installed, so do not edit them: copy a file and point image.conf at the copy, as the sections below explain.

Build an Image​

This procedure describes how to build an image from start to finish. The Quick Start gives the same steps with the exact commands for the image you choose.

  1. Work in a directory with enough free space, for example mkdir ~/images && cd ~/images. Paths in image.conf are relative to the directory you run the builder from.

  2. Download a base image (see Base image):

    wget https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud-Base.latest.x86_64.qcow2
  3. Write a configuration file with every setting explained:

    ticrypt-image-builder.sh generate image.conf
  4. Edit image.conf: set at least base_image_file, type, name, version and destination_dir. The Configuration reference describes every setting.

  5. Check the configuration. The check lists every problem it finds, or the steps the build will run, and writes nothing:

    sudo ticrypt-image-builder.sh build --check image.conf
  6. Build the image. Keep the output in a log, because it holds the image's random root password:

    sudo ticrypt-image-builder.sh build --log build.log image.conf
  7. Check the image, then add it to tiCrypt.

Result:

The build ends with The image is ready, and <destination_dir> holds the image, <name>-<type>-<version>.qcow2, and its checksum file, <name>-<type>-<version>.qcow2.sha256. A terminal image takes a few minutes, a desktop image about 5 to 15, and longer with applications.

Command Reference​

ticrypt-image-builder.sh build [--check] [--verbose|--debug] [--keep-failed] [--smp N] [--memsize MB]
[--compress] [--log FILE] <configuration_file>
ticrypt-image-builder.sh generate [<configuration_file>]
ticrypt-image-builder.sh types
ticrypt-image-builder.sh version (or --version)
ticrypt-image-builder.sh help (or -h, --help, build --help)
CommandRootWhat it does
build <file>YesChecks the configuration, then builds the image that <file> describes. Root is required because virt-customize opens the guest file system
generate [<file>]NoWrites a configuration file with every setting and its explanation. Without a file name it writes image.conf. If the file exists, it prints the file and leaves it unchanged
typesNoLists the image types
version, --versionNoPrints the installed builder version
help, -h, --helpNoPrints the usage, including the build options your installed version supports. build --help prints the same

The builder exits with status 0 when the command succeeds and a non-zero status when it fails, so you can run builds from scripts or a scheduler.

Build Options​

OptionWhat it does
--verboseShows the output of every command that runs inside the image: dnf, the snippets, your scripts. Use it to see why a step failed (it passes -v to virt-customize)
--debugEverything --verbose shows, plus a trace of every libguestfs call (-v -x). The output is long; use it when you report a problem
--keep-failedIf the build fails or is interrupted, keeps the incomplete image as <name>-<type>-<version>.failed-<YYYYMMDD-HHMMSS>.qcow2 in destination_dir instead of removing it. See Inspect a failed build
--smp NNumber of virtual CPUs the build uses. Default: 4
--memsize MBMemory the build uses, in MB. Default: the libguestfs default. Raise it if a large install is killed or fails with "Cannot allocate memory", for example --memsize 4096
--compressAfter the build, zeroes the free space in the image and compresses it. The file is much smaller to copy to VM hosts; the build takes longer
--log FILEAlso appends all output to FILE, with the date and builder version at the start of each build. Progress bars appear only on the terminal
  • Position: options can come before or after the configuration file: build --verbose image.conf and build image.conf --verbose do the same.
  • Values: write --smp 8 or --smp=8; the same for --memsize and --log.
  • Combining: all options work together. If you give both --verbose and --debug, the last one applies.
  • One file: build takes exactly one configuration file. To build several images, run the builder once per file.
  • Your version: an option that ticrypt-image-builder.sh help does not list is not in your installed version, and build stops with "Unknown build option". Upgrade the builder to get it.

Examples:

# See the output of every step
sudo ticrypt-image-builder.sh build --verbose image.conf

# Keep the image if the build fails, and log everything
sudo ticrypt-image-builder.sh build --debug --keep-failed --log build.log image.conf

# A smaller image to copy, built with more CPUs and memory
sudo ticrypt-image-builder.sh build --compress --smp 8 --memsize 8192 image.conf

Check a Configuration​

build --check runs every check the build runs before it writes anything, then lists the steps the build would run inside the image, with the root password hidden. It builds and writes nothing, and takes seconds:

sudo ticrypt-image-builder.sh build --check image.conf

The check covers:

  • Required settings: name, type, version and destination_dir are set, and exactly one of base_image_file and base_image_url.
  • Values: type is an image type, disk_size is a size such as 40G and larger than the base image's disk, and base_image_sha256 has 64 hexadecimal characters.
  • Files: the base image, config_file, setup_script, every file in scripts, the root_password file and every add-on in xrdp_extra_packages exist.
  • Host: the tools the build needs are installed, destination_dir is writable (and download_dir, with base_image_url), and the output image does not exist yet.

If something is wrong, it lists every problem at once, prints Nothing was written. and exits with status 1. Otherwise it ends with The configuration is valid. A real build runs the same checks first, so a mistake stops it before it copies the base image.

Run the check with sudo, as you run the build: without root it checks access as your own user and the default download_dir in your home directory, so it can report files and directories that the real build can read and write. With base_image_url, the size check for disk_size runs only in the real build, after the download.

Environment​

VariableWhat it does
TICRYPT_IMAGE_BUILDER_DATADIRDirectory to read snippets/ and configs/ from, instead of /usr/share/ticrypt-image-builder. Use it to build with a modified copy of the snippets without touching the installed files

sudo drops most environment variables, so set it on the sudo command line:

sudo cp -r /usr/share/ticrypt-image-builder /srv/my-builder # then edit /srv/my-builder/snippets/...
sudo TICRYPT_IMAGE_BUILDER_DATADIR=/srv/my-builder ticrypt-image-builder.sh build image.conf

A copy does not receive the fixes of later builder releases. Prefer the settings in image.conf where they cover what you need.

The builder sets LIBGUESTFS_BACKEND=direct itself, so libguestfs starts QEMU without libvirt and libvirtd does not need to run on the build host.

Only image.conf sets the image. Variables such as name or version exported in your shell are ignored.

Configuration Reference (image.conf)​

image.conf is a bash file that the builder reads with source:

  • Lines that start with # are comments.
  • Quote every value: name="rocky9".
  • Lists use bash array syntax, packages=( "git" "htop" ), and += adds to a list.
  • Relative paths are relative to the directory you run the builder from, not to the directory of image.conf.
  • name, type and version must not contain /.
Treat image.conf as a root script

sudo ticrypt-image-builder.sh build runs image.conf as root, and the scripts it lists run as root in the image. Keep these files writable only by administrators.

SettingRequiredDefaultWhat it sets
base_image_fileOne of the twoPath to a local base image. It is copied, never changed
base_image_urlOne of the twoAddress to download the base image from. The download is kept in download_dir and downloaded again only when the server has a newer file
base_image_sha256NoThe SHA-256 checksum the base image must have. The build stops if it differs. See Base image
download_dirNo/var/cache/ticrypt-image-builderWhere base_image_url is downloaded to. Without root it is ~/.cache/ticrypt-image-builder
typeYesxrdp in the generated fileThe image type
nameYesticrypt-image in the generated fileFirst part of the output file name
versionYes1.0.0 in the generated fileLast part of the output file name. Must change for every new build of the same image
destination_dirYes. in the generated fileDirectory the image and its .sha256 file are written to. It must exist and be writable
disk_sizeNoThe base image's sizeSize of the image's disk, such as 40G, larger than the base image's. The root file system grows to fill it. See Disk space
config_fileNoconfigs/<type>.tomlThe controller.toml to put in the image. See Controller configuration
vmc_stub_versionNoThe newest releaseThe VM Installer release to install, such as 3.13.2. See VM Installer release
root_passwordNoRandomThe root password. See Root password
setup_scriptNoA script that runs in the image before anything is installed. See Setup script
xrdp_extra_packagesNoApplication add-ons, desktop types only
packagesNoExtra packages to install with dnf, any type
scriptsNoYour own scripts to run in the image, any type

A complete example for a Rocky Linux 9 desktop image with applications:

base_image_file="Rocky-9-GenericCloud-Base.latest.x86_64.qcow2"
base_image_sha256="<the image's checksum from the distribution's CHECKSUM file>"
type="xrdp"
name="rocky9-research"
version="2026.12.1"
destination_dir="/srv/images"
disk_size="40G"

xrdp_extra_packages=( "vscode" "chrome" "libreoffice" )
packages=( "git" "htop" "tmux" )
scripts=( "site-settings.sh" )

config_file="research-xrdp.toml" # a copy of configs/xrdp.toml
root_password="file:/root/image-root-password"
# vmc_stub_version="3.13.2" # uncomment to pin the VM Installer

Base Image​

The builder starts from the distribution's GenericCloud image in qcow2 format. These are the base images the Quick Start builds and tests:

Operating systemBase image address
AlmaLinux 10https://repo.almalinux.org/almalinux/10/cloud/x86_64/images/AlmaLinux-10-GenericCloud-latest.x86_64.qcow2
AlmaLinux 9https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2
Rocky Linux 10https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2
Rocky Linux 9https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud-Base.latest.x86_64.qcow2
  • base_image_file: download the base image yourself and reuse it. The builder copies it to the output file and never changes it.
  • base_image_url: the builder downloads the base image to download_dir (default /var/cache/ticrypt-image-builder) and keeps it there. Later builds download it again only when the server has a newer file.
  • Not both: set one of the two. A configuration with both is refused.
  • base_image_sha256: the SHA-256 checksum the base image must have, from the CHECKSUM file the distribution publishes next to the image. The build stops if the base image differs, and deletes a download that differs so the next build downloads it again. Use it to build every image from a base image you checked.
  • "latest" files change: the latest file names point to a new image after each point release. With base_image_sha256, the build then stops until you update the checksum. Without it, the build updates every package anyway, so the finished image is current either way.
  • Disk size: the image keeps the base image's disk size unless you set disk_size. See Disk space.

Output File and Versions​

The image is written to <destination_dir>/<name>-<type>-<version>.qcow2, and its SHA-256 checksum to <name>-<type>-<version>.qcow2.sha256 next to it. With name="rocky9-research", type="xrdp" and version="2026.12.1", that is rocky9-research-xrdp-2026.12.1.qcow2.

  • Never replaced: if the file exists, the build stops before it writes anything. VMs that use an image depend on its file, so replacing it would break them. Raise version for every new build.
  • Name it for your users: put the operating system and purpose in name, because the file name is what you select as the Libvirt volume when you register the image.
  • Failed builds: an incomplete image is removed, or with --keep-failed renamed to <name>-<type>-<version>.failed-<YYYYMMDD-HHMMSS>.qcow2. Either way the output file name stays free, so you can run the build again with the same version.

Image Types​

type decides what the image is for. ticrypt-image-builder.sh types lists the types.

typeWhat the image getsController configuration
terminalTerminal access only, no desktopconfigs/terminal.toml
xrdpA desktop reached over RDP: Xfce on version 8 and 9, MATE on version 10, with XRDP and the "Development Tools" group. Takes application add-onsconfigs/xrdp.toml
xrdp_slurmControllerEverything in slurmController, plus the xrdp desktop and add-onsconfigs/xrdp_slurmController.toml
slurmControllerSlurm controller: slurm, slurm-slurmctld, slurm-slurmdbd, MariaDB, Munge, strongSwan, an NFS server and the Lua libraries for Slurm plugins. The VM Controller sets up and starts Slurmconfigs/slurmController.toml
slurmWorkerSlurm worker: slurm, slurm-slurmd, Munge and strongSwanconfigs/slurmWorker.toml
clusterControllerThe base image with the cluster controller configuration and no extra packagesconfigs/clusterController.toml

Slurm images contain no /etc/slurm/slurm.conf. The VM Controller writes that file itself and uses it to track the Slurm setup, so the build removes the default one the slurm package installs, and installing, upgrading or removing Slurm in the VM never creates, replaces or deletes it.

Controller Configuration​

The image's /etc/ticrypt/controller.toml tells the VM Controller which services to offer and how to manage users. By default the builder uses configs/<type>.toml:

FileRDP tunnelSlurm roleVPN clientVM managers are admins
terminal.tomlNoYes
xrdp.tomlPort 3389No
xrdp_slurmController.tomlPort 3389Controller, subnet 10.0.0.0/24NoNo
slurmController.tomlNoController, subnet 10.0.0.0/24NoNo
slurmWorker.tomlNoNodeYesNo
clusterController.tomlNoYes

All of them turn on the terminal and SFTP uploads. To change a setting, copy the file, edit the copy and set config_file:

cp /usr/share/ticrypt-image-builder/configs/xrdp.toml research-xrdp.toml
nano research-xrdp.toml
# in image.conf:
config_file="research-xrdp.toml"
  • Checked first: the build stops before it writes anything if the file is missing or empty.
  • Uploaded last: the builder writes controller.toml after your scripts, owned by root, so a script cannot change it. Put every change in the file itself.
  • Not in the RPM's directory: an upgrade replaces the files in /usr/share/ticrypt-image-builder/configs/, so keep your copy elsewhere.

Controller Configuration describes every setting.

VM Installer Release​

The image does not contain the VM Controller itself. It contains the VM Installer, the ticrypt-vm-controller package, which downloads the VM Controller from tiCrypt each time the VM starts and runs it. The VM Installer also brings the OpenSSL libraries and FIPS provider that the VM Controller uses. The builder's own messages call it the "VM controller stub".

  • Default, the newest release: on every build the builder looks up the VM Installer channel at https://storage.googleapis.com/ticrypt/vmc-installer/prod/ and installs the newest release that has a Linux RPM. A new release is used by the next build without a new builder release. A release whose RPM is not uploaded yet is skipped.

  • Pinned release: set vmc_stub_version to a release number to install exactly that release, for example to rebuild an image as it was or to hold a release while you test a newer one. The value must have the form X.Y.Z:

    vmc_stub_version="3.13.2"
  • Fails early: the lookup and download run before the base image is copied. If the build host cannot reach the channel, the release does not exist, or the download is not an RPM, the build stops at once and leaves no image.

  • No fallback: the builder never installs the ticrypt-vm-controller copy in the tiCrypt public repository, which lags behind the channel. The image also excludes that copy from dnf, so a package update in the VM does not replace the VM Installer with it.

  • Recorded in the image: the release is in /etc/ticrypt/image-info as vmc_stub_version.

Images you already built keep their VM Installer release: it never updates itself. The VM Controller it downloads is always the current one. To give an image a newer VM Installer, build it again. The Version Guide shows the current VM Installer release.

Root Password​

ValueResult
Not setA random password. The build prints it once, on the line Setting random password of root to ..., and it appears nowhere else except in a --log file. Note it if you want to log in on the VM's console
root_password="file:/path/to/file"The first line of the file. Recommended when you need a known password: keep the file readable by root only
root_password="password:SECRET"The password written in image.conf. Anyone who can read image.conf knows it; avoid it outside tests

The builder passes the value to virt-customize --root-password, so the other values it accepts also work, such as disabled for no root password at all. Every VM built from the image has the same root password, and users never need it: they log in with their tiCrypt accounts.

Setup Script​

setup_script="setup.sh" runs a script of yours inside the image before the builder installs anything. Use it for what every later step depends on, such as registering a RHEL image with Red Hat Satellite so that dnf can install packages:

#!/bin/bash
# setup.sh: runs in the image before the builder installs anything
set -euo pipefail
rpm -Uvh https://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org="Example_Org" --activationkey="ticrypt-images"

The registration stays in the image, so every VM built from it starts registered. The script rules below apply.

Adding Software​

There are three ways to add software. All of them run while the image is built, so the finished VM needs no internet access.

You want to installUseImage types
An application with a ready-made add-on, such as VS Code, Chromium or RStudioxrdp_extra_packagesxrdp, xrdp_slurmController
Packages from the operating system repositories, EPEL or the tiCrypt public repositorypackagesAll
Anything else: vendor installers, licenses, configurationscripts, or a new add-onAll (scripts), desktop types (add-ons)

They run in this order: add-ons in the order listed, then packages, then scripts.

Application Add-ons​

List add-ons by file name without .sh. Other image types ignore xrdp_extra_packages, and the build prints a warning. Every add-on installs everything its application needs while the image is built, so it works in a VM without internet access. Some need another add-on, a drive or a particular version, as the Notes column says.

xrdp_extra_packages=( "vscode" "chrome" "jupyterlab" )
Add-onWhat it installsDownloads fromNotes
atomAtom editor 1.60.0github.comAtom is no longer maintained
chromeChromium, set as the default browserEPELChromium, not Google Chrome
dockerDocker CE and the Compose plugin, started at bootdownload.docker.comLets every member of the users group run the scripts in /opt/docker/bin as root. Needed by mysql and postgres
jupyterlabJupyterLab 4 with a Python 3.12 kernel in /opt/jupyterlab, and a JupyterLab entry in the Research menupypi.org, upload.wikimedia.org (icon)Opens in a web browser: add chrome. Its update check, news feed and extension manager are turned off. To give every user more Python packages, install them in one of your scripts: /opt/jupyterlab/bin/pip install --index-url https://pypi.org/simple numpy pandas. In the VM, users can add packages themselves: pip install (or %pip install in a notebook) installs into their ~/.local, from a package mirror (see python) or from .whl files brought into the VM. Restart the kernel to use them
libreofficeLibreOffice 25.8.4.2downloadarchive.documentfoundation.org
mysqlStart and Stop entries in the Databases menu that run MySQL 8 in Docker on 127.0.0.1:3306, with its data in /drives/drive1/mysqlDocker Hub, www.vectorlogo.zone (icon)Needs docker and a drive attached to the VM. The mysql:8 container image is saved in the VM image (/opt/docker/images, about 220 MB) and loaded into Docker the first time a user starts MySQL, which takes a minute. Nothing is downloaded in the VM. The first start asks for the root password. To start over, delete the data directory: the next start asks for a new password
postgresThe same for PostgreSQL 14 on 127.0.0.1:5432, with its data in /drives/drive1/postgresDocker Hub, upload.wikimedia.org (icon)Same as mysql, with the postgres:14 image (about 160 MB)
pycharmPyCharm Community 2022.1.3 in /opt/pycharmdownload.jetbrains.com
pythonPython 3.10.5 and 3.7.13, compiled from source into /opt/python/3.10 and /opt/python/3.7www.python.orgCompiling takes a long time. Sets pip to install only from /opt/software/pypi/simple, which the builder does not create: put a package mirror there
rstudioR 4.1.2 in /opt/R and RStudio Desktopcdn.rstudio.com, download1.rstudio.orgVersion 8 and 9 only: the build stops on version 10. R packages that are not in the image need a CRAN mirror the VM can reach
rstudio-serverApptainer and the rocker/rstudio:4.1.2 container, with a launcher that starts RStudio Server on localhost and prints a one-time passwordDocker HubThe container is downloaded during the build. Opens in a web browser: add chrome
singularityApptainer, the successor to SingularityEPEL
vscodeVisual Studio Code, without extensionspackages.microsoft.comUpdates, telemetry and online features are turned off. See below

VS Code without internet. The vscode add-on is the model for an application in a VM without internet access:

  • Repository disabled: Microsoft's repository is added for the install and then disabled.
  • Policy: /etc/vscode/policy.json turns off updates, telemetry, feedback and extension auto-update. Users cannot turn them back on.
  • User defaults: new users get settings in /etc/skel/.config/Code/User/settings.json that turn off the remaining online features: extension update checks and recommendations, experiments, AI and Copilot features, online settings search, the welcome page and the crash reporter.
  • Extensions: the VM cannot reach the Marketplace. Download each extension's .vsix file outside tiCrypt, bring it into the VM like any other file, and in VS Code open the Extensions view, click ... and choose Install from VSIX....

Extra Packages​

packages installs packages with dnf on any image type, from the operating system repositories, EPEL and the tiCrypt public repository:

packages=( "git" "htop" "tmux" )
packages+=( "R" )

A package that does not exist stops the build.

Your Own Scripts​

scripts runs your scripts as root inside the image, in the order listed, after the add-ons and packages:

scripts=( "site-settings.sh" "install-vendor-app.sh" )

Write a New Add-on​

To make an application selectable in xrdp_extra_packages, add a script to /usr/share/ticrypt-image-builder/snippets/xrdp/. The file name is the add-on name. Add-ons you add there stay through upgrades, but an upgrade replaces any edits to the add-ons the RPM installs. snippets/xrdp/vscode.sh is a complete example.

#!/bin/bash
# /usr/share/ticrypt-image-builder/snippets/xrdp/meld.sh -> xrdp_extra_packages=( "meld" )
set -euo pipefail
dnf install -y meld

Script Rules​

These rules apply to setup scripts, your own scripts and add-ons:

  • Fail loudly: start with set -euo pipefail. A failing command then stops the build, and the problem shows at build time instead of in a user's VM.
  • Nothing is running: no service runs inside the image during the build. Use systemctl enable <service>, never systemctl start or enable --now, and firewall-offline-cmd instead of firewall-cmd.
  • No internet at run time: downloads work only during the build. Disable repositories you added once you have installed from them, and turn off automatic updates, as vscode.sh does. Install Python packages during the build, as jupyterlab.sh does.
  • Container images: Docker does not run during the build. Save a container image to a file with skopeo and load it into Docker on first use, as mysql.sh does.
  • Settings for every user: put them in /etc/skel. They apply to users whose home directory is created after the build.
  • Menu entries: put them in /usr/share/applications/<app>.desktop. On Xfce images, entries with Categories=Research; or Categories=Databases; appear in the Research and Databases menus.
  • Licensed software: a license server the VM must contact goes on the Global Licensing Servers allowlist.

Disk Space​

The GenericCloud base images have small disks, about 10G. If the build fails with "No space left on device" inside the image, or your users need more room on the boot disk, set a larger disk in image.conf:

disk_size="40G"

The build then creates a disk of that size and copies the base image into it with virt-resize, growing the partition or LVM logical volume that holds the root file system, and the file system with it. The size must be a number followed by K, M, G or T, and larger than the base image's disk: virt-resize cannot shrink a disk.

If the build cannot find the root file system on a partition or a single LVM physical volume, it stops and says so. Then make a larger copy of the base image by hand and build from it:

qemu-img info Rocky-9-GenericCloud-Base.latest.x86_64.qcow2 # current virtual size
virt-filesystems --long --parts --lvs -a Rocky-9-GenericCloud-Base.latest.x86_64.qcow2 # find the root partition or LV
qemu-img create -f qcow2 rocky9-60G.qcow2 60G
virt-resize --expand /dev/sdaN Rocky-9-GenericCloud-Base.latest.x86_64.qcow2 rocky9-60G.qcow2
# For an LVM image, also add: --LV-expand /dev/<vg>/root

Then set base_image_file="rocky9-60G.qcow2" and remove disk_size. If instead dd, wget or qemu-img reports no space, the build host's own disk is full.

What a Build Does​

  1. Checks the configuration, as build --check does, and lists the steps it will run inside the image.
  2. Finds the VM Installer release (vmc_stub_version, or the newest in the channel) and downloads its RPM to the build host.
  3. Downloads base_image_url to download_dir if the server has a newer file, and checks the base image against base_image_sha256 if it is set.
  4. Copies the base image to the output file, or with disk_size, into a larger disk with virt-resize.
  5. Runs all the following steps inside the image in a single virt-customize run:
    1. snippets/kernel-cmdline.sh: saves the base image's kernel command line to /etc/kernel/cmdline, or keeps that file if the base image has one. Without it, a kernel installed during the build would boot with the build tool's command line and the VM would not find its root disk.
    2. Root password, then your setup_script.
    3. snippets/base.sh: keeps slurm.conf out of the image, installs EPEL and the core packages (NetworkManager, firewalld, bindfs, dislocker, ntfs-3g, net-tools, rsync, wget, xfsprogs), adds the tiCrypt public repository for the image's version (https://repo-pub.terainsights.net/el<version>) with the VM Installer excluded, installs the VM Installer downloaded in step 2 and enables it at boot, disables sshd and enables firewalld.
    4. snippets/nfs.sh: installs nfs-utils and enables rpcbind, nfs-client.target and rpc-statd at boot.
    5. The image type's snippet, such as snippets/xrdp.sh, then each add-on in xrdp_extra_packages.
    6. packages, then scripts.
    7. Uploads the controller configuration to /etc/ticrypt/controller.toml and the build details to /etc/ticrypt/image-info, both owned by root.
    8. snippets/post.sh: disables sshd again, updates every package, removes any slurm.conf, disables SELinux, checks that no boot entry has the build tool's kernel command line, makes the newest kernel the default boot entry and regenerates the GRUB configuration.
  6. With --compress, zeroes the free space in the image and compresses it.
  7. Writes the image's checksum to <name>-<type>-<version>.qcow2.sha256 and prints The image is ready with the time the build took.

You do not list the steps inside the image other than your setup script, add-ons, packages and scripts: every build runs them.

What the Image Contains​

ItemDetail
Operating systemThe newest release of its major version, because the build updates every package
VM InstallerThe release in image-info, enabled at boot and excluded from dnf updates
RepositoriesEPEL and the tiCrypt public repository are configured. The VM cannot reach them in tiCrypt unless you allow it
NFS clientFor home directories and research drives, mounted by the VM Controller
SSH serverDisabled, because the VM Controller uses port 22. SFTP uploads still work through the VM Controller
Firewallfirewalld is on from the first boot. Desktop images allow the RDP port, 3389
SELinuxDisabled. Files written during the build carry no SELinux labels, so an image cannot be switched to enforcing afterwards. The comments in snippets/post.sh say what to change for an enforcing image
SlurmNo /etc/slurm/slurm.conf: the VM Controller writes it
Desktop imagesThe RDP clipboard is off in both directions, and so are drive redirection, sound and every other RDP channel except the dynamic channels that window resizing uses, so data cannot leave the VM that way. Up to 100 sessions; a disconnected session is closed after 8 hours. On Xfce the screen lock is off
/etc/ticrypt/controller.tomlThe controller configuration
/etc/ticrypt/image-infoHow the image was built. See below

Check an Image Before You Deploy It​

Read the build details and the controller configuration straight from the image file, without starting a VM:

sudo virt-cat -a rocky9-research-xrdp-2026.12.1.qcow2 /etc/ticrypt/image-info
sudo virt-cat -a rocky9-research-xrdp-2026.12.1.qcow2 /etc/ticrypt/controller.toml
/etc/ticrypt/image-info
name = rocky9-research
type = xrdp
version = 2026.12.1
base_image = Rocky-9-GenericCloud-Base.latest.x86_64.qcow2
base_image_sha256 = 0a1b...e9f0
created = 2026-12-02 15:04:05 UTC
builder_version = 1.1.0
vmc_stub_version = 3.13.2
setup_script =
xrdp_extra_packages = vscode chrome libreoffice
packages = git htop tmux
scripts = site-settings.sh

The file records the image's name, type and version, the base image (its file name, or the address it was downloaded from) and its checksum, the build time, the builder and VM Installer releases, and the setup script, add-ons, packages and scripts of the build. Scripts are listed by file name. In a running VM, the same file is at /etc/ticrypt/image-info. Images built with an older builder have fewer lines.

Add the Image to tiCrypt​

  1. Copy the image and its .sha256 file to a VM host. On the VM host, as root, check the copy in the directory that holds both files, then put the image in the ticrypt-bricks storage pool and refresh the pool:

    sha256sum -c rocky9-research-xrdp-2026.12.1.qcow2.sha256 # prints "...: OK"
    cp rocky9-research-xrdp-2026.12.1.qcow2 "$(virsh pool-dumpxml ticrypt-bricks | sed -n 's:.*<path>\(.*\)</path>.*:\1:p')/"
    virsh pool-refresh ticrypt-bricks
    virsh vol-list ticrypt-bricks | grep rocky9-research

    If the pool is not on storage your VM hosts share, repeat this on each VM host. To copy less, build with --compress.

  2. In tiCrypt, go to Management > Virtual Machines > VM Images and create a VM image that uses the new Libvirt volume. Use VirtIO as the device bus type: it cannot be changed later.

  3. Select the image in a VM hardware setup. For a desktop image, start with 2 cores and 4 GB of memory.

Result:

A VM started from the hardware setup shows as connected within about a minute.

Add Image to tiCrypt and steps 5 to 7 of the Quick Start give the details of each field.

Update an Image​

Rebuild an image to get operating system updates, a newer VM Installer release or the fixes of a new builder release:

  1. Upgrade the builder: sudo dnf upgrade ticrypt-image-builder.
  2. Raise version in image.conf. Download a new base image if you want to start from the newest point release.
  3. Build, check and add the new image as above, and select it in your VM hardware setups.

Keep the old image file in the pool while any VM still uses it. Never overwrite an image file that is in use: the builder refuses to for this reason, and copying over it in the pool would break the VMs that use it.

Inspect a Failed Build​

A build that fails or is interrupted removes its incomplete image and prints:

Error: The build did not finish. The incomplete image ./rocky9-research-xrdp-2026.12.1.qcow2 was removed.
Run the build again; build --verbose shows the output of each step,
and build --keep-failed keeps the incomplete image to inspect it.
  1. Run the build again with --verbose, and keep the output in a log. The last lines before the error show the step that failed:

    sudo ticrypt-image-builder.sh build --verbose --log build.log image.conf
  2. If the output is not enough, build with --keep-failed to keep the incomplete image:

    sudo ticrypt-image-builder.sh build --verbose --keep-failed image.conf
    Error: The build did not finish. The incomplete image was kept as ./rocky9-research-xrdp-2026.12.1.failed-20261202-143012.qcow2
    to inspect it. It is not a usable image: delete it when you are done.
  3. Look inside it read-only:

    sudo virt-ls -a rocky9-research-xrdp-2026.12.1.failed-20261202-143012.qcow2 -l /etc/ticrypt
    sudo virt-cat -a rocky9-research-xrdp-2026.12.1.failed-20261202-143012.qcow2 /var/log/dnf.log
  4. Delete the kept image when you are done. Every failed attempt keeps its own file, and none of them is a usable image: never register one in tiCrypt.

If the builder cannot rename the incomplete image, it says so and leaves it under the normal name. Delete it before you run the build again.

Errors and Resolutions​

Problems Found by the Check​

The checks that run before anything is written, in build --check and at the start of every build, list all their problems together:

Error: The build cannot start. Fix the following in image.conf or on this host:
- destination_dir is not set
- xrdp_extra_packages: there is no add-on "vscod" (/usr/share/ticrypt-image-builder/snippets/xrdp/vscod.sh). Available: atom chrome docker ...
Nothing was written.
ProblemWhat to do
<setting> is not setSet it in image.conf. name, type, version and destination_dir are required. Settings exported in your shell do not count
<setting> must not contain '/'Remove the / from name, type or version: they form the file name
type "..." is not an image type. Use one of: ...Set type to one of the image types. Names are case-sensitive
destination_dir ... is not a directory or ... is not writableCreate the directory, or run the builder with sudo
The image ... already exists. Change version in image.conf to build a new image.Raise version. Delete the existing file only if no VM uses it
Set base_image_file or base_image_url or Set only one of base_image_file and base_image_urlSet exactly one of the two
Base image file ... does not existThe path is relative to the directory you run the builder from. Check it, or use an absolute path
download_dir ... cannot be created or written toChoose a download_dir you can write to, or run the builder with sudo
base_image_sha256 must be 64 hexadecimal charactersCopy the SHA-256 checksum itself from the distribution's CHECKSUM file, not a file name or another kind of checksum
disk_size must be a number followed by K, M, G or T, such as 40G: ...Write the size as a whole number and a unit, without spaces or decimals
disk_size ... is not larger than the base image's disk (...)Use a larger size, or remove disk_size
Config file ... does not exist or is emptyCheck the path in config_file
root_password file ... does not existCheck the path after file:. If only root can read the file, run the check with sudo
setup_script ... does not exist or Script ... in scripts does not existThe path is relative to the directory you run the builder from
xrdp_extra_packages: there is no add-on "..." (...). Available: ...Fix the spelling, using a name from the list in the message
virt-customize command not found. Install it with: ... (or another tool)sudo dnf install -y guestfs-tools qemu-img wget. The RPM normally installs them
Warning: xrdp_extra_packages is ignored: type ... has no desktop.Not an error. Use a desktop type, xrdp or xrdp_slurmController, or remove the add-ons

Errors During the Build​

What you seeWhat to do
Error: Configuration file ... does not existCreate it with ticrypt-image-builder.sh generate <file>
Error: Missing configuration file argumentGive the configuration file: build image.conf
Error: Unknown build option: ...The option is misspelled or not in your installed version. ticrypt-image-builder.sh help lists the options you have; upgrade the builder for newer ones
Error: Unexpected argument: ...build takes one configuration file. Run the builder once per file
Error: Unknown command: ...ticrypt-image-builder.sh help lists the commands
dnf says "nothing provides guestfs-tools" when you install the builderThe build host runs version 8. Use a version 9 or 10 host
Error: vmc_stub_version must be a release number such as 3.13.2, ...Write the release as X.Y.Z, without a leading v
Error: Could not list the VM controller stub releases at ...The build host cannot reach storage.googleapis.com. Open the address in the message from the build host
Error: Could not download VM controller stub ... from ...The release in vmc_stub_version does not exist, or the download failed. Check the release on the Version Guide
Error: ... is not an RPM fileSomething between the build host and storage.googleapis.com, such as a proxy, answered with a page instead of the file
Error: Found no VM controller stub release with a Linux RPM at ...The channel answered without a Linux release. Pin a release with vmc_stub_version and report the problem to Tera Insights
Error: Could not download ... (the base image)Check base_image_url in a browser from the build host
Error: The base image ... has SHA-256 checksum ..., not ... as base_image_sha256 requires.The base image is not the one you checked. A latest address points to a new image after each point release: check the new checksum on the download site and update base_image_sha256. A download that differs was deleted, so the next build downloads it again
Error: virt-inspector could not read the base image ... or ... found no operating system in ...The base image is damaged or is not a qcow2 disk image. Download it again
Error: The root file system ... is not on a partition or logical volume. or Error: The root logical volume ... is not on exactly one physical volumedisk_size cannot grow this base image. Resize it by hand, as Disk space shows
The build stops at base.sh with "Could not connect to server"The build host cannot reach one of the addresses the build needs
"No space left on device" during a stepThe image is full. Set a larger disk_size. See Disk space
A package install is killed, or fails with "Cannot allocate memory"Give the build more memory: build --memsize 4096
ERROR: rstudio add-on supports EL8 and EL9 onlyRemove rstudio from a version 10 image
ERROR: could not read the kernel command line of the base image's default boot entryThe base image is not a standard GenericCloud image. Use one of the base images
ERROR: these files have the build appliance's kernel command lineThe image would not boot, so the build stopped. Keep the image with --keep-failed and report the problem with the build log
ERROR: unsupported EL versionThe base image is not version 8, 9 or 10
The build is very slowThe build host has no KVM. Check that /dev/kvm exists
sha256sum -c prints FAILED on the VM hostThe copy is damaged or incomplete. Copy the image again
A version 10 VM starts but never connectsThe CPU model tiCrypt gives the VM does not support x86-64-v3
Any other VM that starts but never connectsSee VM Image Troubleshooting. Check /etc/ticrypt/image-info and controller.toml in the image first