ha.md: explain how to prevent automatic reboots on HA-protected VMs#459
ha.md: explain how to prevent automatic reboots on HA-protected VMs#459thomas-dkmt wants to merge 6 commits into
Conversation
By default, HA-protected VMs reboot automatically after being shut down. This commit updates the XCP-ng documentation to explain how to disable HA features on a VM or an entire pool, to prevent VMs from restarting automatically after getting shut down. Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
|
So, I let a lot of commits pass previously, but The historical convention was rather : "context: description" (where context will usually be the filename if only one is modified). |
Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
| 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. | ||
| ::: | ||
|
|
||
| ##### Disabling HA on the whole pool |
There was a problem hiding this comment.
The pool-wide setting isn't about disabling HA for the whole pool. Of course, disabling HA would work too, but here the question is how to govern HA's behaviour when it's on.
|
|
||
| #### Configure VM shutdown behavior | ||
|
|
||
| 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). |
There was a problem hiding this comment.
It was my understanding that you didn't have to both disable its HA protection and change the pool behaviour.
|
|
||
| You can prevent automatic reboots on your entire pool. To do this, use the `xe` CLI to run this command: | ||
|
|
||
| `xe pool-param-set uuid=$UUID ha-reboot-vm-on-internal-shutdown=false`. |
There was a problem hiding this comment.
So, actually, we already wrote about this on line 203. The online search didn't find "ha-reboot-vm" and my local grep of the files was on "ha_reboot_vm" so I missed it.
Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
4ac2414 to
1c6bbe1
Compare
| @@ -204,6 +208,22 @@ As a result, VMs that are shut down internally or through the API will restart t | |||
There was a problem hiding this comment.
Not changed in this PR, but I find the phrasing ambiguous: "will restart the exact same way" leaves me unsure about the actual behaviour after a reboot.
|
|
||
| ##### 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`. |
There was a problem hiding this comment.
That's the pool-wide setting! There's no per VM setting, all you can do is to change the ha-restart-priority.
| 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. |
There was a problem hiding this comment.
This relates to the pool wide setting.
stormi
left a comment
There was a problem hiding this comment.
I'll be direct, this PR is in a state that indicates either a lack of understanding of the changes being done, abuse of LLM, or both.
The instructions written in the previous commits regarding ha protection and automatic vm reboot behavior were confusing and/or inaccurate. This commit makes the instructions less ambiguous. Thanks stormi for the feedback! Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
| ``` | ||
| As a result, VMs that are shut down internally or through the API will restart the exact same way. | ||
|
|
||
| The `ha-reboot-vm-on-internal-shutdown` parameter indicates whether an HA-protected VM that is shut down from inside (not through the API) should be automatically rebooted when HA is enabled. |
There was a problem hiding this comment.
I have doubts about this "not through the API".
There are two ways to shut a VM down via the API:
- soft shutdown (default) => transmits the shutdown order to the OS itself, which shuts down by itself
- hard shutdown => virtual electrical poweroff
How does HA behaves with regards to both these cases?
There was a problem hiding this comment.
I don't know. @psafont , do you know more about this?
There was a problem hiding this comment.
The parameter is about shutdowns that are triggered from the guest OS (VM), in oposition to a xapi-initiated shutdown, I would word it differently:
The
ha-reboot-vm-on-internal-shutdownparameter indicates whether VM-initiated shudotwns will trigger a restart for HA-protected VMs, for example, when a user clicks the shutdown in Windows.
There was a problem hiding this comment.
@psafont Do you know what happens with regards to HA if an admin triggers the VM shutdown from XAPI, either "soft" or "hard"?
There was a problem hiding this comment.
From the wording in https://docs.xenserver.com/en-us/xenserver/8/high-availability, and from the inspection of code I've seen, the restarts are only done when the VM shuts down and xapi did not give the order.
This also explain this new field: it's a way to differentiate when a VM restarts from within, and when a VM has stopped because its host has become offline.
…font Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
By default, HA-protected VMs reboot automatically after being shut down.
This pull request updates the XCP-ng documentation to explain how to prevent HA-protected VMs from restarting automatically after getting shut down (from within the guest OS).