]> git.proxmox.com Git - pve-docs.git/blob - pvenode.adoc
pvenode: add task & migrate/stop/startall sections
[pve-docs.git] / pvenode.adoc
1 ifdef::manvolnum[]
2 pvenode(1)
3 ==========
4 :pve-toplevel:
5
6 NAME
7 ----
8
9 pvenode - Proxmox VE Node Management
10
11 SYNOPSIS
12 --------
13
14 include::pvenode.1-synopsis.adoc[]
15
16 DESCRIPTION
17 -----------
18 endif::manvolnum[]
19 ifndef::manvolnum[]
20 Proxmox Node Management
21 -----------------------
22 ifdef::wiki[]
23 :pve-toplevel:
24 endif::wiki[]
25 endif::manvolnum[]
26
27 The {PVE} node management tool (`pvenode`) allows to control node specific
28 settings and resources.
29
30 Currently `pvenode` allows to set a node's description and to manage
31 the node's SSL certificates used for the API and the web GUI through `pveproxy`.
32
33 ifdef::manvolnum[]
34 include::output-format.adoc[]
35
36 Examples
37 ~~~~~~~~
38
39 .Install an externally provided certificate
40
41 `pvenode cert set certificate.crt certificate.key -force`
42
43 Both files need to be PEM encoded. `certificate.key` contains the private key
44 and `certificate.crt` contains the whole certificate chain.
45
46 .Setup ACME account and order a certificate for local node.
47
48 -----
49 pvenode acme account register default mail@example.invalid
50 pvenode config set --acme domains=example.invalid
51 pvenode acme cert order
52 systemctl restart pveproxy
53 -----
54
55 endif::manvolnum[]
56
57 Wake-on-LAN
58 ~~~~~~~~~~~
59 Wake-on-LAN (WoL) allows to switch on a sleeping computer in the network by
60 sending a magic packet. At least one NIC must support this feature and the
61 respective option needs to be enabled in the computers firmware (BIOS/UEFI)
62 configuration. The option name can vary from 'Enable Wake-on-Lan' to
63 'Power On By PCIE Device', check your motherboards vendor manual, if unsure.
64 `ethtool` can be used to check the WoL configuration of `<interface>` by
65 running:
66
67 ----
68 ethtool <interface> | grep Wake-on
69 ----
70
71 `pvenode` allows to wake sleeping members of a cluster via WoL using the
72 command:
73
74 ----
75 pvenode wakeonlan <node>
76 ----
77
78 This broadcasts the WoL magic packet on UDP port 9, containing the MAC address
79 of `<node>` obtained from the `wakeonlan` property. The node specific
80 `wakeonlan` property can be set by the following command:
81
82 ----
83 pvenode config set -wakeonlan XX:XX:XX:XX:XX:XX
84 ----
85
86 Task History
87 ~~~~~~~~~~~~
88
89 When troubleshooting server issues, for example, failed backup jobs, it can
90 often be helpful to have a log of the previously run tasks. With {pve}, you can
91 access the nodes's task history through the `pvenode task` command.
92
93 You can get a filtered list of a node's finished tasks with the `list`
94 subcommand. For example, to get a list of tasks related to VM '100'
95 that ended with an error, the command would be:
96
97 ----
98 pvenode task list --errors --vmid 100
99 ----
100
101 The log of a task can then be printed using its UPID:
102
103 ----
104 pvenode task log UPID:pve1:00010D94:001CA6EA:6124E1B9:vzdump:100:root@pam:
105 ----
106
107
108 Bulk Guest Power Management
109 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
111 In case you have many VMs/containers, starting and stopping guests can be
112 carried out in bulk operations with the `startall` and `stopall` subcommands of
113 `pvenode`. By default, `pvenode startall` will only start VMs/containers which
114 have been set to automatically start on boot (see
115 xref:qm_startup_and_shutdown[Automatic Start and Shutdown of Virtual Machines]),
116 however, you can override this behavior with the `--force` flag. Both commands
117 also have a `--vms` option, which limits the stopped/started guests to the
118 specified VMIDs.
119
120 For example, to start VMs '100', '101', and '102', regardless of whether they
121 have `onboot` set, you can use:
122
123 ----
124 pvenode startall --vms 100,101,102 --force
125 ----
126
127 To stop these guests (and any other guests that may be running), use the
128 command:
129
130 ----
131 pvenode stopall
132 ----
133
134
135 [[first_guest_boot_delay]]
136 First Guest Boot Delay
137 ~~~~~~~~~~~~~~~~~~~~~~
138
139 In case your VMs/containers rely on slow-to-start external resources, for
140 example an NFS server, you can also set a per-node delay between the time {pve}
141 boots and the time the first VM/container that is configured to autostart boots
142 (see xref:qm_startup_and_shutdown[Automatic Start and Shutdown of Virtual Machines]).
143
144 You can achieve this by setting the following (where `10` represents the delay
145 in seconds):
146
147 ----
148 pvenode config set --startall-onboot-delay 10
149 ----
150
151
152 Bulk Guest Migration
153 ~~~~~~~~~~~~~~~~~~~~
154
155 In case an upgrade situation requires you to migrate all of your guests from one
156 node to another, `pvenode` also offers the `migrateall` subcommand for bulk
157 migration. By default, this command will migrate every guest on the system to
158 the target node. It can however be set to only migrate a set of guests.
159
160 For example, to migrate VMs '100', '101', and '102', to the node 'pve2', with
161 live-migration for local disks enabled, you can run:
162
163 ----
164 pvenode migrateall pve2 --vms 100,101,102 --with-local-disks
165 ----
166
167
168 ifdef::manvolnum[]
169 include::pve-copyright.adoc[]
170 endif::manvolnum[]