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