32 Commits
Author SHA1 Message Date
dualfroz a12961aa02 Describe this repository 2026-10-22 21:06:21 +02:00
dualfroz 429ce91253 partially fix #4012: ui: migrate: mention snapshots referencing a local CD/DVD
When a VM has no local CD/DVD attached anymore, but one of its
snapshots still references it, the migrate window only shows:

  Cannot migrate VM with local CD/DVD

which does not tell where the CD/DVD is coming from, since it is not
visible in the current configuration of the VM.

The migration precondition API already returns the 'is_attached' and
'referenced_in_snapshot' attributes for each local disk. Use them to
mention the volume and the snapshots referencing it in that case, and
that removing these snapshots allows migration. This matches the hint
in the migration task log since qemu-server commit a4efa5f9ad2a
("partially fix #4012: migrate: mention snapshots referencing a local
ISO image"). The plain message is kept if the CD/DVD is still
attached, like in the backend.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-11 18:58:11 +02:00
dualfroz e6a220f2b1 fix #4986: jobs: do not get stuck if the task log is missing
When the scheduler checks whether the last run of a job has finished,
it dies if the task log of that run does not exist. The job is then
skipped with 'could not update job state, skipping - no such task' on
every iteration, so it never runs again until its state file is
cleaned up manually.

The task log can be gone, for example after a crash. If the task is
not running anymore, treat it as stopped with an error status instead,
so that the job gets scheduled again, like Proxmox Backup Server does
since commit 48fbce07 ("fix #4895: scheduled jobs: ignore task-log not
found error").

The check now comes after the one whether the task is still running,
so a running task does not get marked as stopped.

Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20261003153820.7-1-me@dualfroz.com
[FE: use file_exists()
     issue warning]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2026-10-06 14:13:35 +02:00
dualfroz 8a2a44a473 fix #7178: pve8to9: detect qcow2 TPM state volumes containing raw data
Before qemu-server 8.3.3, cloning a VM template with a raw TPM state on
a directory storage as linked clone created a qcow2 overlay for it.
swtpm_setup used that file as raw TPM state and, as it found no valid
state in it, overwrote it with a new one, turning it into a raw file
with a qcow2 name.

With Proxmox VE 9, the TPM state is attached with the format of the
volume name, so such a VM fails to start with 'Image is not in qcow2
format'. Since qemu-server 8.3.3, it also fails to start on Proxmox VE
8, as swtpm only accepts raw volumes there, but the VM might not have
been started since then.

Check the TPM state volumes of all VMs that are named as qcow2 and on
a file based storage for the qcow2 magic, and warn about those that do
not have it, with how to fix them, as described in the bug report.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 03:33:56 +02:00
dualfroz f1c3f66086 fix #5871: ui: resize disk: show current and new size
The resize dialogs of VMs and containers only ask for the size
increment, so users have to look up the current size of the disk in
the config to know which size the disk will have afterwards.

Load the config of the guest in the dialogs and show the current size
of the disk, and the size it will have with the entered increment,
which gets updated while typing. As the dialogs load the size
themselves, callers do not need to change.

The size of the config is in the 'disk-size' format, where the units
are binary, while Proxmox.Utils.parse_size_unit() takes 'G' as GB, so
add a small parser for it, like parse_size() of PVE::JSONSchema.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 03:28:43 +02:00
dualfroz 2564208ca8 fix #5997: metrics: influxdb: fall back to the ready endpoint in connection test
The connection test for InfluxDB over HTTP(S) queries the '/health'
endpoint. The InfluxDB v2 listener of Telegraf only has it since
version 1.36, older versions only provide '/api/v2/ready'. So adding
such a listener as metric server fails with '404 Not Found', although
writing metrics to it would work.

If '/health' is not found, query '/api/v2/ready' instead. Other errors,
like an invalid token, are still reported right away.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 03:24:10 +02:00
dualfroz dca2398378 fix #7649: ui: active directory realm: expose user attribute name option
AD realms support the 'user_attr' option, which sets the attribute used
as username when syncing users, but it can only be set via the CLI. It
is needed for logging in with the user principal name, if that does not
end with the AD domain: with 'userPrincipalName' as attribute, the users
are synced with their full user principal name, which is then used as
is to bind to the server on login.

Add a field for it, like the LDAP realm has, with the 'sAMAccountName'
default as empty text.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 03:22:46 +02:00
dualfroz 678da1b8ed fix #5412: ui: backup now: add fleecing option
Fleecing can be enabled for backup jobs, but not for a manual backup
via 'Backup now', where only a default in the node's vzdump.conf
applies. So a VM that needs fleecing to not stall during the backup can
not be backed up safely from the UI without changing that default.

Add the 'Fleecing' and 'Fleecing Storage' fields of the backup job
editor, for VMs only, as fleecing is not used for containers. Like
there, the storage is required if fleecing is enabled, so the 'Backup'
button stays disabled until one is selected. The fields start with the
node's defaults.

Only send the fleecing option if it was changed. The API checks for
'Datastore.AllocateSpace' on the fleecing storage of the option, but
not on the one of the node's default, so always sending it would make
manual backups fail for users without that permission on nodes with
fleecing enabled by default.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 03:19:01 +02:00
dualfroz cb9884615b fix #6330: ui: vm wizard: use a bigger default disk size for windows 11
The create wizard proposes a 32 GiB disk for every guest OS. That is
too small for Windows 11, whose setup refuses to install to it. The
reporter found that the 24H2 setup needs at least 53 GB, and Microsoft
documents 64 GB as the minimum storage requirement for Windows 11.

Add the disk size to the OS defaults, 64 for the 'win11' OS type and 32
like before for all others, and set it on the disk when the OS type is
selected, like the bus type. As with the bus type, this is only done if
there is a single disk.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 03:10:15 +02:00
dualfroz 926a1ad594 fix #6060: ui: node status: use a clearer label for the root disk usage
The usage of the root file system is shown as '/ HD space'. Users not
familiar with Linux may not read the '/' as the root file system, but
as a separator, which is even less clear with a screen reader.

Label it 'Root Disk usage' instead. This matches the other usage fields
of the panel, like 'RAM usage' and 'SWAP usage', and is the label the
Proxmox Backup Server status uses for the same value, so the string is
already translated in all languages.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 03:06:59 +02:00
dualfroz 4d1944f2de ui: qemu pci edit: remove the default PCI domain again before saving
The PCI selector shows the IDs of the devices including the domain, so
the default '0000' domain was removed again before saving, as it is
optional in the hostpci option.

Since the refactoring in commit a7ec3666 ("ui: qemu/PCI Edit: code
cleanup/refactoring/modernize"), the result of the replace call is not
assigned anymore, so the domain is kept and a device that was
configured as '01:00.0' gets saved as '0000:01:00.0' on any edit of
the passthrough device.

Assign the result again, so the domain is only kept if it is not the
default one, like before.

Fixes: a7ec3666 ("ui: qemu/PCI Edit: code cleanup/refactoring/modernize")
Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:27:45 +02:00
dualfroz d8f02f4336 fix #4588: ui: acme: allow setting the alias of DNS domains
Domains validated with the DNS challenge can have an alias, so that the
challenge record is created on another domain, which the
'_acme-challenge' record of the domain points to with a CNAME. This is
useful if the DNS plugin should not be able to update the zone of the
domain itself.

But the alias could only be set on the CLI, as the edit window only
kept an existing one in a hidden field. Show it as a text field for
domains with the DNS challenge type, like the plugin.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:25:27 +02:00
dualfroz ed1aaf0bef fix #5352: ui: sdn: status: make the list scrollable
The status grid is the only item of a vbox layout, but has no flex set.
So it gets as high as all its rows need, and if those do not fit on the
screen, the rest is cut off without any way to scroll to them.

Let the grid fill the available height, so it shows a scrollbar
instead.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:19:56 +02:00
dualfroz eb9893f378 fix #7684: ui: backup job detail: allow sorting guests by inclusion status
The 'Backup Job' column of the job detail tree only has a value for the
volumes, not for the guests. So sorting by it only sorted the volumes
within each guest, while the guests themselves stayed in their order,
which made it look like sorting by that column did nothing.

Set the share of included volumes on the guests too, and show it as
'Yes' if all, 'No' if none and 'Mixed' if only some of the volumes of
a guest are included. This way, guests with excluded volumes end up at
the top or bottom of the list when sorting by that column.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:18:09 +02:00
dualfroz 723bba9164 fix #5725: pvenode: acme: add options for external account binding
The credentials for external account binding can only be entered
interactively when registering an ACME account with pvenode, and only
if the CA requires them or a custom directory was selected. So they
cannot be passed when the account is registered from a script, or
when the directory is passed with --directory and the CA does not
announce that it requires them.

Add the --eab-kid and --eab-hmac-key options, which the API endpoint
already supports, and only ask for the credentials if they were not
passed.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:15:47 +02:00
dualfroz bddd179228 fix #5990: vzdump: notes template: add pool variable
Backups of guests from different teams or users often end up on the
same storage, and the resource pool of the guest is a common way to
tell them apart. But the pool is not part of the backup, and the VMID
alone is not enough to find out later where a backup came from, as
VMIDs can be reused.

Add a {{pool}} variable to the notes template, which is replaced with
the resource pool the guest is a member of at the time of the backup,
or with an empty string if it is not in any pool, and list it in the
hint of the backup dialogs.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:13:05 +02:00
dualfroz 5537758fe8 fix #6560: metrics: influxdb: do not send storage type as field too
The type of a storage is sent as a tag, but it is also part of the
storage status data and so sent as a field with the same name.
InfluxDB 3 does not allow this and rejects the whole write with:

 'type' is used as both a tag and a field

so no storage metrics end up in the database.

Exclude the type from the fields, like it is already done for the
VMID of guests since commit 456be471 ("fix #3440: influxdb: remove
duplicate vmid tag").

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:09:40 +02:00
dualfroz 4be32c6b82 fix #4986: jobs: do not get stuck if the task log is missing
When the scheduler checks whether the last run of a job has finished,
it dies if the task log of that run does not exist. The job is then
skipped with 'could not update job state, skipping - no such task' on
every iteration, so it never runs again until its state file is
cleaned up manually.

The task log can be gone, for example after a crash. If the task is
not running anymore, treat it as stopped with an error status instead,
so that the job gets scheduled again, like Proxmox Backup Server does
since commit 48fbce07 ("fix #4895: scheduled jobs: ignore task-log not
found error").

The check now comes after the one whether the task is still running,
so a running task does not get marked as stopped.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 01:07:38 +02:00
dualfroz d0dbabcade fix #8098: ui: ceph: osd: sort by name naturally
Sorting the OSD tree by the name column compared the names as plain
strings, so 'osd.10' and 'osd.11' ended up before 'osd.8' and 'osd.9',
and the same happened for host names like 'pve10' and 'pve2'.

Add a sorter to the name column that compares numbers in the names by
their value, like it is already done for the storage content view.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-02 16:44:49 +02:00
dualfroz 198fee27a6 fix #6009: ui: drop the 128 TiB limit for disk sizes
The size fields for creating and resizing disks of VMs and mount points
of containers only accepted up to 128 TiB. The API does not have such a
limit, so larger disks could only be created or resized on the CLI.

Remove the limit from the size fields, like it was done for the memory
fields in commit fdce7d56 ("Remove swap/memory limit in the Manager,
fixes #1799").

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-02 16:40:54 +02:00
dualfroz 7ed7d7cdb0 fix #5798: ui: qemu pci edit: fix warning for shared IOMMU groups
When selecting a raw PCI device, a warning should be shown if the device
is not in a separate IOMMU group. To not count the other functions of
the selected device itself, the check only compares the bus and device
part of the PCI IDs, by taking their first five characters.

But since the PCI selector also shows the domain, for example
'0000:01:00.0', the first five characters are just the domain. So all
devices of the same domain were treated as functions of the selected
device and the warning was never shown.

Compare everything before the function instead, so the domain, bus and
device, like the IOMMU check in the PCI mapping editor does.

Fixes: f36240c5 ("gui: pci passthrough: consider domain in PCISelector")
Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-02 16:39:29 +02:00
dualfroz baf8bb7941 fix #7108: ui: ipset: do not offer aliases that are already added
When adding an entry to an IPSet, the alias selector lists all aliases,
including those that are already part of the IPSet. Selecting one of
them only results in an "already exists" error from the API.

Pass the current entries of the IPSet to the add window and filter the
matching aliases out of the selector. Aliases are stored in the IPSet
with the same scoped reference the selector uses as value, so an exact
comparison is sufficient.

Signed-off-by: Michal Fox <me@dualfroz.com>
Reviewed-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
Tested-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
Link: https://lore.proxmox.com/20260929142331.2990690-1-me@dualfroz.com
2026-09-30 12:19:59 +02:00
dualfroz 91a785703f fix #5608: ui: resource mappings: validate the name like the API does
The API only accepts resource mapping IDs in the 'pve-configid' format,
but the name field of the PCI, USB and directory mapping windows takes
any value. A name like 'gpu@node1' is thus only rejected after
submitting, with a generic "invalid configuration ID" error that does
not tell which characters are allowed.

Use the existing 'ConfigId' vtype, so the field is marked invalid right
away and its tooltip lists the allowed characters.

Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929141313.2873638-1-me@dualfroz.com
2026-09-30 11:44:39 +02:00
dualfroz 11c2368e04 fix #8015: ui: download url: let the user choose the .img image format
Like for the upload, '.raw' was appended to the name of '.img' images
downloaded as import content, which breaks importing images in other
formats, such as the qcow2 based Ubuntu cloud images.

After querying the URL of such an image, show a format selector and
append the extension of the selected format to the file name instead.

Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929135840.2748665-3-me@dualfroz.com
2026-09-30 11:39:38 +02:00
dualfroz baaeedd60a fix #8015: ui: upload: let the user choose the .img image format
When uploading a '.img' file as import content, '.raw' is appended to
the file name, so the image is always treated as a raw image. But the
'.img' extension is also commonly used for other formats, for example
the Ubuntu cloud images are qcow2 images. Such an image is then
imported as raw disk, which results in a disk with the size of the
qcow2 file and a guest that does not boot.

The format cannot be derived from the '.img' extension, so show a
format selector for such files and only append the extension of the
selected format to the file name. The upload stays disabled until a
format is selected, so the choice is always an explicit one.

Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929135840.2748665-2-me@dualfroz.com
2026-09-30 11:39:38 +02:00
dualfroz f353e94052 fix #6475: ui: upload: only show the file name of the selected file
For privacy reasons, browsers do not expose the real path of a selected
file and prefix its name with 'C:\fakepath\' instead, on every
platform. The file field of the upload window shows this value as is,
which confuses users on Linux or macOS clients.

Show the name of the selected file object instead. Only the displayed
value changes, the upload itself uses the file object and is not
affected.

Signed-off-by: Michal Fox <me@dualfroz.com>
Reviewed-by: Max R. Carrara <m.carrara@proxmox.com>
Tested-by: Max R. Carrara <m.carrara@proxmox.com>
Link: https://lore.proxmox.com/20260926084935.7-1-me@dualfroz.com
2026-09-30 11:27:01 +02:00
dualfroz 4dfc7eb30c fix #6516: api: backup jobs: limit the job ID length on creation
All backup job API calls that take an existing job ID use the
'pve-backup-jobid' option, which is limited to 50 characters. The
create call uses its own 'id' parameter without that limit, so a longer
ID can be created, but the job can then neither be read, updated nor
deleted through the API or the web UI, and has to be removed from
jobs.cfg by hand.

Apply the same limit when creating the job.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 11:31:04 +02:00
dualfroz 7143720659 fix #6516: ui: backup job: limit the job ID length
The API only allows backup job IDs of up to 50 characters, so mark
longer values as invalid in the edit window already, instead of failing
on submit.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 11:31:04 +02:00
dualfroz d033dfa51b fix #7623: ui: backup: only list guests of the selected pool
The guest list in the backup job editor filters the resource store by
the selected pool. With a plain string value, ExtJS matches any pool
that starts with it, ignoring case, so selecting 'Clients' also listed
the guests of 'Clients/Client1', 'Clients/Client2' and 'clients'.

The job itself only backs up the guests of the selected pool, so the
editor suggested that guests are covered which are not.

Match the pool id exactly and case-sensitively.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 10:04:45 +02:00
dualfroz 85bc6aeedb fix #6874: ui: node selectors: sort memory usage by percentage
The memory usage column of the node selector, used e.g. in the
migration dialog, and of the HA node priority selector shows a
percentage, but uses the raw 'mem' bytes as data index. Sorting by that
column thus sorts by used bytes, which does not match the displayed
values as soon as the nodes have a different amount of memory.

Add a calculated 'memuse' field, like the resource store already has,
and use it for the column. This also makes the percentage renderer
receive a ratio here, like everywhere else, which allows dropping its
bytes fallback in a follow-up.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 07:15:08 +02:00
dualfroz c09a3d7d49 fix #7860: api: backup info: skip jobs with invalid guest selection
A backup job in pool mode keeps referencing its pool after the pool got
deleted. Resolving the guests of such a job dies with "pool '<name>'
does not exist", and since get_included_vmids() did not catch this, the
whole /cluster/backup-info/not-backed-up call failed. The GUI then hides
the "Show guests without backup job" button, so users lose exactly the
overview that would tell them some guests are no longer backed up.

Catch the error per job, warn about it and continue with the remaining
jobs. The broken job does not back up anything, so its guests correctly
show up as not covered by any backup job.

Add a test for get_included_vmids() covering this case.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 07:15:08 +02:00
dualfroz 0e587291d6 fix #7224: ui: utils: show memory usage above 100% correctly
render_mem_usage_percent() treated any value above 1 as a byte count
and recalculated the percentage from 'mem' and 'maxmem'. But the memory
usage ratio of a guest can legitimately exceed 1, for example when the
reported usage is the host-side memory of the QEMU process, which
includes its own overhead. In the reported case, 'mem' was 2222472192
with a 'maxmem' of 2147483648, so the ratio of about 1.035 got taken as
bytes and the search and resource grids showed 0.0 % instead of 103.5 %.

All users of the renderer now pass the usage as a ratio, so drop the
bytes fallback and always render the value as percentage.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 07:15:08 +02:00