Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| vm-reactor:start [27.10.2026 08:13] – VM Reactor placeholder page aria | vm-reactor:start [07.11.2026 19:51] (current) – stratum-core instead of stratum-init aria | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~NOTOC~~ | ||
| - | |||
| <WRAP centeralign> | <WRAP centeralign> | ||
| + | {{vm-reactor: | ||
| + | |||
| ====== VM Reactor ====== | ====== VM Reactor ====== | ||
| - | **v izdelavi** | + | **Virtual machines, containers and applications – one web interface for your Debian host.** |
| + | |||
| + | KVM virtual machines, LXC system containers and Docker applications side by side: one list, one number for every guest, one place to start, watch, back up and protect them. Part of the [[stratum: | ||
| + | </ | ||
| + | |||
| + | {{vm-reactor: | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | **VM Reactor 0.24 – Technical Preview** · Debian 13 (trixie) and Debian 14 (forky) · amd64 and arm64 · free software (GPL-3+) · package '' | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 80%> | ||
| + | **Technical preview.** VM Reactor is new and still changing: features, settings and the web interface may change from one version to the next. Try it, test it and tell us what you think – but keep backups of your guests and do not rely on it alone for production systems yet. | ||
| + | </ | ||
| + | |||
| + | <WRAP center round info 80%> | ||
| + | **A contrib package of the Stratum repository.** VM Reactor is published in the component //contrib// of the Stratum repository, next to the Stratum modules in //main//. It builds on Stratum – it needs '' | ||
| + | </ | ||
| + | |||
| + | ===== Overview ===== | ||
| + | |||
| + | VM Reactor turns a Debian computer into a host for guests. It manages **virtual machines** (KVM with libvirt), **system containers** (LXC) and **applications** (Docker compose projects) in one web interface with its own port – HTTPS, '' | ||
| + | |||
| + | VM Reactor uses the tools Debian already has: libvirt and QEMU, LXC, Docker from Docker' | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | <card header=" | ||
| + | Create a virtual machine with a wizard, install it from an ISO image, use the graphical console (VNC) or the serial console in the browser. Disks, snapshots, clones, guest agent, hardware watchdog, start order with the host. | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <card header=" | ||
| + | Complete Linux systems – Debian, Ubuntu, Alpine and more – from the LXC image server, started in seconds. A shell in the browser, resource limits, snapshots, backups, the same network and firewall as the machines. | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <card header=" | ||
| + | Docker from Docker' | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | <card header=" | ||
| + | Guests, ISO images, LXC templates and backups in the storage you choose: a directory, a btrfs pool on one or more disks – RAID 0, 1, 1C3 or 10, snapshots, compression and checksums – an LVM thin pool or an NFS share. Disks of the pools are added, removed and replaced while the guests keep running. | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <card header=" | ||
| + | A NAT network with DHCP, DNS, fixed addresses and **published ports** – for machines, containers and applications alike; guests directly in your local network (macvtap / macvlan); internal bridges and bridges on network cards – with confirmation and automatic rollback. | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <card header=" | ||
| + | A firewall for every guest (nftables, anti-spoofing), | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | <card header=" | ||
| + | viewer, user, operator, manager and admin – each user sees only the guests you give them. Two-factor sign-in (TOTP), allowed networks, sign-in limits, session timeout and an audit log of every change. | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <card header=" | ||
| + | A page of its own and switched on by default: deduplication (ksm), compression (zram, zstd) and ballooning (virtio-balloon with free page reporting and an automatic balloon) – tuned for a hypervisor, managed by '' | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <card header=" | ||
| + | **Ctrl+K** finds any guest by name, ID or address, any page and setting; the **bell** gathers what needs attention – watchdog checks, failed backups, guests whose storage is offline. Sign-in protection and remote support have their own tabs in the settings, the WireGuard mesh is on the Network page. | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | <card header=" | ||
| + | Hosts are paired once with a one-time code – over the LAN, the WireGuard mesh or any route. A guest moves to another host **offline** (every type: shut down, copied, started there) or **live** (a running machine keeps running while its memory and disks are copied). Checks first, removed here only when it runs there. | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <card header=" | ||
| + | A storage of a paired host is a backup target like any other – in **Back up now** and in schedules, with the retention rules applied there. The Backups page lists the backups of this host on every paired host; one click fetches a backup back to restore it here. | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== A look inside ===== | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | **More guests in the same memory – an advanced feature of VM Reactor.** **Memory** – a page of the main menu – brings three techniques together, always in this order: **deduplication** keeps identical memory pages of the virtual machines only once (ksm), **compression** keeps idle guest memory compressed in RAM (zram, typically 3:1 and more), and **ballooning** returns memory the machines do not use to the host (virtio-balloon). VM Reactor switches them on at the installation with values recommended for a virtualization host ('' | ||
| + | </ | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | < | ||
| + | {{vm-reactor: | ||
| + | <WRAP centeralign>// | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | {{vm-reactor: | ||
| + | |||
| + | // | ||
| + | </ | ||
| + | |||
| + | ===== Installation ===== | ||
| + | |||
| + | ==== What you need ==== | ||
| + | |||
| + | ^ Item ^ Requirement ^ | ||
| + | | System | **Debian 13 (trixie)** or **Debian 14 (forky)**, '' | ||
| + | | Virtualization | **VT-x / AMD-V** switched on in the firmware for KVM machines; without it, machines run emulated and slowly (containers and applications do not need it) | | ||
| + | | Stratum | '' | ||
| + | | Memory and disk | Enough for the host and all guests; memory compression, | ||
| + | | Browser | Any current browser; the web interface uses HTTPS on port '' | ||
| + | |||
| + | ==== 1. The Stratum repository ==== | ||
| + | |||
| + | If Stratum is not installed yet, follow the [[stratum: | ||
| + | |||
| + | <card header=" | ||
| + | <code bash> | ||
| + | grep Components / | ||
| + | # Components: main contrib non-free | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Sources written by older versions of '' | ||
| + | |||
| + | ==== 2. Install the package ==== | ||
| + | |||
| + | <card header=" | ||
| + | <code bash> | ||
| + | apt-get update | ||
| + | apt-get install vm-reactor | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | APT brings everything VM Reactor needs from Debian – libvirt and QEMU, LXC, nftables, dnsmasq, noVNC – together with the Stratum modules it works with: '' | ||
| + | |||
| + | <card header=" | ||
| + | < | ||
| + | vm-reactor: first sign-in as user admin, password in / | ||
| + | | ||
| + | vm-reactor: web interface https:// | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== 3. First sign-in ==== | ||
| + | |||
| + | - Open the address in the browser ('' | ||
| + | - Sign in as **admin** with the password from ''/ | ||
| + | - In **Users → My account** set your own password and switch on **two-factor sign-in** (an authenticator app); then delete the file: '' | ||
| + | - Look at the **Overview**: | ||
| + | |||
| + | <WRAP round tip> | ||
| + | **Docker** is installed together with VM Reactor. If you answered no, or the setup stopped – for example because Debian' | ||
| + | </ | ||
| + | |||
| + | ==== 4. Your first guests ==== | ||
| + | |||
| + | **Create guest** opens a wizard: choose the type, the name and the storage; a machine gets an ISO image, cores, memory and a disk, a container a system image, an application a compose file or a template. The guest appears in the list with the next free ID. By default it is in the **NAT network** and gets an address from the host's DHCP; publish ports to reach it from outside, or put it **directly into your LAN**. | ||
| + | |||
| + | ===== Administration ===== | ||
| + | |||
| + | ==== Users and roles ==== | ||
| + | |||
| + | Every role includes the rights of the ones before it. Users other than admins see only the guests in their **scope** (all, or a list of IDs). | ||
| + | |||
| + | ^ Role ^ May ^ | ||
| + | | **viewer** | see the guests of the scope: state, configuration, | ||
| + | | **user** | + start, shut down, stop, reboot and use the console | | ||
| + | | **operator** | + snapshots, backups and logs | | ||
| + | | **manager** | + create, change, clone and delete guests, Docker compose, disks, ISO images; restore and delete backups; schedules | | ||
| + | | **admin** | + the host: shell, storage, network, users, security, settings (always all guests) | | ||
| + | |||
| + | <card header=" | ||
| + | <code bash> | ||
| + | vm-reactor user add anna operator 3,4,7 # asks for the password | ||
| + | vm-reactor user list | ||
| + | vm-reactor user guests anna all | ||
| + | vm-reactor user 2fa-off anna # lost phone: switch two-factor sign-in off | ||
| + | vm-reactor user disable anna # sessions end at once | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Securing the web interface ==== | ||
| + | |||
| + | * **Allowed networks** (Users, '' | ||
| + | * **Sign-in limits**: after '' | ||
| + | * **stratum-security** (Settings → Security): the protected service '' | ||
| + | * **stratum-firewall**: | ||
| + | * **Own certificate**: | ||
| + | * **Audit log**: every sign-in and change is in ''/ | ||
| + | |||
| + | ==== Network ==== | ||
| + | |||
| + | ^ Network ^ What the guest gets ^ | ||
| + | | **NAT** (bridge '' | ||
| + | | **Local network** | its own address in your LAN (machines: macvtap, containers: macvlan) – the host itself cannot reach these guests | | ||
| + | | **Bridge** | a bridge on a network card ('' | ||
| + | | **Internal bridge** | a bridge without a network card – guests talk only to each other | | ||
| + | | **Applications** | the front service of a Docker application joins the NAT network (Docker network '' | ||
| + | |||
| + | Every guest also has its own **firewall** (nftables on the bridge): policies, rules and protection against address spoofing. With '' | ||
| + | |||
| + | **Protection against lock-out.** A change of the NAT network, of a bridge on a network card or of the access to the web interface (port, address, allowed networks under **Settings – General**) must be kept within **60 seconds**: a banner with the countdown and **Keep the change** appears on every page. Confirm it from the browser over the new configuration; | ||
| + | |||
| + | ==== Storage ==== | ||
| + | |||
| + | The storages are listed in ''/ | ||
| + | |||
| + | <card header=" | ||
| + | < | ||
| + | local dir / | ||
| + | data btrfs / | ||
| + | thin lvmthin / | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | **Add storage** offers four types; the dialog checks your entries at once and shows what is wrong: | ||
| + | |||
| + | * **Directory** – any mounted directory: a second disk, an existing btrfs file system or an NFS share the host mounts itself. VM Reactor recognises the file system: on btrfs the guests get subvolumes and snapshots, on an NFS share the storage is offline while the share is not there. | ||
| + | * **Btrfs pool** – a new btrfs file system on one or more empty disks or partitions: **single**, **RAID 0**, **RAID 1** (2+ disks), **RAID 1C3** (3 copies, 3+ disks) or **RAID 10** (4+ disks). RAID 5/6 are not offered – their write hole can lose data. The metadata always have two copies at least. Compression zstd, checksums with self-repair from the copies, instant snapshots of every guest (its own subvolume), clones as reflinks; disks of machines are raw files (optionally without copy-on-write). **Disks** on the card adds, removes and replaces disks – also a failed or missing one – converts the profile, starts a scrub or a balance and mounts a pool with a missing disk degraded, all while the guests keep running. VM Reactor watches the pools (missing disks, device errors, scrub results) and runs a scrub every 30 days. | ||
| + | * **LVM thin pool** – a new thin pool on one or more empty disks (or an existing one such as '' | ||
| + | * **NFS share** – an export ('' | ||
| + | |||
| + | <card header=" | ||
| + | <code bash> | ||
| + | vm-reactor storage list # all storages: type, state, size, free space | ||
| + | vm-reactor storage add data btrfs /dev/sdb /dev/sdc --profile raid1 --yes # a btrfs pool, RAID 1 | ||
| + | vm-reactor storage disk add data /dev/sdd --yes # one more disk, the data are spread | ||
| + | vm-reactor storage profile data raid1c3 | ||
| + | vm-reactor storage disk replace data /dev/sdb /dev/sde --yes # replace a disk (devid:N: a missing one) | ||
| + | vm-reactor storage scrub data # check every block, repair from the copies | ||
| + | vm-reactor storage disk list data # disks, errors, the last scrub | ||
| + | vm-reactor storage add thin lvmthin --new /dev/sdf --yes # an LVM thin pool | ||
| + | vm-reactor storage add share nfs 10.0.0.5:/ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Backups and restore ==== | ||
| + | |||
| + | <card header=" | ||
| + | <code bash> | ||
| + | vm-reactor backup 2 # guest 2, paused during the backup (default) | ||
| + | vm-reactor backup 2 --mode stop # shut down, back up, start again | ||
| + | vm-reactor restore / | ||
| + | vm-reactor backup prune --dry-run | ||
| + | vm-reactor backup prune --guest 2 --keep-last 3 --keep-weekly 4 # own rules for guest 2 | ||
| + | vm-reactor backup protect local:< | ||
| + | vm-reactor backup 2 --storage peer: | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | A backup is one file in the backup storage; it can be exported, copied to another host and imported there. **Backups → Schedules** runs backups by itself – on the days and at the time you choose, for all guests or a list. **Retention rules** decide which backups stay: the last N, one per day, week, month or year for N periods, and a maximum age. A backup stays when any rule keeps it; the newest backup of a guest is never removed, and **protected** backups (lock) are never removed at all. The rules can be previewed before they are saved, manual and imported backups have rules of their own (off by default), and every removal is written to the audit log. A **storage of a paired host** ('' | ||
| + | |||
| + | ==== Migrations ==== | ||
| + | |||
| + | **Migrations** (main menu, Operations) moves guests between VM Reactor hosts. | ||
| + | |||
| + | - **Pair the hosts once.** On the first host: **Pairing code** – a code valid for 15 minutes, with the address and the certificate of the host. On the second host: **Pair a host**, enter the address and the code. The hosts then trust each other: the web interface of the other host with its certificate pinned and a shared secret (''/ | ||
| + | - **Migrate.** Choose the guest, the host and the storage there, then **Check**: storage and free space, the ID, the network, versions, processor and SSH. A guest keeps its ID when it is free there; its MAC address, published ports and firewall go along, a guest in the NAT network gets an address of the NAT network there. The guest is removed here only when it runs there; its backups stay here. | ||
| + | |||
| + | ^ Mode ^ Guests ^ How ^ | ||
| + | | **Offline** | machines, containers, applications | shut down, backed up, copied (checksum), restored and started there | | ||
| + | | **Live** | running machines (KVM) | '' | ||
| + | |||
| + | <code bash> | ||
| + | vm-reactor peers # the paired hosts, online or not | ||
| + | vm-reactor migrate 7 host2 --check | ||
| + | vm-reactor migrate 7 host2 --storage local # offline | ||
| + | vm-reactor migrate 7 host2 --live | ||
| + | vm-reactor peers unpair host2 # end the pairing (on both hosts) | ||
| + | </ | ||
| + | |||
| + | ==== Docker ==== | ||
| + | |||
| + | VM Reactor takes care of Docker completely – there is nothing else to install: | ||
| + | |||
| + | * **Installation and upgrades**: Docker CE with compose and buildx from Docker' | ||
| + | * **Settings** (Docker → Settings): log rotation, address pool of new networks, live restore, IPv6, no-new-privileges, | ||
| + | * **Automatic updates** of the applications every night or every Monday at 04:30, with a mode per application: | ||
| + | * **Limits**: CPU and memory for all containers of an application (Resources of the application). | ||
| + | * **The whole host**: all containers (also those not made by VM Reactor), images, volumes, networks, disk usage and cleanup, events (crashed, out of memory, unhealthy) and the Docker users. | ||
| + | |||
| + | <code bash> | ||
| + | vm-reactor docker status | ||
| + | vm-reactor docker set logsize 10mx3 # 3 log files of 10 MB per container | ||
| + | vm-reactor docker update 5 --check | ||
| + | vm-reactor docker rollback 5 # back to the images before the last update | ||
| + | vm-reactor docker import / | ||
| + | </ | ||
| + | |||
| + | ==== Start, shutdown, watchdog ==== | ||
| + | |||
| + | * **Start with the host**: guests with autostart start in their **start order** with delays ('' | ||
| + | * **Watchdog**: | ||
| + | * **Memory** (main menu): deduplication (ksm with '' | ||
| + | |||
| + | ==== Stratum modules ==== | ||
| + | |||
| + | ^ Module ^ With VM Reactor ^ Where ^ | ||
| + | | stratum-firewall | rules of the web interface, the NAT network and published ports | automatic | | ||
| + | | stratum-security | fail2ban protects the sign-in (jail '' | ||
| + | | stratum-wireguard | the NAT network is announced in the mesh; the members reach the guests | Network | | ||
| + | | stratum-support | support sessions; '' | ||
| + | | stratum-memory | compression (zram), deduplication (ksm) and the automatic ballooning of the machines | Memory | | ||
| + | | stratum-ansible | dynamic inventory of the machines and containers | '' | ||
| + | |||
| + | ==== Command line ==== | ||
| + | |||
| + | <card header=" | ||
| + | <code bash> | ||
| + | vm-reactor list # all guests: ID, type, name, state, storage | ||
| + | vm-reactor start 3 # also: shutdown, stop, reboot | ||
| + | vm-reactor url # address of the web interface | ||
| + | vm-reactor docker help # Docker and the applications | ||
| + | vm-reactor migrate 7 host2 # move guest 7 to the paired host host2 (--live, --check) | ||
| + | vm-reactor backup prune --dry-run | ||
| + | vm-reactor help # every command and switch | ||
| + | systemctl status vm-reactor | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Files ==== | ||
| + | |||
| + | ^ Path ^ Contents ^ | ||
| + | | ''/ | ||
| + | | ''/ | ||
| + | | ''/ | ||
| + | | ''/ | ||
| + | | ''/ | ||
| + | | ''/ | ||
| + | | ''/ | ||
| + | |||
| + | ==== Updates ==== | ||
| + | |||
| + | VM Reactor is updated with APT like every other package ('' | ||
| + | |||
| + | **Optional packages** (**Settings – Packages**, one click each): '' | ||
| + | |||
| + | VM Reactor is written in **Go** – the server, the API and the command line are one Go program; the web interface uses Vue.js. | ||
| + | |||
| + | ===== VM Reactor Handbook ===== | ||
| + | |||
| + | <WRAP center round important 80%> | ||
| + | **The VM Reactor Handbook is being written.** This first draft contains the cover, the complete contents and the first chapters; the chapters shown in grey in the contents are in preparation and follow in the next drafts, together with VM Reactor itself. | ||
| + | </ | ||
| + | |||
| + | <grid cols=" | ||
| + | < | ||
| + | <WRAP centeralign> | ||
| + | [[https:// | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | **The guide to running machines, containers and applications side by side on Debian** – for the people who use them and for the administrators who run the host. Every chapter is marked with the readers it is meant for. | ||
| + | |||
| + | * **Getting started** – what VM Reactor is, installation and a tour of the web interface //(in this draft)// | ||
| + | * **Guests** – machines, containers and applications; | ||
| + | * **Resources of the host** – storage, memory, networks, backups and restore //(in preparation)// | ||
| + | * **Administration** – users and roles, securing the web interface, the Stratum integrations and updates //(in preparation)// | ||
| + | * **Reference** – every command and switch, files, troubleshooting and a glossary //(in preparation)// | ||
| + | |||
| + | <card header=" | ||
| + | **[[https:// | ||
| + | Draft · November 2026 · VM Reactor 0.24 · Stratum Project \\ | ||
| + | On a VM Reactor host: '' | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | {{vm-reactor: | ||
| </ | </ | ||