Commit Graph

7343 Commits

Author SHA1 Message Date
Dominik Csapak
2d0bf566ef ui: guest import: rework windows virtio-scsi preparation
instead of having a separate iso selector that shows with an enabled
checkbox, just add a CDROM drive when windows is selected and there is
no such drive available yet.
The idea here is that the VM's OS is already fully set up, so a single
CDROM drive is enough to be used for installing VirtIO drivers, unlike
the VM create case, where the first one is already used for the
installation medium.

Also, rename the 'map to sata' checkbox to 'prepare for virtio-scsi'
that also changes the scsi controller to virtio-scsi-single

Additionally, change the positioning of the checkbox/scsihw selector
to be below the disk grid
With that we then only disable prepare-for-virtio checkbox for
non-windows OS types, as the scsi controller on the right looks like
it hangs in the air without any field on the left otherwise.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: rework commit message, squash in some fixes ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
e7ff5c7c73 ui: guest import: style clean-ups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
b4f879fdfd ui: guest import: prevent accidental form field submission on second panel
by overwriting the onGetValues to always return nothing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
b6ff117554 ui: guest import: add checkbox for virtio drive
similar to what we have in the wizard.

in the case we cannot find a suitable slot (ide0/2, sata0-6), we
continue, but print a warning into the javascript log

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
31da365410 ui: iso selector: make labelWidth and Align configurable
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
8a0dd9d67b ui: guest import: add field for scsi controller
so that one can overwrite it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
d39e2492de ui: guest import: implement 'map-to-sata' checkbox
this is useful when wanting to change to virtioscsi for windows vms,
since we cannot have multiple different scsi controllers.

we assume here that all assigned sata disks/cds have a continuous range,
so sata0, sata1, etc. without any holes

with that assumption, we can use the maximum sata index and simply put
the scsi ones after that.

when there are too many disks to map correctly to sata, show a warning
with the disk id that contains a tooltip.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
163868e119 ui: guest import: fine-tune paddings and heights in advanced tab
To make the UI appear slightly less crowded

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
226f01cba8 ui: guest import: add value-dependent warning for live-import
Use a similar text than we do for the live-restore warning and make it
use the pmx-hint CSS class.

Note that the CSS class order is important here as ExtJS automatically
uses the last one in the list here to add a XYZ-default and XYZ-after
class, so if the hint one is the last in the string, then layout gets
broken.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
b185bbade5 ui: guest import: add text for guest-is-running warning
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
463b9b8219 ui: guest import: update text for cdrom-image-ignored warning
one can now override this already in the import UI's Advanced tab.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
a5e56799e7 ui: guest import: handle new disk api format
and render the size if we have it (for disks that make sense)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
c52eb4769c ui: guest import: add config tab
that shows the current config. Recalculates whenever one changes to its
tab

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
1c2c2f6943 ui: guest import: move live import checkbox into panel
From the footer-bar, so make it a bit more apparent, and also to add
the 'Experimental' text to it.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
11236006c8 ui: guest import: make window wider
so we have more space to show e.g. columns in the grids

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
b0eeb862e6 ui: guest import: rework to tab panels
instead of putting all options on a single panel, split into 'general'
and 'advanced'

we move all disk/cd/network related grids to the advanced tab, and
introduce a 'default storage' and 'default bridge' selector to the
general tab.

this way, one can import very quickly when the default are fine or
when only the storage/bridge should change, but can still set the
storage/bridges etc. very fine grained.

also we have the possibility to extend the window in the future with
more tabs.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
81c46efcd8 ui: guest import: network grid: allow selecting hardware type
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
27afd69862 ui: guest import: network grid: display 'auto' instead of nothing
when there is not mac address on the source side

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
3c3d007eca ui: guest import: sort grids by id
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
b7583d4581 ui: guest import: add cdrom grid
so that one can already select an iso from here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
4fb223f75e ui: guest import: add ostype selector
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
03d8d7d23a ui: esxi import: support rendering structured warnings
Render warnings as list to allowing one to better distinguish multiple
ones.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
bb3fa9def4 ui: add wizard to allow importing from ESXi attached as storage
Add a new 'import' panel for storages supporting the 'import'
content type that shows a list of configs to import.

When opening the wizard, we query the meta info from the new
import-metadata API endpoint, and pre-fill the fields and shows
potential warnings or things to watch out for, returned by the API.

For disks and networks we allow to select which one to use and which
storage/bridge to import to.

Additionally, users can opt-in to a live-import, where the VM is
immediately started and storage requests are fetched from the target
on demand while importing the rest in the background.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: some fixes, clean-ups and commit message rewording ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
57d552b506 ui: esxi storage edit: add checkbox for skipping certificate validation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
e5a30c6d9b ui: esxi storage edit: make user and password always editable
Those can change somewhat frequently, e.g., as part of credentials
rotation policies.

Keep the 'server' one for now as is, while it can make sense to change
that too, e.g., from IP to FQDN, it's currently uncommon for PVE to
allow that in the UI, if we should evaluate all storage types for such
things and for that we also should improve the re-mount/activate story
in the storage lib.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
ddbddff766 ui: allow adding the esxi storage type
also change the icon to 'fa-cloud-download', hide the 'unknown' status
in the tree, and hide the Summary info from the storage browser

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
3dd9c5c808 ui: content view: fix use of external static tbar declaration
when using a declarative `tbar` when instantiating a ContentView,
it is a reference and gets pushed into every time.

instead, copy the given tbar into a local variable and use that

