From 94181cfc1476b3722e92a8432de391dea0f52725 Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 19 Nov 2026 14:05:31 +0300 Subject: [PATCH] docs: tags, host maintenance and Balance README features, backup schedules by tag and the API's ?tag=; the apps that hold them in architecture.md; tags in the permissions table. --- README.md | 7 ++++++- doc/architecture.md | 9 +++++---- doc/permissions.md | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d6efdaf6..250747f4 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ WebVirtCloud and `virt-manager`/`virsh` can manage the same libvirt host **concu ## Features * QEMU/KVM hypervisor management (multiple compute nodes), with each host's capacity and what its VMs were given +* Host maintenance: a host in maintenance takes no new VMs, incoming migrations or VM starts; putting it in maintenance offers to migrate its VMs away with Bulk Migrate +* Balance: proposes migrations that even out the running VMs' memory, then vCPUs, as a share of each host's size * Virtual machine lifecycle: create, delete, power management, clone (also of a running VM, with libvirt 11.10 or later), migrate (with or without shared storage), bulk migrate (a host's chosen VMs to another host, the chosen number at once), disk moves between pools * Long operations (create, clone, delete, snapshots, migration, disk moves, ISO upload) run as jobs that the page follows; a queued job can be cancelled, and a running clone, migration, disk move or ISO upload too * External snapshots (memory optional; without memory, guest file systems can be frozen through the agent) @@ -46,6 +48,7 @@ WebVirtCloud and `virt-manager`/`virsh` can manage the same libvirt host **concu * 2FA (OTP / TOTP) and failed-login lockout * SSH public key and root password management (guest agent for a running VM, gstfsd for a shut-off one) * Finding VMs by IP or MAC address, and a VM report as an Excel file +* Tags on VMs and hosts, set by superusers: the lists filter by them, Bulk Migrate chooses VMs by them and a backup schedule backs up every VM with a chosen tag (templates left out) * An audit log of who changed what, with its result * Cloud-init datasource interface (OpenStack metadata compatible) and NoCloud seed media * REST API — OpenAPI 3.0 (Swagger & ReDoc), with API tokens @@ -594,7 +597,7 @@ Users with the **Can back up instances** permission back up the VMs they may cha VMs with a TPM of their own settings (encryption, a state path), host devices, shared host directories, or encrypted or non-file disks are not backed up; CD-ROMs are left out. -**Backups → Schedules** backs VMs up every day: chosen VMs or every VM of a compute, into a target, at a time in the panel's time zone (`TZ`), keeping the newest backups of each VM up to a number. The job worker starts each VM's backup within 6 hours of the time, one copy at a time per target, and waits for a host in maintenance; a VM not started in that window waits for the next day. Older backups of a schedule are deleted; backups taken by hand are not. With "A full backup every N backups" above 1, a schedule's backups of a running VM with qcow2 disks between two full ones copy only what changed since the previous one; each is restored like a full one, and a chain of them is deleted once all of it is beyond the number kept. A migration, a restore over the VM or a shut-off VM's backup makes the next one full. Each target is checked once a day: a backup whose files are gone is marked missing. +**Backups → Schedules** backs VMs up every day: chosen VMs, every VM of a compute or every VM with a chosen tag (not templates), into a target, at a time in the panel's time zone (`TZ`), keeping the newest backups of each VM up to a number. The job worker starts each VM's backup within 6 hours of the time, one copy at a time per target, and waits for a host in maintenance; a VM not started in that window waits for the next day. Older backups of a schedule are deleted; backups taken by hand are not. With "A full backup every N backups" above 1, a schedule's backups of a running VM with qcow2 disks between two full ones copy only what changed since the previous one; each is restored like a full one, and a chain of them is deleted once all of it is beyond the number kept. A migration, a restore over the VM or a shut-off VM's backup makes the next one full. Each target is checked once a day: a backup whose files are gone is marked missing. The target must be: @@ -878,6 +881,8 @@ The REST API (Django REST Framework, documented with `drf-spectacular`) takes th curl -H "Authorization: Token wvc_..." https:///api/v1/instances/ ``` + The VM and compute lists (also a compute's VMs) take `?tag=`. + ### Screenshots | VM list | VM page | diff --git a/doc/architecture.md b/doc/architecture.md index fa3d123e..7b4fb29e 100644 --- a/doc/architecture.md +++ b/doc/architecture.md @@ -45,9 +45,9 @@ panel ── gstfsd on each compute, at the compute's hostname, port 16510 (HMAC | App | What it holds | |---|---| | `accounts` | users' VM permissions (`UserInstance`), quotas (`UserAttributes`), SSH keys, API tokens, OTP, login | -| `admin` | users, groups and their permissions pages | +| `admin` | users, groups and their permissions pages, the Tags page | | `appsettings` | settings stored in the database, themes, `manage.py backup` | -| `computes` | compute hosts (`Compute`: hostname, type, login, password, gstfsd key, migration address), host overview and capacity | +| `computes` | compute hosts (`Compute`: hostname, type, login, password, gstfsd key, migration address, maintenance), tags (`Tag`) of VMs and hosts, host overview and capacity, Bulk Migrate and Balance | | `instances` | VMs (`Instance`: compute, name, UUID), flavors, removed-VM records (`InstanceTombstone`), the VM pages and their jobs | | `storages`, `networks`, `interfaces`, `nwfilters`, `virtsecrets` | the host's pools and volumes, networks, interfaces, network filters and secrets, read from libvirt | | `nodedevs` | the host's PCI and USB devices and which VM has them | @@ -55,7 +55,7 @@ panel ── gstfsd on each compute, at the compute's hostname, port 16510 (HMAC | `datasource` | cloud-init metadata (OpenStack format), a VM found by its client address | | `logs` | the audit log (`Logs`) and its page | | `operations` | jobs: `Operation`, `Claim`, `WorkerLease`, the worker and the Jobs pages | -| `vmbackups` | VM backups: targets (a storage pool per compute), backups and their files, their jobs and pages | +| `vmbackups` | VM backups: targets (a storage pool per compute), backups and their files, schedules (`BackupPolicy`), their jobs and pages | ## vrtManager @@ -84,7 +84,8 @@ Long operations (create, clone, migrate and delete VMs, move disks, clone volume `/api/v1/` (session from the login form or an API token): - `computes/`, and per compute `instances/`, `instances/create///`, `networks/`, `interfaces/`, `storages/` (with `volumes/`), `archs/` -- `instances/`, `flavor/`, `migrate/`, `operations/` +- `instances/`, `flavor/`, `migrate/`, `operations/`, `backups/` +- the VM and compute lists (also a compute's `instances/`) take `?tag=` - schema at `/api/schema/`, Swagger at `/swagger/`, ReDoc at `/redoc/` Create, migrate and delete answer 202 with the job. diff --git a/doc/permissions.md b/doc/permissions.md index 70b4ffc0..062ba16a 100644 --- a/doc/permissions.md +++ b/doc/permissions.md @@ -23,6 +23,7 @@ WebVirtCloud combines three kinds of access rights: | Delete the VM | ✅ | ✅ | `is_delete` | ❌ | | Disks and media (add, attach, edit, detach, delete volumes; CD-ROM/ISO) | ✅ | ❌ | — | ❌ | | Network interfaces, boot options, vCPU hotplug, autostart, guest agent, suspend/resume, migrate, raw XML, owners | ✅ | ❌ | — | ❌ | +| Set tags (owners and `view_instances` see them) | ✅ | ❌ | — | ❌ | | Backups: back up, restore, delete; backup targets | ✅ | ❌ | — | ❌ | Notes: