removes the check for dir or nfs storage,
because a few lines below we check for
the content type vztmpl
which should only be allowed when we have a
location where we put templates, thus we should
be able to download them there
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Refactored and now using PVE::QemuConfig and PVE::LXC::Config
Moved the next if.. statements into the corresponding branches
Signed-off-by: Caspar Smit <casparsmit@supernas.eu>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
allow the since/until parameters which journalctl understands
We use a really simple regex to check a valit date (time) stamp.
This can be done as this API call gets mainly used by the GUI where
we have full controll over what we send and additional journalctl
has already a good timestamp parser which can handle that.
If set limit the maximal worker count to the new datacenter.cfg
setting 'max_workers'.
For stopall we prefer this over the cpu count if it's set.
For migrateall we prefer the parameter but allow now to ommit
the parameter and then we use the new setting if set.
if both are not set we throw an error.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Previously we waited 10 seconds, in PVE 4 system sometimes need more
time to initialize all services so the didn't execute the startall
command even if a few seconds later cfs quorum was etablished.
This is a background process started from the pve-manager init
script, thus waiting doesn't interferes with other processes, so
wait long enough.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The check used was completely wrong and so the startall and stopall
API calls touched HA managed service, which they shouldn't.
Using the vm_is_ha_managed call from the HA stack fixes that.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
When adding the new LXC config format we forgot to adapt the
get_start_stop_list and do s/pve.startup/onboot/
This fixes that qemu VMs were started always before LXC CTs,
irregardless of the defined order.
This also let's us simplify the surrounding code and reduce code
reuse.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>