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