-
Notifications
You must be signed in to change notification settings - Fork 119
ha.md: explain how to prevent automatic reboots on HA-protected VMs #459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c34d2fc
doc(ha.md): explain how to prevent automatic reboots
thomas-dkmt dab078c
split and clarify warnings, as suggested by psafont
thomas-dkmt 1c6bbe1
apply changes suggested by stormi
thomas-dkmt c5f94a1
ha.md: fix instructions for vm reboot behavior
thomas-dkmt 746ba4a
Reword the explanation of the vm reboot behavior, as suggested by psa…
thomas-dkmt cda82c7
ha.md: implement text fixes suggested by stormi
thomas-dkmt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -193,9 +193,13 @@ If you shut the VM down with `Xen Orchestra` or `xe`, the VM will be stopped nor | |
|
|
||
| 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. | ||
|
|
||
| #### Configure VM shutdown behavior | ||
|
|
||
| ##### For an entire pool | ||
|
|
||
| :::tip | ||
|
|
||
| Starting with XAPI 25.16.0, VM restart behavior can be changed. To do this, run this command: | ||
| Starting with XAPI 25.16.0, VM restart behavior can be changed on a pool-wide basis. To do this, run this command: | ||
|
|
||
| ``` | ||
| xe pool-param-set uuid=... ha-reboot-vm-on-internal-shutdown=false | ||
|
|
@@ -204,6 +208,22 @@ As a result, VMs that are shut down internally or through the API will restart t | |
|
|
||
| ::: | ||
|
|
||
| ##### For specific VMs | ||
|
|
||
| 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`. | ||
|
|
||
| :::warning | ||
| Applying these changes means that your VMs will stay off after they have been shut down, until you restart them yourself. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This relates to the pool wide setting. |
||
| ::: | ||
|
|
||
| - **Using the `xe` cli:** : | ||
| - To disable automatic reboots, run `xe vm-param-set uuid=<vm_uuid> ha-restart-priority=`. | ||
| - 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`. | ||
| - **Using Xen Orchestra**: | ||
| 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). | ||
|
|
||
| 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. | ||
|
|
||
| ### Host failure | ||
|
|
||
| We'll see 3 different scenarios for the host, with an example on 2 hosts, **lab1** and **lab2**: | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the pool-wide setting! There's no per VM setting, all you can do is to change the
ha-restart-priority.