Commit Graph

524 Commits

Author SHA1 Message Date
Dominik Csapak
00e4bd2e10 ui: qemu disk: honor iothread setting from config
To have a IOThread on by default in the wizard and on disk add, we
added a 'bind' for the value here. This also changes the value for
existing VM disks, and if one does not notice, modifies it away again
(since we don't have the controller here and isSCSISingle is false)

Simply don't bind value when we edit a VM disk from config

Note that this is only an issue in Chromium based browsers.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-21 15:51:40 +01:00
Dominik Csapak
1b48b8b7a1 ui: hide 'no tags' field and edit icon without VM.Config.Options
they cannot edit them anyway, so no point in showing them that
there is no tag

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-18 16:37:46 +01:00
Matthias Heiserer
8c3667927c ui: vm network edit: use the correct default model
commit c8f2cf4c1a broke the preselected
Model by setting it to ''. The GUI displays/selects an empty field
as default.

Fixes: c8f2cf4c ("ui: vm network: allow to override MTU for virtio devices")
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 12:55:11 +01:00
Thomas Lamprecht
ea7f41ed64 ui: vm vNIC: make MTU validation more fine-grained for better UX
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 11:44:47 +01:00
Thomas Lamprecht
9ea839b3dc ui: vm vNIC: add empty text for MTU field
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 11:44:29 +01:00
Dominik Csapak
366558a79d ui: tree/ResourceTree: show Tags in tree
and update the treenodes when the tags change.
since we change the vm node text (which we pass through to the config
panel), we have to change how we generate the text there slightly
(otherwise that would include the rendered tags)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:23 +01:00
Dominik Csapak
d70be8cd73 ui: {lxc, qemu}/Config: show Tags and make them editable
add the tags in the status line, and add a button for adding new ones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:23 +01:00
Thomas Lamprecht
4523e5c6db ui: qemu hardware: avoid manual deletion handling for vCPU affinity
Switch to the `proxmoxtextfield` widget and enable its `deleteEmpty`
option, which gives us that all for free and better.

Fix label/emptyText to title casing while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 11:56:26 +01:00
Thomas Lamprecht
ea9b86f81f ui: qemu hardware: only enable affinity form field for root@pam
that then also ensures it isn't submitted, which would fail
permission checks for non-root users when editing the vCPU.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 11:53:57 +01:00
Thomas Lamprecht
5c63f8a1fe ui: qemu hardware: fix eslint error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 10:38:05 +01:00
Alexandre Derumier
689410588b ui: qemu: network: increase max queues to 64
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
 [T: 128 -> 64, see qemu-server commit]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 09:27:17 +01:00
Dominik Csapak
95f624b277 ui: cloudinit: disable remove button without VM.Config.Cloudinit
since it also needs both VM.Config.CDROM and VM.Config.Cloudinit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 09:03:26 +01:00
Leo Nunner
ad1d539e43 fix #4321: properly check cloud-init drive permissions
Checking for only Sys.Console prevents users who actually have the
correct permissions (VM.Config.CDROM, VM.Config.Cloudinit) from adding
a new cloud-init drive. Some checks needed to be adapted so that editing
cloud-init devices was possible with VM.Config.CDROM instead of
VM.Config.Disk.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
2022-11-17 08:36:58 +01:00
Fiona Ebner
5f1b4ea387 ui: qemu: options: use 'first disk' for legacy 'c' boot setting
The kvm man page mentions that using 'c' will try booting from the
first hard disk, so the current '(no bootdisk)' text in the UI is not
accurate, and boot can still succeed.

Reported in the community forum:
https://forum.proxmox.com/threads/115800/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-16 20:38:57 +01:00
Thomas Lamprecht
8b0bb902e6 ui: qemu monitor: rework comment about how (starting) trimming works
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-16 20:22:07 +01:00
Dominik Csapak
66937c6256 fix #4318: ui: qemu/Monitor: rework output retention mechanism
instead of saving maximum 500 lines, count commands + lines, and only
if both are over the limit, truncate the command list

this way, at least the last 10 commands + output are always visible, and
no visible output is truncated, while still not letting the log
grow infinitely

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-16 20:15:14 +01:00
Oguz Bektas
c8f2cf4c1a ui: vm network: allow to override MTU for virtio devices
we already have the 'mtu' option in the API, so we can just expose
that option inside the 'Advanced' menu for virtio network interfaces.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>

Moved the message tooltip below the advanced columns to avoid the line
break and make it more visually pleasing.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
2022-11-16 19:55:29 +01:00
Fiona Ebner
5a2e333c9e ui: lxc/qemu: cpu edit: make cpuunits depend on node's cgroup version
so that the default value and limits actually correspond to what will
be used. Defaults to values for cgroup v2, because that is the more
common scenario.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-15 14:08:55 +01:00
Dominik Csapak
17dcba38dd ui: qemu: increase available usb ports depending on machine and ostype
in the backend, we allow up to 14 usb ports, but only if the vm can
use the qemu-xhci controller which is only possible since machine
version 7.1 and if the ostype is l26 or windows > 7

for this we introduce two helpers:
* qemu_min_version: modeled after the signature of 'min_version' from
  qemu-server, expects two arrays of versions and returns true if
  the first parameter is equal or greater than the second version
* get_max_usb_count looks at the given ostype and machine string
  and returns the proper maximum number

since we don't currently have the actual running version of the vm in
the gui, this is only a heuristic for running vms. but since the actual
running version could only be lower if none is set (e.g. for
migrated/long-running vms) we allow more in the gui and the backend will
do the proper thing (either hotplug it, or make it a pending change)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-10 17:06:41 +01:00
Dominik Csapak
988898a625 ui: USBInputPanel: use correct maximum usb index
We already have that factored out in PVE.Utils, so use that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-10 17:06:41 +01:00
Wolfgang Bumiller
310f32b7a9 Merge branch 'taskset' into taskset-merged 2022-11-10 09:43:32 +01:00
Daniel Bowder
9599d1f02e fix #3593: add js input for affinity
Adds a textfield for the affinity value. Delete that affinity value
when the textbox is empty.

Signed-off-by: Daniel Bowder <daniel@bowdernet.com>
2022-11-10 09:42:07 +01:00
Matthias Heiserer
87e222300c GUI: OS defaults: use SCSI single as default controller
Existing installs are not changed by this.

Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2022-11-08 17:50:38 +01:00
Matthias Heiserer
94b5e53a48 GUI: HDEdit: check iothread by default and move it from advanced section
Existing disks are not changed by this.
Especially in benchmarks, iothreads significantly improve IO performance.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2022-11-08 17:50:38 +01:00
Fiona Ebner
a3b5c220f9 ui: lxc/qemu: cpu edit: use emptyText for cpuunits
This makes it slightly clearer that it's a default value (not being
written to the config explicitly). It's also in preparation to bind
the default based on the cgroup version, where it's a bit nicer to
bind the emptyText instead of the value (or a user set value would be
overwritten when the binding updates).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-08 16:24:49 +01:00
Fiona Ebner
61c0338790 ui: qemu/lxc: cpu edit: fix 'create' parameter for delete_if_default()
For lxc, commit 53395db1 ("lxc/ResoureEdit: move some cpu fields to
advanced options") made the fields available in the create wizard, so
the comment is also wrong.

Both wizards do a 'delete kv.delete' in their onSubmit() function, so
it didn't actually matter in practice.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-08 16:24:49 +01:00
Matthias Heiserer
0fe712de01 ui: qemu disk edit: fix typo in view model variable name
Worked before because we always set the correct one manually in the
view controllers init and scsi-controller change handler.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
 [ T: added actual subject and reworded commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-28 09:15:13 +02:00
Thomas Lamprecht
c956508c7d fix # 4044: ui: hd move: avoid bogus progress bar, show task viewer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-11 16:23:11 +02:00
Thomas Lamprecht
56148f253e ui: utils: drop some useles _array helpers, just use Object.entries
if we need to enforce ordering it may help to reintroduce them
though.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 09:07:14 +02:00
Dominik Csapak
dd8b3252af ui: fix adding hostpci > 5
by using the limits from PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-25 18:22:24 +02:00
Thomas Lamprecht
c8e171a8bd ui: vm display: refactor and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-24 12:03:34 +02:00
Thomas Lamprecht
3bde324faf ui: move disk reassign into window/ folder
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-08 14:53:55 +02:00
Aaron Lauterer
1b42be84cf ui: hdmove: modernize/refactor
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:35:17 +02:00
Aaron Lauterer
48eb9401a4 ui: BusTypeSelector: change noVirtIO to withVirtIO
Double negated properties make it harder than necessary to parse
conditions.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:35:17 +02:00
Aaron Lauterer
a8d854afe2 ui: lxc/qemu: add disk reassign and action submenu
For the new HDReassign component, we follow the approach of HDMove to
have one componend for qemu and lxc.

To avoid button clutter, a new "Disk/Volume action" button is
introduced. It holds the Move, Reassign and Resize buttons in a
sub-menu.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:34:44 +02:00
Thomas Lamprecht
b49a0404be ui: vm hardware: module wide refactoring/cleanups/style changes/fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:46:30 +02:00
Thomas Lamprecht
0bb1e60d1a ui: vm hardware: fix add-menu itemId casing
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:41:44 +02:00
Thomas Lamprecht
aa8e5e7909 ui: vm: factor out add-HW menu handler to higher order fn
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:06:14 +02:00
Thomas Lamprecht
64bef8206e ui: qemu: switch memory icon to SVG
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-31 16:52:14 +02:00
Thomas Lamprecht
f9698f62cb ui: qemu: switch processor icon to SVG
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-31 15:43:40 +02:00
Aaron Lauterer
8c4ec1aef8 gui: add help button to qm guest agent window
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-03-16 15:32:34 +01:00
Thomas Lamprecht
36e97aa41d ui: vm boot order: move init logic into controller
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-14 08:40:46 +01:00
Thomas Lamprecht
87faaa0b93 ui: vm: improve validator for CPU share range
Allow the range for the old CGroup V1 one, as while deprecated,
that's still supported and a includes the range for v2 anyway.

With a next major release we may drop v1 support completely, probably
in PVE 8.0, then we can reduce this to the range of [1, 1000] that v2
supports.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-10 19:08:37 +01:00
Thomas Lamprecht
d20113ef7e ui: pci passthrough: fix labels of new id/vendor overrides
We do not use 'Set XYZ' anywhere else and it should be clear enough
from the PCI selector in the non-advanced section that the actual
device to get passed-through is chosen else where, but we still can
use the emptyText to avoid confusion where the (sub) vendor/id will
come from if a field is left empty.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-27 15:16:50 +01:00
Nicholas Sherlock
9a9be673d1 ui: pci passthrough: editor for pci-id overrides
Signed-off-by: Nicholas Sherlock <n.sherlock@gmail.com>
2022-01-25 11:17:05 +01:00
Thomas Lamprecht
523bc167d7 ui: vm create wizard: default to 4 GiB memory for win11 os type
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-12-09 17:41:45 +01:00
Thomas Lamprecht
b48c66655c ui: qemu: disk edit: drop label widths from advanced columns
this is a historical left over from the time when the bandwidth
limits weren't in their own, separate tab, as there we got quite
long labels and we synced the width up for the remaining fields to
avoid that it looks to much off.

Luckily not required anymore, so just drop it for non BW fields.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-16 14:19:00 +01:00
Dominik Csapak
f68d8b2c54 ui: qemu/HDEdit: add 'aio' advanced option
so that users can change it more easily if necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-16 14:05:06 +01:00
Thomas Lamprecht
d9d962999b ui: qemu: fix enabling SSD-emulation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 17:32:21 +01:00
Thomas Lamprecht
731c3253ec ui: qemu/HD edit: more modern assembly of bandwidth values
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 16:16:40 +01:00