LexiVirt OS 2.4.1Testing Only lexi-cloud.com

Installing updates and upgrading LexiVirt OS

This guide covers how updates work in LexiVirt OS. 2.4.x runs on Debian 13 and is installed fresh: no update package leads from 2.2.x (AlmaLinux), from the legacy 2.1.x line or from 2.4.0 into 2.4.1 (see Supported upgrade paths). On a host, updates are installed from the web console (System → Updates), with no shell or SSH, or on the host with lexivirt-update. The sections on 2.2.1 and 2.2.2 below apply to the earlier AlmaLinux line only.

What an update package is

An update package is one file, lexivirt-os-<version>-update.tar. It contains:

MemberWhat
update-manifest.jsonthe release manifest, signed through the release key chain (root key → signing-key certificate → manifest)
lexivirt-os-<version>-controlplane.tar.xzthe release: control plane, web console, system files, offline Python wheels
os/*.rpm (optional)operating-system packages; none in 2.2.2

The manifest pins every file by SHA-256 and size. It also states:

How a package is trusted. A SHA-256 sum proves only that a file is intact, not where it came from. A host accepts a package only when all of the following hold:

If any of these fails, the package is refused and deleted. A refused package can never be installed, through the API or otherwise. 2.2.2 is signed with test keys. Production keys need a separate approval.

Installing from the web console

Open System → Updates as a platform administrator.

  1. Get the package.
  2. Upload a package: choose the .tar file and select Upload and verify.
  3. Check for updates: if an update source is configured, select Check now and then Download and verify. An update source is an https:// or file:/// directory that publishes latest.release.json; its signature is checked too.
  4. Review. The review lists every check as Pass, Note or Blocks:
  5. signature and file integrity;
  6. the upgrade path from the installed version;
  7. the base system and CPU capabilities (the server model is never checked);
  8. the database schema change and whether it can be reversed;
  9. free disk space and memory;
  10. running tasks;
  11. another update in progress;
  12. running VMs;
  13. local changes to system files;
  14. restart requirements.

The review also shows the changes and the impact. Any check marked Blocks prevents installation.

  1. Install. Type the version to confirm. Two more confirmations appear only when they apply:
  2. replace system files that were changed on this host (copies are kept in the backup);
  3. accept that the host must restart afterwards. The restart is a separate step that you start yourself.
  4. Progress. The phases are: checks → prepare → pause control plane → backup → switch release → system files → database → start → health check → done. While the control plane restarts, the web console is unavailable for about a minute; the page reconnects by itself. New tasks are refused until the update finishes.
  5. Result. The result is one of:
  6. Completed.
  7. Rolled back: the health check failed and the previous version was restored automatically, together with the database copy and system files taken after the control plane stopped, so no data is lost.
  8. Failed: the error and the recovery steps are shown.

Running VMs keep running. Only the control-plane service restarts. The updater records each running VM's libvirt ID before the update and checks it again afterwards; the result says how many are still running with the same process. If a VM stopped meanwhile, the update did not cause it (the updater never touches VMs), so it is reported as a warning rather than rolled back: a rollback would not bring the VM back.

Automatic installation is off for Testing releases and cannot be turned on, either in the console or through the API.

Rolling back

After a completed update, Rollback returns to the previous release. It stays available until the next update, while the previous release is kept on the host.

A rollback restores the previous release's system files and units, removes files the update added, and checks the previous version's health.

Interrupted updates

The updater writes a journal after every phase (/var/lib/lexivirt/update/journal.json).

Recovery does one of three things:

Command line on the host (optional)

lexivirt-update status
lexivirt-update check  /path/lexivirt-os-<version>-update.tar     # the review, changes nothing
lexivirt-update install /path/lexivirt-os-<version>-update.tar    # asks you to type the version
lexivirt-update rollback
lexivirt-update recover
lexivirt-update history

Every operation, from the console or the command line, is recorded in the update history and the audit log (update.* actions).

Upgrading a 2.2.1 host to 2.2.2

2.2.1 cannot install updates. It only verifies them. Upgrade it from the 2.2.2 installation medium:

  1. Shut down the VMs on the host. The upgrade restarts the computer; VMs set to start automatically start again.
  2. Boot the host from lexivirt-os-2.2.2-amd64.iso (virtual media, USB or DVD) and choose Upgrade an existing LexiVirt OS installation, the second menu entry.
  3. The upgrade screen lists the LexiVirt OS installations it found, with the installed and the new version. Type upgrade.
  4. The update package on the medium must verify against the trust root of the installed host. Its checks run, the database and system files are backed up, and 2.2.2 is installed next to 2.2.1.
  5. The computer restarts. At the first start, 2.2.2 is health-checked; if it is not healthy, the host returns to 2.2.1 by itself.
  6. Sign in. System → Updates shows the completed upgrade, and offers Rollback to 2.2.1.

Nothing is erased: the medium's install entry is not used, and no disk is partitioned or formatted.

Supported upgrade paths

FromToHow
2.2.1 (AlmaLinux)2.2.2installation medium, Upgrade entry (2.2.1 has no updater)
2.2.x (AlmaLinux)2.4.0not supported: 2.4.0 runs on Debian 13; install it fresh on a server you can erase
2.4.0 (Debian 13)2.4.1no update package: 2.4.1 changes the installer; a running 2.4.0 host keeps working (see 2.4.0 hosts and 2.4.1)
2.4.x (Debian 13)later Debian-line releases that list it in upgrade_fromweb console or lexivirt-update (no update feed is published yet)
Debian lab builds (3.0.0-deb13.proto.N)—not supported: they sort above 2.4.0; reinstall
2.1.x (legacy line)—not supported (see below)

The updater refuses the following, and changes nothing:

2.4.0 hosts and 2.4.1

2.4.1 fixes the installer (spinning disks, hardware RAID logical drives, 4Kn disks, a RAID 10 installation that took about 50 minutes); the control plane and console are the same as in 2.4.0. A 2.4.0 host that was installed and starts needs nothing from it, and no update package is built for it.

The one change on the installed system is a udev rule for spinning disks: the mq-deadline I/O scheduler and a 180-second command timeout instead of 30 s, so a drive that retries a bad sector, or a RAID controller busy with a rebuild, is not reset or dropped from a software RAID while it recovers. On a 2.4.0 host with spinning disks an administrator can add it by hand:

sudo tee /etc/udev/rules.d/60-lexivirt-disk-io.rules >/dev/null <<'EOF'
ACTION!="add|change", GOTO="lexivirt_disk_io_end"
SUBSYSTEM!="block", GOTO="lexivirt_disk_io_end"
ENV{DEVTYPE}!="disk", GOTO="lexivirt_disk_io_end"
KERNEL!="sd*", GOTO="lexivirt_disk_io_end"
ATTR{queue/rotational}!="1", GOTO="lexivirt_disk_io_end"
ATTR{queue/scheduler}="mq-deadline"
TEST=="device/timeout", ATTR{device/timeout}="180"
LABEL="lexivirt_disk_io_end"
EOF
sudo udevadm control --reload && sudo udevadm trigger --subsystem-match=block --action=change

cat /sys/block/sda/queue/scheduler then shows [mq-deadline], and cat /sys/block/sda/device/timeout shows 180, for each spinning disk.

Moving from 2.2.x to 2.4.0

2.4.0 replaces the operating system (AlmaLinux 10 → Debian 13), so it is a new installation. The updater refuses a package whose operating system requirement does not match the host, and changes nothing. Moving VMs from a 2.2.x host to a 2.4.0 host has not been tested. Keep the 2.2.x host, and copies of its VM disks, until the new host runs your VMs. A host that has the withdrawn 2.2.3 installed should be reinstalled with 2.4.0.

Why there is no upgrade from 2.1.x

The 2.1.x line is a different product: a different code base, file layout, database and data model. The updater recognizes a 2.1.x host (/opt/lexivirt/VERSION without /opt/lexivirt/current) and refuses it with an explanation. It never creates a partial migration. A supported migration would need:

  1. A data exporter for 2.1.x. It would read the 2.1.x database (/opt/lexivirt/data/lexivirt.db) and produce a documented, versioned export: users and roles, nodes, networks, storage definitions, VM records, backups and keys.
  2. A mapping to the 2.2 model, with tests on real 2.1.x data covering:
  3. organizations and projects (2.1.x has none);
  4. roles and permissions;
  5. network definitions on bridges and VLANs;
  6. storage pools;
  7. VM definitions (libvirt XML and disks, which must be adopted, not copied);
  8. backup chains;
  9. secrets, re-encrypted with the 2.2 key.
  10. A dry run on a copy of the 2.1.x data that reports what would be imported, changed or dropped, before anything is changed.
  11. A rollback plan. The 2.1.x host is replaced at the OS level, so the migration needs a full backup of the 2.1.x system and a tested restore.
  12. Tests on a real 2.1.x installation, with running VMs, before the path is marked supported.

Until then, move a 2.1.x installation by installing 2.2 on a new or wiped host and recreating the configuration. Existing VM disks can be imported as volumes.

Host restart and kernel changes

A package may declare that the host must restart, for example for a new kernel. The review says so before installation, and installing needs a separate confirmation. The restart itself is another step:

2.2.2 contains no operating-system packages and needs no restart. Installing operating-system packages from an update package has not been tested on real hardware yet; see KNOWN-ISSUES.md.

Files on the host

PathWhat
/opt/lexivirt/releases/<version>/release trees (current and previous)
/opt/lexivirt/currentsymlink to the running release
/var/lib/lexivirt/update/journal.jsonthe current or last update operation
/var/lib/lexivirt/update/history.jsonlevery finished operation (replayed into the audit log)
/var/lib/lexivirt/update/backups/<id>/database copy and replaced system files of the last update
/var/lib/lexivirt/update/managed-files.jsonSHA-256 of the system files LexiVirt OS installed (detects local changes)
/etc/lexivirt/trust/*.pubpinned release root keys