The daily target check only finds files that are gone. Verify (a ready
backup's Restore menu, superusers) runs backup.verify: it reads the
backup's files and those of the backups it builds on whole from the
target through a libvirt stream: each there, a disk at its size and in
its format on its base's file, the small files with their SHA-256, and
a disk with the SHA-256 recorded at its first verification. What is
wrong is kept on the backup and shown as Damaged; a target that cannot
be read fails the job and leaves the backup as it was. Progress in
bytes, cancellable.
QEMU sends a migrating VM's memory and copied disks in the clear. A
compute gets "Encrypt migrations (TLS)" (edit page, Advanced; API
field migration_tls); a migration between two hosts that both have it
passes VIR_MIGRATE_TLS whenever data moves (not for a shut-off VM's
definition alone), and the log says TLS. The hosts need QEMU's
certificates in /etc/pki/qemu; a host without them refuses before
anything moves. Tried on two AlmaLinux 10 hosts: the TLS stream starts
with a TLS record, the plain one with QEMU's QEVM header.
The schedule took a compute's VMs from the database, which learns of a
VM made with virsh only when a page reads the host. When its time comes,
the compute's own schedule task reads the host first, once a day per
compute and day; the new VM is backed up a pass later.
refresh_instance_database now says whether it synchronized: a host that
did not answer, was busy or failed is read again at the next pass, and
the known VMs are backed up meanwhile. A host in maintenance is not read.
The user list counts API tokens, and a query with a count has no order
of its own: PostgreSQL lists the users in any order. A user's page
listed the VMs and the SSH keys as stored, so did the profile and the
VM page's key choice.
The list counts each tag's VMs and hosts; a query with a count leaves
the model's ordering out, so the tags came in the order they were made.
With dozens of tags the page also gets the search box the other
administration lists have.
With dozens of tags the pills took rows of the list's top (six rows for
forty tags, the table below a phone's screen). The pills are now by how many
rows have the tag, the eight most used shown and the others behind "… More
tags N", which shows them as a row's "…" does; its count follows the
search and the state, and it hides when none is left behind it. A pill
behind it chosen (remembered, or by a row's badge) shows them.
A tag pill's count was the page's; the state pills' follow the search and
the tag. Now a tag pill counts the rows with its tag the search and the
state find, and one with none is hidden unless chosen, as a state pill.
- A name typed or pasted into the tag box that cannot be a tag shows the
rule (letters a-z, digits, dots, dashes, underscores; at most 12
characters) instead of nothing; the spaces a paste brings are dropped;
"constructor" is no longer taken for a tag there is.
- "Clear the filters" hides with the message it is in: the search box takes
the focus.
- A new or renamed tag has at most 12 characters (computes.models.TAG_LENGTH,
a validator: the column keeps 32, so names made before the limit stay
usable until renamed and the migration changes no SQL); the tag box
offers no longer name.
- The tags "…" shows in a table's cell go below the others within the
cell's width as it is, so the list's columns no longer move.
The tag filter was a select beside the search box. It is now a row of
pills as the VM states' are, below them on the VM list and above the table
on the hosts list: All tags, No tag and each tag with how many have it.
The state and tag pills share one helper in table_filter.js; a badge
chooses its tag's pill, the choice is remembered as before.
The host's VM list showed every tag of a VM, widening its Name column as
the VM list did before; it now shows three and the others behind "…".
There its tags are not buttons: the tags "…" shows take the focus, so a
keyboard user is not sent back to the top of the page.
- A tags form carries the names it showed (show_hidden_initial): sent back
unchanged, the VM's or host's tags are left as they are, so a form shown
before a tag was renamed or deleted does not bring the old name back.
- A rename whose tag is deleted while it waits answers 404, not 500.
- A removed VM kept only for a deleted tag leaves the Removed VMs page.
- A kept tag filter the list no longer offers is forgotten, so a name made
again later is not chosen by itself.
- A host's form saves the host and its tags in one transaction under the
ownership lock: a tag the Tags page deletes meanwhile is made again,
instead of a 500 after the host's other changes were saved.
- The hosts list shows three tags and "…" for the others, as the VM list.
- "…" shows the other tags on any page, the tag filter or not.
Tag badges are smaller than other badges everywhere, and the VM list
shows a VM's first three tags and "…" for the others: it names them in
its tooltip and shows them when pressed, by mouse or keyboard. A VM with
many tags no longer widens the name column and the table with it; the
tag list still filters by any of them.
- Saving a VM's tags unchanged writes no audit row.
- The VM report has a Tags column.
- A host's VM list and a user's VMs (account page) show the VMs' tags.
- The hosts list says "No host matches the filters." with Clear the
filters, as the VM list does; the tag list keeps to a phone's width
with a long tag.
- A removed VM's delete page says its owners and tags no longer come
back; the VM history rows say "owners and tags kept/restored".
- The API's ?tag= is trimmed; Tom Select's "Add tag" line shows the name
in lower case as it is made; Bulk Migrate's tag list goes back to its
title after a choice, so the same tag can be chosen again.
- A VM's tags set while its host's list drops it: the VM is checked
again under the ownership lock and the page says it was moved, instead
of a 500 or a success that kept the old tags in its removed record.
- A tag deleted right after another rename cleans the removed VMs' kept
name it has now; a delete sent while a backup schedule uses the tag
(saved after the page was shown) is refused with the schedules' names.
- A rename to a name another tag took meanwhile is a form error, not a
500; "There is a tag with this name already" is translated.
- Tom Select makes a typed name lower case and offers no new tag for one
that is there in another case; the API's ?tag= is lower-cased too.
On the VM and host lists a tag's badge chooses it in the tag list, the
tag list offers "No tag" for the rows without one, and each choice says
how many of the listed rows it shows ("prod (42)"); an owner counts only
their own VMs.
A backup schedule backs up a compute's VMs, chosen VMs, or now every VM
with a tag: those that have it at each run, templates left out, so a VM
given the tag is backed up from the next day on. The form checks the
target's pools on the hosts of the tag's VMs now; a VM tagged later on a
host without one fails its run with that reason, as a compute's new VM
does. The schedules list says "VMs tagged prod".
A tag a schedule uses is not deleted: the Tags page says which schedules
back up its VMs.
The Bulk Migrate page gets a "Choose by tag" list of its VMs' tags:
choosing one ticks the VMs with it that can migrate and unticks the
others, as a choice to review before Migrate; spread over the hosts, the
list is placed again as for any other tick. The job still gets the VMs
ticked, never the tag.
Administration gets a Tags page: each tag with how many VMs and hosts
have it, renamed (on the VMs, hosts and removed VMs that keep it) or
deleted (taken off all of them). Both are logged.
The API gives a VM's and a host's tags by name, read only, and its VM
and host lists take ?tag= for those with a tag.
The VM list and the hosts list get a tag list next to their search: the
rows with the tag chosen show, together with the search and the state.
It offers the tags of the rows listed only, so an owner sees the tags of
their own VMs, not the panel's. The state counts follow the tag, and the
chosen tag is remembered as the search and state are; Clear the filters
clears it too.
One list of tag names (lower case letters, digits, dot, dash, underscore;
up to 32) given to VMs and hosts. A superuser sets a VM's tags on its
Options tab and a host's on its form; Tom Select suggests the tags there
are and makes a new one typed. The VM list, the VM page and the hosts list
show them as badges, to everyone who sees the VM or host.
A VM's tags stay with it: an out-of-band move adds them to those on the
new host's record, and a VM that leaves its host keeps them on the Removed
VMs page (a VM with only tags too) and gets them back when it returns.
Setting them is audited and held against the VM's move.
- The backups' default ordering put created_at into the SELECT DISTINCT
of the retention pass and of the checkpoint pruning, so a VM came once
per backup: the pass read every backup's chain again. The ordering is
cleared before both.
- A page with a backup being made or deleted reloads every 4 s; it now
waits while a field is focused, so a filter or the backup form being
filled in is not lost.
- A VM may be named "<another backup's prefix>-x": its backups' files then
begin with that prefix too, and deleting the other backup removed them.
Backup.owns() takes a file only when no other backup UUID follows the
prefix; deletion and the storage pages' refusal use it.
- The restore-over page failed with a server error when the VM's pool
could not be read while naming the copies; it now says why.
Someone looking at the target's directory could not tell whose backup a
file was without opening its manifest. A new backup's files are named
<vm>-<backup uuid>-<file> (the VM's name made safe for a file name, at most
64 characters). The prefix is kept on the row: backups made before keep
their wvc-<uuid> names (migration 0007), and an import takes it from the
manifest's file name. Manifests of either naming are found by their
UUID suffix.
- A backup's volume is no longer attached to a VM as an existing volume:
the VM would write into the backup, and the backup's deletion (by hand
or retention) would remove the VM's disk.
- A backup whose create job ended without it (uncertain, then resolved)
stayed "creating" for good and could not be deleted. Only a backup whose
job still runs is being made; the others show as failed and are deleted.
- A VM with an NVDIMM or virtio-pmem device is refused: the host file
behind it is not copied, and its restore would use the original's file.
- A block device's or network NVRAM is refused by its path, instead of a
ready backup without the firmware state.
- A VM owner's restore pages link back to the VM's Backups tab, not to the
superusers' backup list.
A failed run kept the error as English text and the schedule page passed
the whole sentence to gettext, which found no catalog entry once values
were filled in. The run now keeps the error as messages (text and values),
as jobs do, and the page shows them with the new words filter.
The copies were named from the VM, the disk and the backup's minute only.
Restoring the same backup over the VM a second time, or a second backup
of the same minute, chose the name of the disk the VM already ran from,
and the job refused it. The names are now chosen at submission, numbered
from 2 when the pool has one, and kept in the job's intent apart from the
VM state the job checks again before and after the copies.
The target space check asked for every disk's virtual capacity even when
the backup copies only the blocks changed since its parent. The checkpoint
already reports those bytes per disk (VIR_DOMAIN_CHECKPOINT_XML_SIZE), so
checkpoint_usable becomes checkpoint_sizes and the check runs after the
parent is chosen, with the changed bytes for an incremental backup and the
capacity for a full one. The margin (free_percent, free_min_gib) is kept.
- An offline backup is not published when the VM was started while its
disks were copied (its NVRAM and TPM state would be newer than the
disks); recovery does not publish it either.
- A cancel asked during the last disk of an offline copy is honoured:
the copies are removed instead of the backup being published.
- The backup's domain definition is written 0600, as the TPM state is:
it holds the graphics passwords.
- The daily target check does not mark missing a backup finished in the
last 10 minutes: written through another compute, its files may not
be listed yet by this one's NFS client.
- Retention counts keep in ready backups only and also deletes the
missing ones older than the oldest kept: an incremental whose files
were lost no longer pins its chain on the target forever.
- When another row takes a VM's place (a migration the destination's
VM list recorded first, or a move found by a sync), its backups,
schedule membership and today's schedule runs move with its owners:
owners keep their backups, retention and restore over still see
them, and the VM is not backed up twice that night.
- A retention deletion checks the schedule's keep and later dependants
once the target is reached, right before deleting: keep raised while
the target connection waited no longer loses the backup.
- Pool and target changes on the target page take the target claim, so
an import or backup running into the target keeps the pools it uses.
- Import reads a manifest only with its definition and a disk; an
unreadable manifest is skipped and listed, the others are imported.
- The backups list shows 50 a page and keeps its filter across pages.
django-bootstrap5 marks every error-free field of a sent form green
(is-valid), so a form that was refused and not saved looked approved
beside its red message. A field renderer of the panel's own marks only
the fields in error; the others look as they did before the form was
sent. Set in settings.py.template (BOOTSTRAP5['field_renderers']).
Codex's audit of the module, each fix tested:
- a backup cancelled while its guest stayed frozen ends through recovery,
which thaws the guest first, not as a cancel that never thaws it;
- a restore copy libvirt refuses fails and removes the copies, instead of
waiting on an administrator as an unknown outcome;
- a deletion that did not end can be asked again from the page;
- recovery starts a restored VM the restore was asked to start;
- a manifest with a bad UUID no longer stops reading the target's others;
- an owner is not linked to a job only its submitter or a superuser opens.
From the browser audit: with a long VM name the backup list pushed the
state and the actions out of view, and on a phone only the time and VM
showed. The list folds the target under the time and the schedule under
the VM, cuts long names (whole on hover), shows the restore menu as an
icon on a phone, and fits from 390 px up. An owner without a backup quota
is told so, and quota sizes never read 0.0 GiB.
The host's VM list offered New Instance while the host was in
maintenance; the create pages then refused it and sent the user to every
VM's list. The button is disabled there, saying why, and a refused create
page goes back to the page it was asked from, else the host's VM list.
The schedule and target lists kept their add forms open below the table,
a long form always in the way. Each list now has a 'New schedule' or 'New
target' button at its top right that opens the form on its own page,
with Cancel; saving goes back to the schedule list, or to the new target,
with a message.
Saving a new or changed schedule took the user to the schedule's page,
which is its edit form and looked like the form they had just sent: it
seemed nothing was saved. Saving and deleting a schedule now go back to
the schedule list and say so; opening or closing a target to VM owners
says so too.
A finished job's page showed only its state and times: a restore did not
lead to the VM it made. The job page now opens what a job made (its
result's open), for every kind; reading a target's backups opens the
target. The one-disk restore form starts on the VM's host.
The page stops at 960 px, and the theme's tab padding (24 px each side)
made the eight tabs, with Backups, wider than the card at every desktop
width: the last one went to a second row. The tabs take Bootstrap's
narrow padding; they wrap only on tablets and phones.
Deleting a backup took the user to the generic job page, which named
neither the backup nor a way back. The deletion now stays on the page it
was asked from, says which backup is being deleted, shows the row as
being deleted and reads the page again until it is gone. The confirm
dialog is 'Delete backup' and names the target and that it cannot be
undone; the job's label names the VM and the backup's time.
The lists keep a VM's and a target's name and a row's actions on one
line, link a backup's job only when it is being made (Progress) or failed
(Why?), and say 'While shut off' for an offline backup. The schedule form
puts the full-backup setting on a row of its own and the schedule list
shows it; the restore form starts on the VM's host.
A VM owner with the backup permission who may change the VM gets its
Backups tab: the targets open to VM owners, the VM's backups on them,
Restore as a new VM or over the VM, and Delete for the backups they took;
no schedule is shown. Their restore as a new VM names the VM's host and
pool instead of asking, and the restore-over page says that the disks the
VM runs from are deleted. A superuser opens or closes a target to VM
owners on its page.
A permission 'Can back up instances' lets a user back up the VMs they
may change into targets open to VM owners, restore those backups over
the VM or as a new VM, and delete the backups they took by hand. Each job
checks the rights at admission and again when it runs.
- A backup quota (GiB, in the user's quota) counts the owner's own
backups: a backup being made holds its estimate, what its disks and the
files below them hold. An owner's backups run one at a time, so each
run's check sees the others.
- An owner restores as a new VM on the VM's compute, into its first
disk's pool, within the VM quota; the job counts in it until its VM is
recorded, as a clone does.
- An owner's restore over the VM removes the disks it ran from once the
switch is done, unless another VM uses them: the owner cannot remove
them.
- Recovery never begins a deletion the job had not begun.
Superusers keep everything they had.
The schedule form gains 'A full backup every N backups' (1: every backup
is full), and the backup lists mark incremental backups. The README says
which backups are incremental and what makes the next one full.
An incremental backup is restored by copying its chain flat: every base's
disk file is checked first, as the backup's own, and a chain whose base's
row is gone is refused. A backup that a living backup builds on is not
deleted, by hand or by retention: retention deletes a chain only once all
of it is beyond keep, newest first; a failed backup holds no base. The
target check marks a backup missing when a base's file is gone. Reading a
target links each incremental backup to its base, read first, and leaves
one without its base unread. Restoring over the VM forgets its
checkpoints: its disks are replaced, and the next backup is full.
A schedule with 'a full backup every N backups' above one makes a
checkpoint with each running VM's backup. The next builds on the
schedule's newest ready backup: the changed blocks are pushed into qcow2
volumes made with the base's file as backing file, by its name, as the
target pool's directory differs per host. The base is used only when its
chain is shorter than N, its disks are the VM's, every file of the chain
is in the target, and its checkpoint has a sized bitmap for every disk;
otherwise the backup is full and starts a chain.
Before each scheduled backup of a running VM, the VM's backup
checkpoints are pruned to each schedule's newest base. A checkpoint
libvirt no longer lists, as after a migration, is redefined first so
that its bitmap goes too.
A shut-off VM's backup checkpoints are forgotten before its external
snapshot: libvirt 11.10 makes no offline external snapshot while a
checkpoint exists. The next scheduled backup is then full.
libvirt refuses to undefine a domain that has checkpoints unless asked to
drop their metadata. The VM delete job and the shut-off migration's
removal of the source definition now pass CHECKPOINTS_METADATA; a backup
chain ends with them, and the next backup is full.
On wide screens the tabs never wrapped (flex-lg-nowrap) and their labels
do not break. With the Backups tab, Turkish labels and the united theme's
wider font, they ran past the card's right edge between 992 and 1199 px.
They now wrap to a second row when they do not fit.
A ready backup's Restore button becomes a menu: as a new VM, over the VM
(offered when the backup has its VM row) and one disk. Restoring over the
VM shows each disk's volume now and the new one before it is confirmed,
and why not when it cannot be done. The API gains restore-over and
restore-disk actions, answered 202 with the job.