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