This adds the bash completion for the wakeonlan API call.
The bash completion returns only those nodes which are offline according to the
member status.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Use the new format to verify the MAC addresses.
The wakeonlan API call now returns the MAC address of the node to wake on
successful sending of the WoL packet.
pvenode finally displays this MAC address to the user as feedback.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Checks if the specified target node even exists before trying to read its MAC
address from the config and sending the wake on LAN magic packet.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Provides the basic functionality to provide a wake on LAN feature implementation
to start nodes in a cluster from other nodes.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
to allow retrieval of certificate information, and uploading or removing
of custom certificate files.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
this currently only contains a description and the node-specific ACME
configuration, but I am sure we can find other goodies to put there.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
so that we can filter the journal by service
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
use the pveupgrade command directly without bash inbetween,
the incorrect quoting led to '--shell' not being passed to
pveupgrade and closing the connection
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
If on bootup one of our VMs is locked by an backup we safely can
assume that this backup job does not run anymore and that the lock
has no reason anymore and just hinders uptime of services.
As at this time we (the node) have quorum so we may safely assume
that we have a consistent view of the cluster and all our VMs really
belong to us. We just need to ensure that we do not run into an
automatic backup jobs, so execute our code with VZDumps lock or
timeout.
Log in the Task and Sys log that we removed the lock, so that an
admin easily sees that there may be need for cleaning leftovers from
an interrupted backup.
Addresses bug #1024
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
small refactoring in get_filtered_vmlist: save a VMs config in its
own subhash to avoid collisions with other data which we want to save
in the vmid list, for now this is only `type` but in the next patch
I want to save also the class
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
since bash does not play well with utf8 encoded input,
eg. pressing ALTGR + M on an english intl keyboard layout int novnc
does not enter the mu symbol but makes bash think you pressed alt+5,
we should use login without authorization when logging in as root
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
use the new keeplocale parameter from run_command and do not delete the
LANG and LANGUAGE variable for the vncshell
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
instead of using get_start_stop_list in a rather hacky way use the
new get_filtered_vmlist method and adapt the loop, as now only one
level is required.
most changes are just an indent shift left as we lost an unnecessary
loop level
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
we used get_start_stop_list for assembling a list of VMIDs for
stopall, startall and migrateall.
While get_start_stop_list did already some filtering we did some
more in the specific startall and stopall calls.
Add a new private helper which does all the filtering and just
assemble the startup order in the get_start_stop_list method.
Move the template and ha managed filtering in the new
get_filtered_vmlist method, this allows us to remove the filtering
from the API calls them self and we do not load the vms config twice
(it was cached, but nonetheless unnecessary)
get_filtered_vmlist is also intended to be used by migrateall in a
next patch
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
this is a simple filter which allows us to limit the actions to specific
vmids
this makes it much simpler to start/stop/migrate a range of vms
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>