could be also a generator (higher order fn), but it's easier to
grasp the scope and the like this way
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Function syntax, raw words, string templates, no prototype builtins
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
We enable/disable spice/xtermjs for the console button in the 'load'
callback of the statusstore, depending on the vms capabilities,
but until the first load there, the only safe option is novnc.
So we have to disable xtermjs and spice on start, else a click on
the button might open a window that cannot connect to the vm.
a forum user probably triggered this:
https://forum.proxmox.com/threads/unable-to-find-serial-interface-console-problem.87705
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Now that SLAAC is supported, we can revert commit 793f2cf4.
SLAAC requires cloud-init 19.4 or newer.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
The API doesn't advertise the property as non-optional and it's safer and more
in line with the surrounding code.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
The default is not just "i440fx", this hides the fact that the version
will be pinned to 5.1, unless one deliberately opens the editor.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
We need to detect "isWindows" before splitting a pinned version into
.version/.machine, otherwise .machine will always be "pc" or "q35", and
the check in "isWindows" will succeed even for pinned versions. This
resulted in "5.1" being shown even if a different version has been set
for a Windows machine.
Also alias "pc" directly to "__default__", as they have the same
meaning, but "pc" is not a valid entry in the "machine" combobox,
leading to an invalid state when editing the (valid) configuration of
"machine: pc" on a VM.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
and improve switchting machine type and keeping same version for
the windows based VMs, as we cannot do the same as for other
OS-Types, just select the "latest" magic version.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Hidden behind "Advanced" options, as to not confuse inexperienced users.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
There are several types of drives that use the same config keys. Most
notably CDRom and regular VM disks (EFI and cloudinit exist as well).
Since there is a dedicated permission for CDRom drives we need to check
permissions in more detail, depending on what type of drive it actually
is for things like the edit, remove and Add -> CDRom buttons.
The permission check in the row definition itself which only checked for
'VM.Config.Disk' permissions (never_delete) had to be removed and finer
grained checks added for the individual buttons. This also meant a bit
of reshuffling in the checks what kind of disk the current one is.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
By removing global vars 'i' and 'confid' and declaring them with let in the needed
context.
'i' wasn't necessary but had to be touched anyway.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Make sure that the `Add EFI Disk` button is disabled if the user does
not have the needed permissions.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>