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.confbuilds 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 --checkruns 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 want | Use |
|---|---|
| A Rocky Linux or AlmaLinux 9 or 10 image: terminal only, desktop over RDP, Slurm or cluster controller | The builder |
| A RHEL image | The builder, with a setup script that lets dnf install packages, for example by registering with Red Hat Satellite |
| An Ubuntu or Debian image | The manual process |
| A GNOME desktop through GNOME Remote Desktop | The manual process. The builder's desktop images use XRDP |
| A Windows image | Windows Images |
Before You Begin
| Requirement | Details |
|---|---|
| Build host | Rocky 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 space | About 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 repository | The tiCrypt package repository configured on the build host, the one the tiCrypt backend is installed from. See Components |
| Internet access | From the build host, during the build only. See the list below |
| CPU, for version 10 images | AlmaLinux 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 tiCrypt | An 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_urlinstead of downloading the base image yourself. - The sites of the application add-ons you choose, such as
packages.microsoft.comfor 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.
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
| Path | What it is |
|---|---|
/usr/bin/ticrypt-image-builder.sh | The 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.
-
Work in a directory with enough free space, for example
mkdir ~/images && cd ~/images. Paths inimage.confare relative to the directory you run the builder from. -
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 -
Write a configuration file with every setting explained:
ticrypt-image-builder.sh generate image.conf -
Edit
image.conf: set at leastbase_image_file,type,name,versionanddestination_dir. The Configuration reference describes every setting. -
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 -
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 -
Check the image, then add it to tiCrypt.
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)
| Command | Root | What it does |
|---|---|---|
build <file> | Yes | Checks the configuration, then builds the image that <file> describes. Root is required because virt-customize opens the guest file system |
generate [<file>] | No | Writes 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 |
types | No | Lists the image types |
version, --version | No | Prints the installed builder version |
help, -h, --help | No | Prints 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
| Option | What it does |
|---|---|
--verbose | Shows 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) |
--debug | Everything --verbose shows, plus a trace of every libguestfs call (-v -x). The output is long; use it when you report a problem |
--keep-failed | If 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 N | Number of virtual CPUs the build uses. Default: 4 |
--memsize MB | Memory 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 |
--compress | After 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 FILE | Also 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.confandbuild image.conf --verbosedo the same. - Values: write
--smp 8or--smp=8; the same for--memsizeand--log. - Combining: all options work together. If you give both
--verboseand--debug, the last one applies. - One file:
buildtakes exactly one configuration file. To build several images, run the builder once per file. - Your version: an option that
ticrypt-image-builder.sh helpdoes not list is not in your installed version, andbuildstops 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,versionanddestination_dirare set, and exactly one ofbase_image_fileandbase_image_url. - Values:
typeis an image type,disk_sizeis a size such as40Gand larger than the base image's disk, andbase_image_sha256has 64 hexadecimal characters. - Files: the base image,
config_file,setup_script, every file inscripts, theroot_passwordfile and every add-on inxrdp_extra_packagesexist. - Host: the tools the build needs are installed,
destination_diris writable (anddownload_dir, withbase_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
| Variable | What it does |
|---|---|
TICRYPT_IMAGE_BUILDER_DATADIR | Directory 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,typeandversionmust not contain/.
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.
| Setting | Required | Default | What it sets |
|---|---|---|---|
base_image_file | One of the two | Path to a local base image. It is copied, never changed | |
base_image_url | One of the two | Address 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_sha256 | No | The SHA-256 checksum the base image must have. The build stops if it differs. See Base image | |
download_dir | No | /var/cache/ticrypt-image-builder | Where base_image_url is downloaded to. Without root it is ~/.cache/ticrypt-image-builder |
type | Yes | xrdp in the generated file | The image type |
name | Yes | ticrypt-image in the generated file | First part of the output file name |
version | Yes | 1.0.0 in the generated file | Last part of the output file name. Must change for every new build of the same image |
destination_dir | Yes | . in the generated file | Directory the image and its .sha256 file are written to. It must exist and be writable |
disk_size | No | The base image's size | Size 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_file | No | configs/<type>.toml | The controller.toml to put in the image. See Controller configuration |
vmc_stub_version | No | The newest release | The VM Installer release to install, such as 3.13.2. See VM Installer release |
root_password | No | Random | The root password. See Root password |
setup_script | No | A script that runs in the image before anything is installed. See Setup script | |
xrdp_extra_packages | No | Application add-ons, desktop types only | |
packages | No | Extra packages to install with dnf, any type | |
scripts | No | Your 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 system | Base image address |
|---|---|
| AlmaLinux 10 | https://repo.almalinux.org/almalinux/10/cloud/x86_64/images/AlmaLinux-10-GenericCloud-latest.x86_64.qcow2 |
| AlmaLinux 9 | https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2 |
| Rocky Linux 10 | https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2 |
| Rocky Linux 9 | https://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 todownload_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 theCHECKSUMfile 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
latestfile names point to a new image after each point release. Withbase_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
versionfor 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-failedrenamed 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 sameversion.
Image Types
type decides what the image is for. ticrypt-image-builder.sh types lists the types.
type | What the image gets | Controller configuration |
|---|---|---|
terminal | Terminal access only, no desktop | configs/terminal.toml |
xrdp | A desktop reached over RDP: Xfce on version 8 and 9, MATE on version 10, with XRDP and the "Development Tools" group. Takes application add-ons | configs/xrdp.toml |
xrdp_slurmController | Everything in slurmController, plus the xrdp desktop and add-ons | configs/xrdp_slurmController.toml |
slurmController | Slurm 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 Slurm | configs/slurmController.toml |
slurmWorker | Slurm worker: slurm, slurm-slurmd, Munge and strongSwan | configs/slurmWorker.toml |
clusterController | The base image with the cluster controller configuration and no extra packages | configs/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:
| File | RDP tunnel | Slurm role | VPN client | VM managers are admins |
|---|---|---|---|---|
terminal.toml | No | Yes | ||
xrdp.toml | Port 3389 | No | ||
xrdp_slurmController.toml | Port 3389 | Controller, subnet 10.0.0.0/24 | No | No |
slurmController.toml | No | Controller, subnet 10.0.0.0/24 | No | No |
slurmWorker.toml | No | Node | Yes | No |
clusterController.toml | No | Yes |
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.tomlafter 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_versionto 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 formX.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-controllercopy in the tiCrypt public repository, which lags behind the channel. The image also excludes that copy fromdnf, 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-infoasvmc_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
| Value | Result |
|---|---|
| Not set | A 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 install | Use | Image types |
|---|---|---|
| An application with a ready-made add-on, such as VS Code, Chromium or RStudio | xrdp_extra_packages | xrdp, xrdp_slurmController |
| Packages from the operating system repositories, EPEL or the tiCrypt public repository | packages | All |
| Anything else: vendor installers, licenses, configuration | scripts, or a new add-on | All (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-on | What it installs | Downloads from | Notes |
|---|---|---|---|
atom | Atom editor 1.60.0 | github.com | Atom is no longer maintained |
chrome | Chromium, set as the default browser | EPEL | Chromium, not Google Chrome |
docker | Docker CE and the Compose plugin, started at boot | download.docker.com | Lets every member of the users group run the scripts in /opt/docker/bin as root. Needed by mysql and postgres |
jupyterlab | JupyterLab 4 with a Python 3.12 kernel in /opt/jupyterlab, and a JupyterLab entry in the Research menu | pypi.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 |
libreoffice | LibreOffice 25.8.4.2 | downloadarchive.documentfoundation.org | |
mysql | Start 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/mysql | Docker 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 |
postgres | The same for PostgreSQL 14 on 127.0.0.1:5432, with its data in /drives/drive1/postgres | Docker Hub, upload.wikimedia.org (icon) | Same as mysql, with the postgres:14 image (about 160 MB) |
pycharm | PyCharm Community 2022.1.3 in /opt/pycharm | download.jetbrains.com | |
python | Python 3.10.5 and 3.7.13, compiled from source into /opt/python/3.10 and /opt/python/3.7 | www.python.org | Compiling 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 |
rstudio | R 4.1.2 in /opt/R and RStudio Desktop | cdn.rstudio.com, download1.rstudio.org | Version 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-server | Apptainer and the rocker/rstudio:4.1.2 container, with a launcher that starts RStudio Server on localhost and prints a one-time password | Docker Hub | The container is downloaded during the build. Opens in a web browser: add chrome |
singularity | Apptainer, the successor to Singularity | EPEL | |
vscode | Visual Studio Code, without extensions | packages.microsoft.com | Updates, 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.jsonturns 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.jsonthat 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
.vsixfile 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>, neversystemctl startorenable --now, andfirewall-offline-cmdinstead offirewall-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.shdoes. Install Python packages during the build, asjupyterlab.shdoes. - Container images: Docker does not run during the build. Save a container image to a file with
skopeoand load it into Docker on first use, asmysql.shdoes. - 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 withCategories=Research;orCategories=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
- Checks the configuration, as
build --checkdoes, and lists the steps it will run inside the image. - Finds the VM Installer release (
vmc_stub_version, or the newest in the channel) and downloads its RPM to the build host. - Downloads
base_image_urltodownload_dirif the server has a newer file, and checks the base image againstbase_image_sha256if it is set. - Copies the base image to the output file, or with
disk_size, into a larger disk withvirt-resize. - Runs all the following steps inside the image in a single
virt-customizerun: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.- Root password, then your
setup_script. snippets/base.sh: keepsslurm.confout 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, disablessshdand enablesfirewalld.snippets/nfs.sh: installsnfs-utilsand enablesrpcbind,nfs-client.targetandrpc-statdat boot.- The image type's snippet, such as
snippets/xrdp.sh, then each add-on inxrdp_extra_packages. packages, thenscripts.- Uploads the controller configuration to
/etc/ticrypt/controller.tomland the build details to/etc/ticrypt/image-info, both owned by root. snippets/post.sh: disablessshdagain, updates every package, removes anyslurm.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.
- With
--compress, zeroes the free space in the image and compresses it. - Writes the image's checksum to
<name>-<type>-<version>.qcow2.sha256and printsThe image is readywith 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
| Item | Detail |
|---|---|
| Operating system | The newest release of its major version, because the build updates every package |
| VM Installer | The release in image-info, enabled at boot and excluded from dnf updates |
| Repositories | EPEL and the tiCrypt public repository are configured. The VM cannot reach them in tiCrypt unless you allow it |
| NFS client | For home directories and research drives, mounted by the VM Controller |
| SSH server | Disabled, because the VM Controller uses port 22. SFTP uploads still work through the VM Controller |
| Firewall | firewalld is on from the first boot. Desktop images allow the RDP port, 3389 |
| SELinux | Disabled. 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 |
| Slurm | No /etc/slurm/slurm.conf: the VM Controller writes it |
| Desktop images | The 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.toml | The controller configuration |
/etc/ticrypt/image-info | How 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
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
-
Copy the image and its
.sha256file 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 theticrypt-bricksstorage 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-bricksvirsh vol-list ticrypt-bricks | grep rocky9-researchIf the pool is not on storage your VM hosts share, repeat this on each VM host. To copy less, build with
--compress. -
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.
-
Select the image in a VM hardware setup. For a desktop image, start with 2 cores and 4 GB of memory.
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:
- Upgrade the builder:
sudo dnf upgrade ticrypt-image-builder. - Raise
versioninimage.conf. Download a new base image if you want to start from the newest point release. - 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.
-
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 -
If the output is not enough, build with
--keep-failedto keep the incomplete image:sudo ticrypt-image-builder.sh build --verbose --keep-failed image.confError: The build did not finish. The incomplete image was kept as ./rocky9-research-xrdp-2026.12.1.failed-20261202-143012.qcow2to inspect it. It is not a usable image: delete it when you are done. -
Look inside it read-only:
sudo virt-ls -a rocky9-research-xrdp-2026.12.1.failed-20261202-143012.qcow2 -l /etc/ticryptsudo virt-cat -a rocky9-research-xrdp-2026.12.1.failed-20261202-143012.qcow2 /var/log/dnf.log -
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.
| Problem | What to do |
|---|---|
<setting> is not set | Set 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 writable | Create 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_url | Set exactly one of the two |
Base image file ... does not exist | The 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 to | Choose a download_dir you can write to, or run the builder with sudo |
base_image_sha256 must be 64 hexadecimal characters | Copy 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 empty | Check the path in config_file |
root_password file ... does not exist | Check 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 exist | The 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 see | What to do |
|---|---|
Error: Configuration file ... does not exist | Create it with ticrypt-image-builder.sh generate <file> |
Error: Missing configuration file argument | Give 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 builder | The 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 file | Something 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 volume | disk_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 step | The 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 only | Remove rstudio from a version 10 image |
ERROR: could not read the kernel command line of the base image's default boot entry | The base image is not a standard GenericCloud image. Use one of the base images |
ERROR: these files have the build appliance's kernel command line | The 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 version | The base image is not version 8, 9 or 10 |
| The build is very slow | The build host has no KVM. Check that /dev/kvm exists |
sha256sum -c prints FAILED on the VM host | The copy is damaged or incomplete. Copy the image again |
| A version 10 VM starts but never connects | The CPU model tiCrypt gives the VM does not support x86-64-v3 |
| Any other VM that starts but never connects | See VM Image Troubleshooting. Check /etc/ticrypt/image-info and controller.toml in the image first |