this fixes an issue that we push the same components (e.g. search) into
the toolbar whenever we open a view with a new ContentView
(when using declarative tbar)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
1826922d49 ui: content view: use modern simplified object delcaration
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
62580ab8c9 ui: storage content view: allow to define handler for item double-click
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Thomas Lamprecht
60e01c6ac2 bump version to 8.1.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:13:30 +01:00
Thomas Lamprecht
385f48fb21 d/control: bump versioned dependency for libpve-access-control
to ensure the newly checked Sys.AccessNetwork privilege is available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 15:53:51 +01:00
Thomas Lamprecht
846defd88c ui: storage: enable download-url button with Sys.AccessNetwork capability
Now that the new Sys.AccessNetwork privilege got added to
access-control and the storage download and manager query API
endpoints, the UI should reflect that change and allow opening the
dialogue to download an image from URL also for the users that are
allowed to do so through the new privilege.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-02-28 15:53:28 +01:00
Thomas Lamprecht
6cf1a48d45 api: nodes: allow usage of query url metadata with Sys.AccessNetwork
This was restricted to Sys.Modify + Sys.Audit on the whole cluster to
ensure that only trusted users get access to a method that can scan
the (local) network from the POV of the Proxmox VE node, even if only
through HTTP HEAD requests.

Nowadays there's enough user interest [0] to warrant a separate access
privilege to cover such an use case, and while most of the requests
are for the download-url storage API endpoint, this method here is not
only a bit less powerful than the storage one, it's rather tied to the
latter anyway (e.g. for querying the metadata of a URL in the web UI
for name and size before downloading it to a storage).

For backwards compatibility keep the old check and add the new
privilege as alternative to fulfill the permission requirements of
that API endpoint.

[0]: https://bugzilla.proxmox.com/show_bug.cgi?id=5254

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-02-28 15:53:28 +01:00
Thomas Lamprecht
33b0c265ef appliance index: use upper case for constant like variables
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 14:28:09 +01:00
Thomas Lamprecht
c6611893f6 appliance index: warn if log rotation fails
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 14:27:19 +01:00
Fiona Ebner
11064d3263 appliance index: fix precedence in size check for log rotation
In Perl, > takes precedence over ||, see perldoc perlop, so currently
the check will trigger with any size.

Fixes: 805cae93 ("appliance index: rotate update log if bigger than 256 KiB")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-02-28 14:23:26 +01:00
Thomas Lamprecht
8e0b18ff3b ui: IP set: fix indentation and whitespace issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 14:23:17 +01:00
Thomas Lamprecht
4467a5d2f2 api: node status: document boot-info and current-kernel in return schema
I recently added the same info to PMG and added them to the return
schema, so copying them over here comes for free, and while far from
complete but better than nothing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-26 16:55:13 +01:00
Alexandre Derumier
591c2d7beb ui: qemu: bump max cores to 256 by socket
New AMD Epyc CPUs already supports 168 threads and QEMU 8.1 support
1024 cores with q35.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-20 13:45:30 +01:00
Thomas Lamprecht
805cae93fd appliance index: rotate update log if bigger than 256 KiB
50 KiB is really tiny and while this log file is not _that_ important,
spending a few KiB more to keep much older logs around is almost
always a win-win situation, now that root storage size is rather some
hundred GB in most setups.

Drop the unused size variable while touching this, which was the
actual thing that made me look closer here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-20 13:40:41 +01:00
Dominik Csapak
6e7cef4923 fix #5106: ui: ceph status: make column wrap the summary text on expand
with this the title is now completely visible when the column is
expanded, even if it's originally too narrow.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
 [TL: fix eslint warning for missing space after comma ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-19 14:54:51 +01:00
Fiona Ebner
7304254a76 ui: node: system: avoid using 'Syslog'
Reported in the community forum [0]. Since Proxmox VE 8/Debian 12,
rsyslog is not installed by default for new installations anymore [1].
The information gathered by the API call comes from the systemd
journal. While 'Syslog' could be interpreted as a shorthand for
"System Log", it's better to be explicit to avoid any confusion.

In addition, the systemd journal does much more than plain syslog
messages, as argued by Fabian [2].

[0]: https://forum.proxmox.com/threads/141631/post-634675
[1]: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#changes-to-system-logging
[2]: https://lists.proxmox.com/pipermail/pve-devel/2024-February/061765.html

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
 [TL: Mention and link to Fabian's argument ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-19 14:42:59 +01:00
Thomas Lamprecht
a74e269c82 build-sys: allow a multi-digit release number
future proofing at this point, but let's rather fix this already
before we forget...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-19 14:42:59 +01:00
Fabian Grünbichler
04ed3d1b9c ceph: config hash fallback style improvement
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-02-12 14:06:55 +01:00
Max Carrara
68b6c23956 ceph: fix edge case of wrong files being deleted on purge
Having a file named e.g. "60" in your current directory will cause it
to be deleted when executing `pveceph purge`. This commit fixes that
by making the config hash differ between which values represent file
paths and which don't.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
2024-02-12 14:05:08 +01:00
Alexander Zeidler
1e5f1bc8f1 pvesubscription: add missing return statement
to avoid a failing null check and its error message. This confused
users since the activation was successful anyway.

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-02-02 19:16:49 +01:00
Fiona Ebner
267dc2bdf9 ui: lvm: expose saferemove setting
It can be security-relevant in some environments. The LVM storage
documentation can be reached via the "Help" button and contains a few
more details.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-02-02 17:13:53 +01:00
Thomas Lamprecht
e1a0e868c7 ui: adapt to fix of Korean language code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-02 17:07:33 +01:00
Aaron Lauterer
8c260fdbc5 ui: storage: zfs: set blocksize placeholder to 16k
to reflect current ZFS defaults.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2024-02-01 13:38:12 +01:00
Lukas Wagner
374304dbab vzdump: make helper functions for sending notifications private
The helpers were split out from the original 'sendmail' function when
migrating to the new notification system. They are not needed anywhere
else and can thus be private.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-01-29 10:32:31 +01:00