Commit Graph

61 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
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
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
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
Thomas Lamprecht
e4d8437819 ui: qemu: disk edit: expose read-only flag as advanced option
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 11:17:11 +01:00
Thomas Lamprecht
3f543d7ff7 ui: qemu: disk edit: refactor to more declarative style using bindings
would technically require a versioned dependency bump to widget
toolkit as the `clearOnDisable` flag is new in 3.4-2, but this is
really only for slight UX improvement, so avoid the hard dependency
bump..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 11:16:04 +01:00
Dominik Csapak
9dbc4dfa88 ui: add qemu/MultiHDEdit and use it in the wizard
uses the MultiDiskPanel as base and implements the necessary
functions/variables

this allows now to create a vm also without any disk

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-11-05 09:50:36 +01:00
Dominik Csapak
9d0fc15540 ui: qemu/HDEdit: fire an event when the disk id changes
e.g. from scsi0 to scsi1 or from scsi0 to virtio0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
ef82a0b1a7 ui: qemu/HDEdit: use me instead of this
more in line with our remaining code style

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
74c0b9a907 ui: qemu/HDEdit: move Bandwidth options to a different tab
for that we have to nest the now two tabs in a tabpanel into an inputpanel.
to prevent the options to be collected twice, we override the
'getValues' function of the 'sub-inputpanels' to return an empty object.
(we could make that an option for the inputpanel, but not necessary for
now)

also we have to move the 'bodyPadding' of the wizard to the 'defaults'
so we can override it for specific panels

and we have to manually set the width of the edit window since it
believes we only have a single column ('twoColumns' could also be an
option of the edit window should we need that again)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominic Jäger
55ee6ba132 ui: eslint: No unused or duplicate variables
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
8717893448 ui: vm/HDEdit: really™ fix backup checkbox default
By ensuring we delete the property if it's true (the backend default)
and set it is false, i.e., like originally (pre, mine and Aaron's
patch), but with reversed user input.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-10 11:29:13 +01:00
Thomas Lamprecht
20d3180b3a ui: vm/HDEdit: fix backup checkbox default
The recent change transformed this checkbox from a negative "No
Backup" to a positive "Backup" did not accounted for changing the
default fallback for the parseBoolean call.

As this would had suggested that disk are backed-up which aren't
backup, it could lead to pretty devastating results...

fixes commit 8e1df0acc5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 15:46:47 +01:00
Thomas Lamprecht
0bead056b1 followup: rename to "Backup" but add tooltip
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 15:11:08 +01:00
Aaron Lauterer
8e1df0acc5 ui: hdedit: change nobackup to include in backup
Change the behavior from having to activate the `No backup` checkbox to
exclude a disk from backups to having a `Include in backup` checkbox
that is checked by default.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-12-09 14:45:14 +01:00
Dominik Csapak
e4e36020aa gui: qemu/HDEdit: use propertyStringSet helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Stefan Reiter
0cd3abab50 fix #2265: enable discard for virtio-blk
QEMU 4.0 supports this. Guest needs to have at least Kernel 5.0 for it
to be used.

SSD emulation is still not supported AFAICT, so no change here.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-07-23 08:08:36 +02:00
Dominik Csapak
471d03aa6b gui: add system panel to the vm creation wizard
for this we have to adapt the scsiController logic slightly, so that
the ostype change sets the viewmodel, which in turn changes the
bound fields (one one the system tab, and the displayfield on the hd tab)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-28 17:04:06 +01:00
Nick Chevsky
75357e9f0d Enable "Discard" option for IDE and SATA drives
Even though QEMU supports the discard feature for both ATA [1] and
SCSI drives, the "Discard" checkbox in Proxmox VE is artificially
restricted to SCSI drives. This change expands availability of the
"Discard" checkbox to all drive types supported by QEMU, leaving
VirtIO Block as the only remaining exclusion.

Combined with the new "SSD emulation" option [2], enabling discard
on IDE/SATA drives allows reclaiming of free space on thin-provisioned
storage with guests that do not support our SCSI controllers.

[1] d353fb72f5
[2] https://git.proxmox.com/?p=pve-manager.git;a=commit;h=f9261fde2134cec35a5ec7c3ebbee5daa4d67ec7

Signed-off-by: Nick Chevsky <nchevsky@gmail.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-14 09:21:12 +01:00
Nick Chevsky
f9261fde21 Add "SSD emulation" property to IDE, SATA, and SCSI drives
When enabled, the "SSD emulation" feature exposes drives as
solid-state (rather than rotational) by enabling the new `ssd`
qm.conf flag [1] on the drives, which in turn sets QEMU's
`rotation_rate` property [2, 3] on the underlying devices.

This change also moves the "Discard" option out of the advanced
section and promotes it to the top of the dialog box, as proposed
by Thomas Lamprecht [4].

