1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00
Commit graph

473 commits

Author SHA1 Message Date
catborise
e802fa07e2 feat(instances): snapshot the VMs chosen on the VM list
Taking the same snapshot of many VMs, before an update say, took each one's
Snapshots tab. The VM list's bulk form now has a snapshot name with Take
snapshots: an external snapshot, without memory and without freezing file
systems (the tab has those choices), queued as a snapshot.create job for
each chosen VM, with the tab's rules (change rights and the snapshot
permission). A VM refused or held is named and the others are queued; the
Jobs page follows them. Enter in any text box of the form sends nothing.
The power and snapshot views share one queuing helper.
2026-11-20 14:24:46 +03:00
catborise
1c3993133e fix: the host comparison reads afresh, skips silent hosts and unread listings; bulk form limit
Audit and review (Codex, agy) of the host comparison and the bulk tag:
- a read of what a host's VMs need was used again for 5 minutes without a
  new one, so a network added to fix a line was still reported: each load
  reads again, the last read standing in only when the new one is late;
- a host that stopped answering kept what it said before, and was reported
  both as not answering and as a destination lacking things: only hosts that
  answer are compared;
- one listing of a host that could not be read (its secrets, say) dropped the
  whole host: each listing is read on its own and only those read compared;
- the kept reads no longer keep whole VM definitions (plain strings);
- choosing more VMs than the bulk form takes made Django refuse the form:
  past 500 the buttons are off and the count says so; the tag view refuses
  them as the power view does.
2026-11-20 13:58:48 +03:00
catborise
5c169ca504 feat(instances): a superuser tags the VMs chosen on the VM list
Tagging many VMs took each one's Settings tab. The VM list's bulk form now
has, for a superuser, a tag box (every tag offered) with Add tag and Remove
tag: under the ownership lock the tag is checked as on the Settings tab,
made if new, and added to (or removed from) the chosen VMs that lack (or
have) it, each with its own log row. Enter in the tag box sends nothing (it
would press Start, the form's first button); only the two tag actions are
taken, and none of the chosen VMs left makes no tag.
2026-11-20 13:10:44 +03:00
catborise
b36f674542 fix: power jobs name their action, refuse what does not apply and recover by the VM's state
Audit and review (Codex) of the bulk power and disk I/O limit:
- the Jobs page showed "Power" for a start, a shut down and a force off
  alike: each is a job kind of its own (instance.start, .shutdown,
  .force_off) named by its action;
- forcing off a VM already shut off made libvirt refuse after the job had
  recorded its intent: it ended uncertain and kept the VM locked. Each job now
  refuses a VM its action does not apply to before anything changes, and
  recovery reads the VM's state (running after a start, shut off after a
  shut down or force off) instead of ending uncertain;
- the Jobs page left out its kind and state filters for owners, whom the VM
  list sends there: they apply to every user;
- a running NBD disk's tls, which libvirt fills in, no longer makes it
  another disk than the next start's;
