Skip to content

Commit 1c6bbe1

Browse files
committed
apply changes suggested by stormi
Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
1 parent dab078c commit 1c6bbe1

1 file changed

Lines changed: 13 additions & 29 deletions

File tree

docs/management/ha.md

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ The **default timeout is 60 seconds**, but you can adjust this value using the f
175175
xe pool-param-set uuid=<pool UUID> other-config:default_ha_timeout=<timeout in seconds>
176176
```
177177

178-
179-
180178
## 🔧 Updates/maintenance
181179

182180
Before any update or host maintenance, planned reboot and so on, **ALWAYS** put your host in maintenance mode. If you don't do that, XAPI will think it's an unplanned failure, and will act accordingly.
@@ -195,9 +193,13 @@ If you shut the VM down with `Xen Orchestra` or `xe`, the VM will be stopped nor
195193

196194
However, if you halt the VM directly in the guest OS (via the console or in SSH), XCP-ng is NOT aware of what's going on. The system will think the VM is down and will consider that an anomaly. As a result, the VM will be **started automatically!**. This behavior prevents an operator from shutting down the system and leaving the VM unavailable for a long time.
197195

196+
#### Configure VM shutdown behavior
197+
198+
##### For an entire pool
199+
198200
:::tip
199201

200-
Starting with XAPI 25.16.0, VM restart behavior can be changed. To do this, run this command:
202+
Starting with XAPI 25.16.0, VM restart behavior can be changed on a pool-wide basis. To do this, run this command:
201203

202204
```
203205
xe pool-param-set uuid=... ha-reboot-vm-on-internal-shutdown=false
@@ -206,39 +208,21 @@ As a result, VMs that are shut down internally or through the API will restart t
206208

207209
:::
208210

209-
#### Configure VM shutdown behavior
210-
211-
If you don't want a VM to reboot automatically when it has been shut down from the guest OS: disable its HA protection, then adjust the VM reboot behavior with the parameter called `Pool.ha_reboot_vm_on_internal_shutdown` (see below).
212-
213-
##### Disabling HA on specific VMs
214-
215-
You can adjust the reboot behavior for a specific HA-protected VM:
211+
##### For specific VMs
216212

217-
- **Using the `xe` cli:** :
218-
- To disable HA features, run `xe vm-param-set uuid=<vm_uuid> ha-restart-priority=`.
219-
- To (re-)enable HA features, run `xe vm-param-set uuid=<vm_uuid> ha-restart-priority=restart` or `xe vm-param-set uuid=<vm_uuid> ha-restart-priority=best-effort`.
220-
- **Using Xen Orchestra**:
221-
To change the VM reboot behavior from Xen Orchestra, check out the instructions in the [Xen Orchestra documentation](https://docs.xen-orchestra.com/manage_infrastructure#vm-high-availability-ha).
213+
If you don't want a VM to reboot automatically when it has been shut down from the guest OS, adjust the VM reboot behavior with the parameter called `Pool.ha_reboot_vm_on_internal_shutdown`.
222214

223215
:::warning
224216
Applying these changes means that your VMs will stay off after they have been shut down, until you restart them yourself.
225217
:::
226218

227-
:::tip
228-
Once HA features have been disabled on your VM, shut the VM down. Once you have started the VM again, feel free to enable HA again.
229-
:::
230-
231-
##### Disabling HA on the whole pool
232-
233-
You can prevent automatic reboots on your entire pool. To do this, use the `xe` CLI to run this command:
234-
235-
`xe pool-param-set uuid=$UUID ha-reboot-vm-on-internal-shutdown=false`.
236-
237-
To enable automatic reboots again, set the parameter to `true` instead of `false`.
219+
- **Using the `xe` cli:** :
220+
- To disable automatic reboots, run `xe vm-param-set uuid=<vm_uuid> ha-restart-priority=`.
221+
- To (re-)enable automatic reboots, run `xe vm-param-set uuid=<vm_uuid> ha-restart-priority=restart` or `xe vm-param-set uuid=<vm_uuid> ha-restart-priority=best-effort`.
222+
- **Using Xen Orchestra**:
223+
To change the VM reboot behavior from Xen Orchestra, check out the instructions in the [Xen Orchestra documentation](https://docs.xen-orchestra.com/manage_infrastructure#vm-high-availability-ha).
238224

239-
:::warning
240-
By applying these changes to your entire pool, you disable the protection that prevents VMs from being shut down by their own guest OS.
241-
:::
225+
Once you've changed the reboot parameter, shut the VM down. After you have started the VM again, feel free to re-enable automatic reboots.
242226

243227
### Host failure
244228

0 commit comments

Comments
 (0)