1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00
webvirtcloud/doc/behavior-changes.md
catborise 8625d6250a feat(instances): free a running VM's unused disk space with the guest agent
The Disks tab of a running VM gets "Free unused space": a job
(instance.fstrim) has the guest agent trim each mounted file system
(guest-fstrim, 30 minutes at most) and lists what each one trimmed. A
disk passes the trim to its image file only with the discard mode unmap:
the tab and the job say when no disk of the running VM has it, and where
to set it (the disk's device details, from the next start).
2026-11-26 14:21:36 +03:00

10 KiB

Behavior changes

What an update from an older version changes for operators and users. To run the manage.py commands below, see Running manage.py.

  • Requests for a host not in ALLOWED_HOSTS get 400. The installer writes the server's names and IPs; add more with the ALLOWED_HOSTS env var. The cloud-init datasource host must be allowed too.
  • Logging out needs a POST; a GET to /accounts/logout/ gets 405.
  • The API accepts only a session from the login form or an API token (no HTTP Basic), and the API docs need a login. Sessions opened through the old password-only doors skip OTP; end them once after the update (everyone signs in again): manage.py shell -c "from django.contrib.sessions.models import Session; Session.objects.all().delete()".
  • Failed logins lock a user (django-axes): the sign-in page then says how long. The limit and lock time are on the Settings page; a locked user is marked on the Users page, and a superuser ends the lock with Unlock sign-in on the user's page. A sign-in lasts the session length set on the Settings page (24 hours by default). A sign-in notice set there (e.g. planned maintenance) is shown above the sign-in form.
  • Changing one's own password is the "Can change password" permission (per user or group; new users have it); SHOW_PROFILE_EDIT_PASSWORD is gone.
  • The admin's first-login password change survives losing data/admin_password (migration accounts.0007); run migrate as a user who can read that file.
  • A new VM and each clone get a random VNC password of their own (clones no longer share their source's). The console page sends it for a user with Open a console without the VM's console password, which a new user has unless unticked; others are asked for it. Existing VMs keep theirs.
  • An admin account that still has the password admin (the first user of versions up to v2.0.0) must change it at its next login, and its API tokens are refused until then (migration accounts.0013).
  • webvirtcloud/settings.py is part of the code, and every update replaces it; an installation's own settings are in data/local_settings.py. update.sh has them moved there once from an older version's own settings.py; in Docker, remove a mounted settings.py from docker-compose.override.yml.
  • The VNC console connects to /novncd/ on the panel's own address through nginx, and the serial console to /socket.io/: they work on HTTPS and behind another proxy without settings. WS_PUBLIC_PORT, WS_PUBLIC_HOST, WS_PUBLIC_PATH, WS_CERT and SOCKETIO_PUBLIC_HOST/_PORT/_PATH are gone; remove them from docker-compose.override.yml, /etc/default/webvirtcloud or data/local_settings.py, and close port 6080 in the firewall.
  • Installer and manual installations run the panel as systemd units (webvirt-cloud, webvirt-novncd, webvirt-socketiod, webvirt-worker, webvirt-backup.timer) and computes run webvirt-gstfsd, instead of supervisor; see Moving from supervisor to systemd. Service settings go into /etc/default/webvirtcloud, service output into the journal (journalctl -u webvirt-cloud); the app log stays in data/. novncd and socketiod run sandboxed (read-only system directories, no /home).
  • gstfsd does only what the panel signs with the host's key: it does not start without GSTFSD_KEY in /etc/default/webvirt-gstfsd. On every compute, update gstfsd and its unit and make the key as in Adding a Compute Node, step 3 (a remote panel's GSTFSD_BIND_HOST and GSTFSD_ALLOW_REMOTE move into that file from systemctl edit webvirt-gstfsd), then enter the key on each compute's edit page.
  • LDAP login's packages are in conf/requirements-ldap.txt and no longer installed by default, nor their build headers by the installer; the Docker image keeps them. An existing virtualenv keeps them, but only installing that file updates them (see LDAP).
  • The themes ship compiled; picking one on the Settings page only saves its name, and the "Theme SASS Path" setting is gone. Browsers revalidate static files on each load: files cached before the update can stay until a hard reload (Ctrl+F5) of each page; an external caching proxy may need a purge.
  • The panel backs itself up every day (Backups); in Docker into a new volume, webvirtcloud-backups.
  • The Docker image is built on Ubuntu 26.04 LTS (Python 3.14, libvirt 12) instead of 24.04; docker compose up -d --build rebuilds it.
  • New passwords must pass Django's password validators: at least 8 characters, not a common password, not only digits, not like the user's name or e-mail. Existing passwords keep working.
  • In Docker, the TLS client certificates of TLS computes are kept in a new volume, webvirtcloud-pki (/var/www/.pki), and backed up; put them there once (Adding a Compute Node, TLS).
  • The SQLite database must be on a local file system (WAL). Outside compose, stop the Docker container with docker stop -t 95 webvirtcloud so the worker can finish running jobs.
  • Long operations run as jobs in a worker process (manage.py run_worker): creating, cloning, migrating and deleting VMs, bulk power actions, moving disks, cloning and downloading volumes, taking and reverting snapshots, deleting external snapshots and VM backups. The page returns at once and the job panel and the Jobs page follow them. The API's VM create, migrate and delete answer 202 with the job and need a submission_key: a new one for each operation, the same one to retry it (a delete retried after its VM is gone gets 404). The create form no longer takes a console password; set it on the VM page.
  • An API error other than a field the request got wrong (which answers with the fields) is {"detail": ...} with a status that says what it is: 404 for a VM, pool or volume read or deleted that the host does not have, 409 for a volume in use, a template started or a stopped pool, 503 for a host that cannot be reached (all were 400 or 200 before); an unknown API URL answers JSON.
  • An ISO upload is tracked as a job that can be cancelled. The browser sends the file, so stay on the page until it ends; an upload left idle for an hour is ended and its partial file deleted.
  • A clone of a running VM (libvirt 11.10 or later, local file disks, no TPM) locks the VM until the copy ends and can be cancelled; cancelling a clone of a shut-off VM has no effect. A job that ends uncertain keeps its VM locked until a superuser resolves it on its job page.
  • The job worker runs at most half of its concurrency (Settings, at least one) of one host's jobs at a time, so a host that does not answer cannot take every slot.
  • A new VM is made in three steps (host, machine, details); flavors are presets that fill vCPU, memory and disk size. "VM Clone Auto Migrate" is removed; a clone stays on its source host.
  • A user's quota counts, for each VM, the larger of its running and its next-start vCPUs, memory and disks, and a queued clone as one VM. A user can be over the quota after the update; nothing is stopped, but new VMs, clones and raises are refused until it fits.
  • A user who is not a superuser names a clone with one of the free names the clone form offers; other names are refused.
  • A template VM is changed or deleted only by superusers and staff owners with the matching permission; other owners can still view, open the console and clone it.
  • On a running VM the edit forms show the settings as they will be at the next start, so saving an edit no longer reverts another pending change.
  • External snapshots need libvirt 9.9 or newer on the computes. libvirt 9.10 (openEuler 24.03 LTS) refuses to revert a snapshot taken without memory of a running or paused VM ("Invalid target domain state 'disk-snapshot'"); 11.10 reverts it. A VM's snapshots form one chain: after a revert, delete the newer snapshots before taking another. An internal snapshot is reverted only on a shut-off VM. Snapshot names no longer get an s1. prefix. A snapshot an older version took of a UEFI VM can only be deleted, not reverted. On NFS, the qemu user needs write access to the image directory to remove merged snapshot files.
  • A superuser limits a disk's I/O (IOPS and MiB/s, reads and writes together) under its Device details on the Disks tab; a running VM gets the limit at once.
  • Free unused space on a running VM's Disks tab (superusers) has its guest agent trim each file system (guest-fstrim, a job that lists what each one trimmed). Only a disk with the discard mode unmap (Device details, from the VM's next start; Settings > Disk Discard for new disks) passes it to its image file, which then shrinks; the tab says when no disk has it.
  • A storage volume a VM still needs (a disk, a backing file or a snapshot's file) is not deleted; deleting a VM with its files keeps a file another compute's VM or volume uses at the same path, and is refused before the VM is stopped when one of the other computes cannot be reached. A pool's page names the VMs of its host that use each volume and lists those the host does not use.
  • A VM that vanishes from its compute, or whose compute is deleted, keeps its owners, tags, protection and schedules for INSTANCE_OWNERSHIP_RETENTION_DAYS (30) in case the same UUID comes back, and its backups are linked to it again; superusers manage these records on the "Removed VMs" page.
  • The Logs page records who changed what (computes, users, groups, VM owners, settings, SSH keys, host networks, pools, volumes, interfaces, secrets and network filters), every login, failed login and lockout, and every page or API call answered 401 or 403 to a signed-in user or a request with credentials, with the address and the result (a VM hidden with 404 is not logged).
  • On a host whose libvirt cannot change network interfaces (the udev backend: RHEL 9 and later, Debian 12), the interface pages offer no create, start, stop or delete.
  • With SELinux (RHEL family, openEuler), systemd could not run the virtualenv's programs and the panel did not start. The installer now writes file context rules (httpd_sys_content_t for the panel, bin_t for venv/bin) instead of chcon, so a relabel keeps them. A manual installation runs semanage fcontext -a -t bin_t "/srv/webvirtcloud/venv/bin(/.*)?" and restorecon -R /srv/webvirtcloud once; an installer one runs the installer again.