What I learned in practice is that enabling Host HA affects VM HA.. in that VM HA no longer works. :)

So what does Host HA do? It'll reboot the hypervisor via IPMI if it is deemed unreachable. While the hypervisor is down or rebooting the VMs CANNOT be moved/started on another hypervisor.

What does VM HA do? It'll make sure VMs on a HA offering will be restarted (possibly on another hypervisor) if it is deemed down. Possible scenarios where VM HA would kick in:
- hypervisor crashed and Cloudstack marked the VMs on it as down
- user has powered off the VM from within (poweroff via ssh for example), Cloudstack will notice it is down and restart it

As part of VM HA and for data integrity, a hypervisor will keep a heartbeat file (sort of lock file) on the NFS primary storage - if the the NFS share has gone away it will assume it is in a network split or has lost access to the storage and will forcefully reboot itself. This is where that happens:

https://github.com/apache/cloudstack/blob/d2ad9363a264290e9e5ee58db4a745cbb0e1c62a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh#L162

HTH

On 2023-10-11 14:47, Bryan Tiang wrote:
Hi Nix and Swen,

Thanks for the input! Just curious, can VM HA and Host HA be enabled at the same time?

In our case, using Cloudstack + Linstor.

And to clarify my understanding. Host HA migrates VMs to another Host if Cloudstack detects the physical host to be unhealthy, right? That’s all?

Regards,
Bryan
On 11 Oct 2023 at 7:48 PM +0800, m...@swen.io, wrote:
Hi Bryan,

we are testing the exact same scenario at the moment! :-)

As far as I understand CS has 2 different HA. VM HA and Host HA. When talking about VM HA the VM needs to use an offering with ha is enabled. CS is now checking if the VM is running and if it is not running it will restart or recreate it. You can test this when destroying a vm via virsh destroy on KVM directly. CS will restart this VM.

Host HA only works, as NUX wrote, with NFS-storage at the moment. As far as I know StorPool is developing a new framework so other storages can be used for host ha in the future. I read something on the ccc agenda.

Regards,
Swen

-----Ursprüngliche Nachricht-----
Von: Bryan Tiang <bryantian...@hotmail.com>
Gesendet: Dienstag, 10. Oktober 2023 12:36
An: users@cloudstack.apache.org
Betreff: Cloudstack VM HA

Hi All,

We are setting up Cloudstack + Linbit SDS (via plugin). Hypervisor is Ubuntu.

We are trying to test the VM HA by powering down a physical node at random. However, the VMs doesn’t seem to be failing over to the other nodes.

VM HA is enabled already, is there something we are missing?

Regards,
Bryan


Reply via email to