From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9F5756FA09 for ; Tue, 31 Aug 2021 12:44:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9D7052489F for ; Tue, 31 Aug 2021 12:44:53 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 100B924896 for ; Tue, 31 Aug 2021 12:44:53 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DB7E244308 for ; Tue, 31 Aug 2021 12:44:52 +0200 (CEST) From: Dylan Whyte To: pve-devel@lists.proxmox.com Date: Tue, 31 Aug 2021 12:44:22 +0200 Message-Id: <20210831104423.3602837-3-d.whyte@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210831104423.3602837-1-d.whyte@proxmox.com> References: <20210831104423.3602837-1-d.whyte@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.640 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH v2 pve-docs 3/4] pvenode: add task & migrate/stop/startall sections X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 10:44:53 -0000 Adds PVE Node Management sections related to viewing task history, and bulk operations for starting, stopping, and migrating all guests. Signed-off-by: Dylan Whyte --- changes from v1: * New patch, adding sections for items requested by @Thomas pvenode.adoc | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/pvenode.adoc b/pvenode.adoc index f7835f5..dfa73aa 100644 --- a/pvenode.adoc +++ b/pvenode.adoc @@ -83,6 +83,54 @@ of `` obtained from the `wakeonlan` property. The node specific pvenode config set -wakeonlan XX:XX:XX:XX:XX:XX ---- +Task history +~~~~~~~~~~~~ + +When troubleshooting server issues, for example, failed backup jobs, it can +often be helpful to have a log of the previously run tasks. With {pve}, you can +access the nodes's task history through the `pvenode task` command. + +You can get a filtered list of a node's finished tasks with the `list` +subcommand. For example, to get a list of tasks related to VM '100' +that ended with an error, the command would be: + +---- +pvenode task list --errors --vmid 100 +---- + +The log of a task can then be printed using its UPID: + +---- +pvenode task log UPID:pve1:00010D94:001CA6EA:6124E1B9:vzdump:100:root@pam: +---- + + +Bulk guest power management +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In case you have many VMs/containers, starting and stopping guests can be +carried out in bulk operations with the `startall` and `stopall` subcommands of +`pvenode`. By default, `pvenode startall` will only start VMs/containers which +have been set to automatically start on boot (see +xref:qm_startup_and_shutdown[Automatic Start and Shutdown of Virtual Machines]), +however, you can override this behavior with the `--force` flag. Both commands +also have a `--vms` option, which limits the stopped/started guests to the +specified VMIDs. + +For example, to start VMs '100', '101', and '102', regardless of whether they +have `onboot` set, you can use: + +---- +pvenode startall --vms 100,101,102 --force +---- + +To stop these guests (and any other guests that may be running), use the +command: + +---- +pvenode stopall +---- + [[first_guest_boot_delay]] First guest boot delay @@ -101,7 +149,21 @@ pvenode config set --startall-onboot-delay 10 ---- -// TODO: extend and improve chapter! +Bulk guest migration +~~~~~~~~~~~~~~~~~~~~ + +In case an upgrade situation requires you to migrate all of your guests from one +node to another, `pvenode` also offers the `migrateall` subcommand for bulk +migration. By default, this command will migrate every guest on the system to +the target node. It can however be set to only migrate a set of guests. + +For example, to migrate VMs '100', '101', and '102', to the node 'pve2', with +live-migration for local disks enabled, you can run: + +---- +pvenode migrateall pve2 --vms 100,101,102 --with-local-disks +---- + ifdef::manvolnum[] include::pve-copyright.adoc[] -- 2.30.2