[1] https://git.proxmox.com/?p=qemu-server.git;a=commit;h=6c875f9f315f2dc7a0a3a988622c2efdf089b171
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1498042
[3] https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg00698.html
[4] https://pve.proxmox.com/pipermail/pve-devel/2018-November/034327.html

Signed-off-by: Nick Chevsky <nchevsky@gmail.com>
2018-11-09 09:33:26 +01:00
Wolfgang Link
7cb345b816 fix #1691: use asynchronous API call for HD create
It should use an asynchronous API call to create an image,
because some storages may need longer to alloc an image.

If a storage needs more than 30 sec
the proxy will timeout and we have an orphan image.

Also, it is possible to increase the timeout for some
storages if an asynchronous call is used
2018-04-20 11:03:47 +02:00
Dominik Csapak
c2233c8fc2 qemu/HDEdit: move diskthrottling to advanced options
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Dominik Csapak
546d09c24e qemu/HDEdit.js: move some fields into advanced options
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Thomas Lamprecht
ef4ef788d5 use InputPanel from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
9fccc702ec use windowEdit from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
09cacce778 use KVCombobox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
896c0d5019 use Checkbox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Emmanuel Kasper
a1af3e3842 Do not translate Qemu specific terms
Multiqueue is the proper name as used by Qemu, as seen in
https://www.linux-kvm.org/page/Multiqueue

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Dominik Csapak
771aec961f use DiskStorageSelector in qemu/HDEdit.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Emmanuel Kasper
2414ef153a Update VM SCSI type based on iothread value when inside the wizard
We keep the same logic as before: once the iothread option is selected,
the SCSI controller is switched to virtio-scsi-single, until iothread
is unselected again.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:24 +02:00
Emmanuel Kasper
42bd655684 Add a field to show which SCSI controller type we are currently using
We use the field label 'SCSI Controller'. 'Type' is redundant, otherwise
we would have Network Card Type, Display Type, Network Card type, etc ...

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
7206af4b04 Do not use 'autoselect' as a boolean when preselecting a bus
The bus selector is displayed when we add a Hard Disk or CD Drive.
When it is displayed, we *always* preselect the next available
slot on the controller of our choice.
So this test is not needed.

We keep the test on the string value of 'autoselect' to select
a bus position when adding a CD Drive.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Thomas Lamprecht
3695863919 disable discard for non-scsi disks
Adapted from: Dominik Csapak <d.csapak@proxmox.com> version

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Thomas Lamprecht
ed1ac8f4b3 create: clear iothread on disable
A user may set the `iothread` option and then change the bus type to
something which does not support it (sata, ide), while we disable
it the previously set value remains, which is confusing.
An user could think he coulkd trick the Wizard into using iothreads
for SATA/IDE but we just ignore the value in this case.

Set iothread to false in the case it gets disabled.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Emmanuel Kasper
2a2dce7037 Change the SCSI controller type when editing a harddisk only when creating a VM.
If not, the following could happen:
 * user has a VM with two disks attached to a LSI controller
 * adding a third disk, he notices the iothread option, and clicks it
 * the scsihw type for all disks is changed now to virtio-scsi-single
 * on next cold restart, STOP 0x0000007B INACCESSABLE_BOOT_DEVICE for a Windows VM

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Thomas Lamprecht
2d06e72392 HDEdit: push more items in the same call
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Thomas Lamprecht
9a8a573568 qemu/create: use 'virtio-scsi-single' if 'iothread' is set
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reported-by: Nils <gismo3303@gmail.com>
2017-08-22 10:49:57 +02:00
Thomas Lamprecht
7a6e0635cf qemu/HDEdit: whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-22 10:42:42 +02:00
Emmanuel Kasper
85806e47d1 Use camel case for InputPanels aliases
Camel Case names for component alias follow Ext recommended practises
and are used otherwise everyelse in the code base.

No functionnal changes, aliases for these components were not used
anyway.
2017-07-11 13:23:38 +02:00
Emmanuel Kasper
1b6f87ab1d Add a Skip replication option on Disk Panel
This will allow to disable replication, when for instance we
add a disk on a non-replicatable storage.
The option is hidden in the wizard, because at that time no VM
replication has been set.
2017-06-27 10:49:35 +02:00
Emmanuel Kasper
d5e771ce51 Rename 'create' to 'isCreate' in pveWindowEdit and subclasses
This fixes around 20 jslint type confusion warnings.
Also reduce the scope and document jslint warnings along the way.
No functional changes.
2017-03-02 10:36:35 +01:00
Dietmar Maurer
c8802a60b7 use auto-generated block IDs to reference online docu. 2016-10-13 11:26:06 +02:00
Emmanuel Kasper
c149681d61 fix #1113: preserve LSI controller for legacy Oses
The SCSI HW type handling will be made in the Wizard class, removing from here.
2016-09-20 17:18:19 +02:00