- a disk whose running limit differs from the next start's shows both.
2026-11-20 12:10:06 +03:00
catborise
35c794c50c feat(instances): start, shut down or force off the VMs chosen on the VM list
Powering many VMs took a click each. On the VM list each VM its user may
power (theirs, or every one for a superuser) has a box; "Choose the VMs
shown" chooses those on screen. Start, Shut down and Force off queue an
instance.power job for each chosen VM: each holds its VM and shares its host,
checks its user and the VM again when it runs, and has the checks of the
page's buttons (a template is not started, a host in maintenance starts none,
a VM an administrator paused is not an owner's to power), its own recovery
and its own log row. A VM the user may not power, or that another job holds,
is named and the others are queued; the Jobs page follows them. A VM a filter
or a collapsed host hides is neither counted nor sent, and the list does not
reload while VMs on screen are chosen.
2026-11-20 11:39:45 +03:00
catborise
2b60b79a5f feat(instances): a superuser limits a disk's I/O
One VM's busy disk could take its storage from all the others. Under a
disk's Device details on the Disks tab a superuser sets an I/O limit, IOPS
and MiB/s for reads and writes together (0: none). libvirt applies it to each
definition that has the disk: the running VM's at once, and the one for its
next start; a transient VM's live only. A disk whose tuning is more than this
(a throttle group, a burst, read and write apart, bytes not whole MiB/s)
shows "Set in the VM's XML" and is changed there; a disk the next start
replaces is refused until then.
2026-11-20 11:10:55 +03:00
catborise
46931bdbdb feat(instances): the Guest Info tab shows how full the guest's file systems are
A disk filling up inside a guest was seen only from the guest. The Guest Info
tab now lists, from the guest agent, each mounted file system with its type
and used / total size, a bar turning amber from 85 %. File systems the agent
gives no size of (pseudo ones, Windows' System Reserved) are left out; an
agent without the command still shows the rest of the tab.
2026-11-20 09:30:15 +03:00
catborise
dc5b1dbb2a fix(computes): a VM that returns gets its protection, schedules and backups back
A VM that vanished from its compute, or whose compute was deleted and added
again, came back with its owners and tags only: it was no longer protected,
its schedules no longer backed it up, and its backups stayed unlinked, so its
Backups tab no longer listed them and retention left them for good. The
Removed VMs record now keeps its protection, its schedules and its own
backups (not those of a copy under the same UUID), and gives them back.
Turning protection on or off waits for the ownership step, so a VM dropped
from its host's list meanwhile is not told protected.
2026-11-20 08:17:23 +03:00
catborise
adb4231db7 feat(instances): a protected VM is not deleted nor restored over
A superuser turns a VM's protection on or off on its Settings tab, not while
a job holds the VM (a deletion or a restore over it that runs would not
stop). While it is on, its deletion (page, API, a queued job at its start)
and a restore of a backup over it are refused; the Destroy tab, the destroy
page and the restore page say so. A VM moved outside the panel keeps it.
The API shows the flag read-only.
2026-11-19 22:00:25 +03:00
catborise
72a2e448d4 fix: the user list, a user's VMs and the SSH keys come in name order
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.
2026-11-19 14:31:59 +03:00
catborise
65b8110464 fix(tags): fourth audit: stale tag forms, rename after delete, stale filter
- 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.
2026-11-19 07:53:14 +03:00
catborise
b74e798e70 fix(tags): second audit: unchanged saves, report, other lists, hosts list
- 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.
2026-11-18 23:15:34 +03:00
catborise
45225df1a4 fix(tags): audit: races, a taken name, case
- 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.
2026-11-18 22:47:18 +03:00
catborise
904dd860d0 feat: tag badges choose the tag, untagged rows, counts in the tag list
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.
2026-11-18 22:08:02 +03:00
catborise
11b447f681 feat: filter the VM and host lists by 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.
2026-11-18 20:34:01 +03:00
catborise
149530f8df feat: tags for VMs and hosts
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.
2026-11-18 20:20:52 +03:00
catborise
8e0a84a3bd fix(vmbackups): full audit: backup volumes attached, ended creates, refusals
- 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.
2026-11-18 14:30:51 +03:00
catborise
012eba0c80 fix(instances): a host in maintenance offers no new VM from its VM list
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.
2026-11-17 23:07:45 +03:00
catborise
43d25a2759 feat(vmbackups): the Backups tab and restore pages for VM owners
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.
2026-11-17 19:40:33 +03:00
catborise
f4559acbc7 feat(vmbackups): back up a running or shut-off VM into a target
A superuser backs a VM up from its new Backups tab, or with POST
/api/v1/backups/ (202 with the job); GET lists and reads backups. The
backup.create job holds the VM, its compute (shared) and the target, so
migrations, snapshots and power changes of the VM wait meanwhile.

- A shut-off VM's disks are copied one at a time into the target pool,
  flat, in their format (createXMLFrom); a cancel stops before the next.
- A running or paused VM's disks go by libvirt's push backup into
  volumes made first, as the live clone: the file systems frozen for its
  start when the guest agent answers (frozen), crash-consistent
  otherwise, or refused when frozen file systems are required. A guest
  that shuts down meanwhile does not end the backup.
- A running VM's NVRAM file is kept only when it reads the same after
  the copy as before it (three reads), so it is the capture point's.
- Then the NVRAM file, the definition and the manifest (written last)
  are uploaded and read back, and the row becomes ready with its files.
- Recovery thaws a frozen guest first, watches a push backup still
  running, finishes a copied backup, removes the files of a failed or
  cancelled one, and leaves a copy whose end libvirt cannot tell
  uncertain with its files named. The target pool is checked by UUID and
  its free space before anything is made.
2026-11-17 09:13:59 +03:00
catborise
a03f12aa5b fix(computes): maintenance read at the moment of the action; autostart named and refused
An audit of host maintenance found:
- refuse_start and refuse_new_vms trusted the compute as the page or job had
  read it: a clone started after its host went in maintenance during the disk
  copy, and a power-on raced the switch while host devices were checked. They
  now read the state from the database, and power-on checks right before the
  start; a VM defined from XML is refused as well.
- libvirt starts autostart VMs itself when the host boots. Autostart cannot
  be turned on for a VM of a host in maintenance, and the host page names the
  VMs that would start, so that their autostart is turned off before a reboot.
- The New VM dialog said "In maintenance" for a host whose maintenance was
  only requested: it now says "Maintenance".
- Tests now cover the owner's power-on, the revert job and a stale compute.
2026-11-16 22:53:42 +03:00
catborise
d96fe940e9 feat(computes): putting a host in maintenance migrates its VMs; ready once none runs
A host was put in maintenance with its VMs still on it, and emptying it was
a separate step. "Put in maintenance" on a host with VMs that run now opens
Bulk Migrate, whose button migrates the chosen VMs and puts the host in
maintenance in one transaction: with the job admitted, or not at all; a
form sent again finds its job and does not put back a host taken out of
maintenance since. The page also puts it in maintenance without migrating,
for VMs that cannot move or when no host can take them.

Maintenance is not refused while VMs run: it must be on before they move,
or a new VM or Balance could take their place. The host shows instead
whether it is ready: "Maintenance requested" while VMs other than shut-off
ones remain on it (or it cannot be read), with its bulk migration's state;
"In maintenance" once none does. None of its VMs starts or resumes there
meanwhile. Ending maintenance during the bulk migration lets it go on.
2026-11-16 17:04:06 +03:00
catborise
22362de068 feat(computes): a host in maintenance takes no new VM or migration
After a host was emptied with Bulk Migrate for its maintenance, Balance
proposed moving VMs back onto it, and new VMs and migrations could still be
sent there. A superuser now puts a host in maintenance on its page (and
takes it out), each change audited; the form names the state it sets, so a
second page sent meanwhile does not turn it back.

A host in maintenance (Compute.maintenance, refuse_new_vms):
- takes no migration: migration_target refuses it, so the Migrate tab,
  Bulk Migrate, Balance and queued migrate jobs follow one rule; Bulk
  Migrate leaves it out of its destinations and its spread;
- takes no new VM: the create and clone jobs refuse it when asked for and
  again before they start (the REST API submits the same jobs); the create
  pages and the XML define send the user back to the VM list, and the New VM
  dialog lists it without a link;
- is left out of Balance: its VMs neither count nor move, and the Balance
  job refuses a move from it too, before each migration starts.
Its VMs run on; a migration already started finishes. The Computes page and
the host's page show that it is in maintenance.
2026-11-16 15:56:01 +03:00
catborise
ee662618b2 refactor(instances): the VM page and new VM steps name what their templates get
The VM page and the two new VM steps rendered locals(): every local of
the view reached the template, so which values a page uses could not be
read from the view, and a renamed variable left part of a page blank
without an error. Each view now passes a dict of the names its template
reads. The assignments that only existed for locals() (conn = None,
empty storage and network lists, meta_prealloc, unused defaults) are
gone. A new VM step whose host could not be read shows what it showed
before.
2026-11-14 14:14:23 +03:00
catborise
d6df6b1df4 fix(instances): console changes that cannot be made are refused, not reported as done
A switch to the serial console removed the graphics device but kept a
serial console of another type, a TCP one say, which the browser does
not open; the audit log said the console type was set. The switch is now
refused, with nothing changed, unless the serial console is a pty one.

A listen address change of a console that listens on a network, a socket
or nowhere did nothing without a word. It is refused with the reason.

The .vv file pointed virt-viewer at "::" for a console on all IPv6
addresses; such a console is reached through the host, as one on
0.0.0.0.
2026-11-13 22:49:28 +03:00
catborise
88e7e0fa90 fix(instances): a console settings page opened before another change does not undo it
The console form compared what was posted with the settings saved at the
time of the save, so every field of a page opened earlier counted as a
change: an administrator who moved a console to localhost had it opened
to all interfaces again when another one, on an older page, only
generated a new password. The form now sends back a fingerprint of the
type, listen address and keymap it showed, and a save made after these
changed is refused with a message to check them and save again.

A refused save names the reasons without the field names.
2026-11-13 22:49:23 +03:00
catborise
cd3edf4dff fix(instances): a VNC password the browser console can send, kept as set
The console settings accepted any password of at most 8 bytes, so "éééé"
was saved, but noVNC derives its key from the characters while QEMU
compares the UTF-8 bytes: the browser console could not log in. A new
password now takes up to 8 printable ASCII characters, which also keeps
control characters out of the definition.

The .vv file wrote the password and the VM name as they are; virt-viewer
reads it as a GLib key file, so a backslash or a leading space changed
the password. Both are escaped as a key file expects.

A new or removed password also drops a passwdValidTo set elsewhere: an
expired one left the new password unusable.
2026-11-13 22:49:12 +03:00
catborise
a998e68757 fix(instances): one guest's bad address no longer ends a search or the VM report
The IP search and the VM report parse each address a guest agent
reports. An agent answer that was no address ("invalid-address") raised
a ValueError that only libvirt errors were caught around: the search or
the report ended in a 500 and lost every other guest's addresses. Such
an answer is now skipped, and the guest's other addresses still count.

The VM report was in English in every language but for the VM states:
its headings, sheet names, coverage notes and yes/no now follow the
reader's language.
2026-11-13 16:07:12 +03:00
catborise
cf1f7ad055 fix(instances): a host that does not answer no longer holds the VM lists
The VM list and its poll read each host in turn. A host that is up but
stuck (a daemon or an NFS mount that does not answer) kept the call
waiting: the list did not open in 200 s (seen live with compute1's
virtqemud stopped), and the per-host limit freed it only when gunicorn
ended the request after 600 s. The list and the poll now ask all hosts
at once, each in a thread counted on its host like a request, and wait
10 s at most: a host that has not answered is shown as not answering,
and the VMs of the others are listed. Live: the list opens in 10 s,
then in 5 s while the host stays stuck.
2026-11-13 16:07:01 +03:00
catborise
8263680c48 fix(appsettings): a number an older version saved no longer breaks its page
The Settings page refuses a whole-number setting outside its range, but
a value an older version saved stays: LOGS_PER_PAGE "abc" made the Logs
page fail with a 500 (seen live). Migration 0026 puts every
whole-number setting outside its range, or not a number, back to its
default.

With VM DRBD Status on, the VM list showed each VM's state as its VM
page last read it, and "None" for a VM never opened. The list now reads
each SSH host's drbdadm status once, all hosts at once, and updates its
VMs from it: a host that does not answer delays the list by one
timeout, not one per host.
2026-11-13 13:58:57 +03:00
catborise
b664e34161 fix(nwfilters): two changes at once do not undo each other
A rule or reference change reads a filter and defines it again whole:
two admins changing one filter at once each defined their copy, and the
second removed the first's rule. Changes to a host's filters (create,
clone, delete, rules, references, XML) now run one at a time; one that
finds another running is told to try again.

A VM's NIC form sends back its source, model, filter and MAC whole: a
form opened before another admin changed the NIC's filter put the old
filter back. The form now sends a fingerprint of the NIC as it showed
it, and a NIC changed meanwhile is refused.
2026-11-13 11:46:01 +03:00
catborise
143a74b145 fix(storages): a volume another compute's VM uses on shared storage is not deleted
A pool on shared storage (an NFS share, or a directory mounted from one)
holds the same file at the same path on every host that mounts it. A
VM's delete checks the panel's other computes before it deletes its disk
files, but the pool page, its API and a VM's disk delete checked only
their own host: a disk of a VM on another compute could be deleted. They
now ask the other computes too, and refuse while one uses the file or
cannot be reached. The other computes are asked before this host's lock
is taken, and before a VM's disk is detached.
2026-11-13 10:41:18 +03:00
catborise
3412c63417 fix(instances): a Windows VM's root password and SSH key are refused in words
On a running Windows VM with its guest agent connected, the Access tab's
root password and SSH key were sent to the agent, which has no root
account, takes no crypt(3) hash and has no SSH key command: the owner got
the agent's raw error. The guest's OS is now asked first, and a Windows
guest is refused with a message.
2026-11-13 08:43:50 +03:00
catborise
87f7100fc9 fix(instances): the root password and SSH key a setting turns off are refused
Settings > "Show Root Password" and "Show SSH Keys" hid their forms on
the Access tab, but an owner who may change the VM could still post to
them and reset its root password or install a key. Both are now refused
while their setting is off.

A password longer than 4096 characters or with a NUL character, which
passlib does not hash, ended in a 500; it is now refused with a message.
2026-11-13 08:19:13 +03:00
catborise
8e990e7d1a fix(instances): a disk resize form grows the disk it showed
The Resize tab named a disk by its device only. When an administrator
replaced the disk at vda while an owner had the tab open, the owner's
new size grew the replacement. The form now sends a fingerprint of
each disk's file (not the file itself, which an owner is not shown),
and a disk changed meanwhile is refused.
2026-11-12 22:09:34 +03:00
catborise
2ab1bac0c7 fix(instances): a power on or delete option the form never sends is refused in words
A hand-made Power On or Delete request with an option that is not true
or false (fresh=garbage, delete_disk=garbage) raised the API
serializer's validation error inside the page's view: a server error.
The page now says which options are invalid and goes back; the API
still answers 400.
2026-11-12 16:40:58 +03:00
catborise
159049736d fix(instances): a VM of an architecture without firmware choices or PCI cards can be created
The create page shows no firmware choice for an architecture whose host
offers none, yet the form required one, so such a VM could never be
created from the page. The firmware is now optional there: the machine's
own is used, as the job and the API already did.

s390x machines have no PCI bus for the emulated network cards (e1000,
e1000e, rtl8139), yet the create page and the VM's network tab offered
them for every architecture. They now offer default and virtio there,
and a create job refuses a card model the VM's architecture cannot have.
2026-11-12 15:21:48 +03:00
catborise
2db25314ea fix(instances): USB device changes as PCI ones; device refusals name no VM to owners
- A USB device added to or removed from a VM with a saved state applied
  only at the next cold boot: refused now, as for PCI devices, and the
  form says so.
- A USB hot plug or removal that failed half way said only libvirt's
  error: it now says where the device is, as for PCI devices
  (_hostdev_outcome, shared).
- A host device refusal (check_hostdevs) names the other VMs that have
  the device; users who do not see the hosts, such as an owner whose
  snapshot revert is refused, now read that a device is not free and that
  an administrator can see why.
- The host's USB devices named among a PCI device's host resources were
  English in every language.
2026-11-11 22:58:40 +03:00
catborise
d07362106a fix(instances): the XML editor and a VM defined from XML check its host devices
The Host devices tab checks a device before it gives it: no other VM has
it, the host does not use it, its IOMMU group can go along. The XML editor
and the define-from-XML form saved any <hostdev> unchecked. Both now run
the same check (check_hostdevs) on the definition saved, the editor when
the XML gives or changes host devices, so an edit of a VM whose device the
host lost since is not stopped. The editor holds the whole compute, as
the tab does, so two edits cannot give one device to two VMs.
2026-11-11 22:58:34 +03:00
catborise
a36ffcd3ba fix(instances): a VM starts only with host devices the host can give now
A device is checked when it is given to a VM, but a start later did not
check it again: a PCI device bound back to a host driver for the host's
own network or disks, or a USB device the host no longer has as named,
was taken from the host or failed in libvirt. Power On and Power Cycle now
check the definition the VM starts from (its saved state's when restored)
as a snapshot revert does, and refuse with the reasons; Power Cycle checks
before it stops the VM.
2026-11-11 22:58:34 +03:00
catborise
4045819b8d fix(instances): the Host devices tab says when the host cannot give a VM's USB device
libvirt does not start a VM whose USB device the host does not have as the
definition names it: a device replugged gets another address, and a second
device of a model makes a model-only name ambiguous. The tab said nothing
and the start failed with libvirt's words. The tab's form now says which
device the next start cannot have and what to do (usb_unmatched), and a
snapshot revert checks the same before it starts (check_hostdevs). The
add form posts the device's IDs with its address: a device replugged since
the page was loaded is not given in its place.
2026-11-11 22:58:34 +03:00
catborise
52bb6487a3 fix(instances): a VM list notices a change made while the page was read
The VM lists took the poll's first answer as what the page showed: a VM
started or stopped between the page's read and that answer kept its old
state and buttons until the next change. The page now carries the states
read before its rows, and the poll compares its first answer with them.
2026-11-11 15:17:59 +03:00
catborise
b7354df4f6 fix(instances): a failed power cycle says the VM stays off; templates have no autostart
Power Cycle forced the VM off and, when the start failed, showed only
libvirt's error: the page now also says the VM was forced off and stays
off, and the audit row says so. A template kept the autostart it had as a
VM, so the host started it although the panel refuses to: marking a
template turns autostart off, and autostart is refused on a template. The
autostart switch is disabled, with the reason, on a template and on a VM
that exists only while it runs (libvirt refuses autostart there).
2026-11-11 15:17:59 +03:00
catborise
dba2c2b1c2 fix(instances): a VM with a saved state says so and can start without it
A VM with a managed save image showed as plain Off; Power On restored the
saved memory and the panel had no way to boot it fresh or drop the saved
state. The power tab now says the VM has a saved state and offers Start
Without Saved State (confirmed), which boots it with
VIR_DOMAIN_START_FORCE_BOOT and so discards the image. Owners get it as
they get Power On; the audit row names it.
2026-11-11 15:17:59 +03:00
catborise
1957a5a85a fix(instances): memory, boot order and QoS edits check what they change first
Three edits went wrong on input or a state made outside the panel:

- A running VM's memory was set live, then for its next start. When the
  next start had a lower maximum (virsh --config), the live change was
  made and the second one failed. The maximum of the next start is now
  checked first.
- A boot order entry without its device type ("disk") raised an error
  page. It is now refused with a message.
- A QoS form of a NIC whose MAC changed since redefined the VM unchanged
  and said the QoS was set or deleted. It now says the NIC is not in the
  definition.

Turkish and Chinese texts included.
2026-11-11 12:55:34 +03:00
catborise
ad9c3ad99c fix(instances): a disk form loaded before the disk changed changes nothing
The Edit, Detach and Delete forms of a VM's disk name it by its device:
the view acted on whatever disk had that device by then. A form loaded
before a disk move, an external snapshot or another tab's change wrote the
old path back over the new one (the VM then starts from an old or deleted
file), or detached and deleted the volume that replaced it.

The forms already send the path they show. The views now refuse a disk
whose path is not that one, and tell the user to reload the page. Turkish
and Chinese texts included.
2026-11-11 12:55:34 +03:00
catborise
897c95a5bf fix(instances): a VM's saved state keeps the disks it starts with
A VM with a saved state (managed save, as libvirt-guests leaves VMs when
its host shuts down) shows as shut off, and its start restores the
definition it was saved with. The panel let the VM's Delete remove a disk
of it, and the storage pool delete a volume detached since: the VM then
did not start ("Cannot access storage file"), and the panel has no way to
drop the saved state.

A VM's Delete now refuses a disk while the VM has a saved state, and a
volume in a domain's saved state is in use for every delete check.
2026-11-11 12:55:34 +03:00
catborise
c968930b08 fix(instances): the Secure Boot machine type warning is in the user's language
A new VM with UEFI Secure Boot on a machine type other than q35 is made
on q35, and the create page says so. That warning was an English-only
string; it is now a translated message, with Turkish and Chinese texts.
2026-11-11 10:30:54 +03:00
catborise
cdd724a19d fix(instances): the VM page's DRBD state does not rewrite the VM's record
With VM DRBD Status on, the VM page saved the whole record it had read
after waiting up to its ssh timeout for the host. A migration or delete
that finished meanwhile was undone: the record moved back to the old
compute, or came back without its owners. Only the DRBD state is written.
2026-11-10 13:19:39 +03:00
catborise
d06d4f90bb fix(ui): host and VM charts give their points the panel's time
A host's charts and their "Updated at" line took their times from
timezone.now(), which is UTC, while a VM's charts took time.strftime(),
the panel's time zone. With TIME_ZONE=Europe/Istanbul the same moment
read 09:00 on the host page and 12:00 on the VM page. Both now give the
panel's time.
2026-11-10 11:57:43 +03:00