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