If a guest's QEMU process is 'running', but QMP says 'shutdown' or
'prelaunch', the VM is ready to be booted anew, so we can show the
button.
The 'shutdown' button is intentionally not touched, as we always want to
give the user the ability to 'stop' a VM (and thus kill any potentially
leftover processes).
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
as else the window is not centered if it only grows in size after
ExtJS rendered it completely once.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The new boot order property can express many more scenarios than the old
one. Update the editor so it can handle it.
Features a grid with all supported boot devices which can be reordered
using drag-and-drop, as well as toggled on and off with an inline
checkbox.
Support for configs still using the old format is given, with the first
write automatically updating the VM config to use the new one.
The renderer for the Options panel is updated with support for the new
format.
Note that it is very well possible to disable all boot devices, in which
case an empty 'boot: ' will be stored to the config file. I'm not sure
what that would be useful for, but there's no reason to forbid it
either, just warn the user that it's probably not what they want.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
With the introduction of VM.Config.Cloudinit we can set the user,
password and an SSH key without VM.Config.Network permission.
Keep the fallback for VM.Config.Network so custom roles don't break.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
An administrator can set a custom CPU model for a VM where the general user
does not have permission to use this particular model. Prior to this change
the ProcessorEdit component would be broken by this, since the store of the
CPU type selector did not contain the configured CPU model.
Add it in manually if this situation occurs (with 'Unknown' vendor, since
we cannot retrieve it from the API), but warn the user that changing it
would be an irreversible action.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Clean up the code in ProcessorEdit with a view model and fix a bug while at
it - previously, pressing the 'Reset' button on the form would always set
the value of the total core count field to 1, so mark 'totalcores' with
'isFormField: false' to avoid reset.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
The backend treats an undefined value and 0 differently. If the option
is undefined, it will still be set for Windows in config_to_command.
Replace the checkbox with a combobox covering all options.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
I saw some cases where the pending changes just continued to get
triggered for some VMs, even if they shouldn't anymore - effectively
resulting in 3 - 4 concurrent pending changes call at a time.
It could be this, or not, but it's cleaner this way so go for it
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Warn the user when selecting /dev/random or disabling speed limits.
'hardware_counts' is used since technically more than one RNG could be
attached to a QEMU machine. It is limited to 1 however, since the
usefulness of such a setup is more than questionable, considering the
linux kernel only ever uses one hwrng at a time anyway.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Commit f36240c507 (gui: pci passthrough: consider domain in PCISelector)
used 'values.host' without checking if it's set, resulting in an error
when the dialog was opened for a new device (where values.host is
undefined).
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
using the better View, ViewModel, Controller style,
while doing this, make it generic so that we can use it for qemu and lxc
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
using an Proxmox.window.Edit, which does many of the things we did
manually, also rewrite is in such way that we can use it for qemu
and lxc
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this improves following behaviours:
* do not loop over items multiple times
(we iterated one time extra for efidisk)
* do not check every item for cloudinit
(we even checked non-disk types)
* make the counts more generic using an object
* also disable cloudinit button when you have one pending
* also disable serial/net button when at limit or the user has
not the right priviliges
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this also fixes the issue that we only showed 4 hostpci devices in
the gui despite raising the limit in the backend to 16
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
when a user does not have the right privileges for cloudinit (e.g.
VM.Config.Network), we do not set an editor, which results in a button
that does nothing when pressed
fix this by enabling the button only when there is an editor set
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Avoids having to do the 'Console' -> 'Summary' -> 'Console' dance
everytime the VM is started and the Console window is currently open.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
doc was just bumped, there's no real content, I don't want to bump it
just for this, so replace with link to QM and a fixme comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
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>
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>
but remove the default domain '0000' before sending to the backend,
and add it if no domain is given in the config
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>