You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by li jerry <di...@hotmail.com> on 2019/11/24 14:43:53 UTC

VM HA is turned on and off

Hello All

I started VM HA through the calculation scheme.
However, at work, it is sometimes necessary to "temporarily" shut down the HA for testing.
My current practice is to directly modify cloud.ha_enabled=0;

Is there any hidden danger in this operation?


-Jerry


Re: VM HA is turned on and off

Posted by Andrija Panic <an...@gmail.com>.
Hi Li,

if that works for you, then that's all you need. You can always revert the
change back AND test that it works fine (i.e. stop VM and see if ACS will
start it again)

If you have a need to just occasionally stop the VM from inside the OS -
then, assuming you doing some manual work (i.e not automated) - you can
always do as following, without changing the DB:
1. Start the OS shutdown sequence inside the VM
2. Quickly, while OS is still being shut down, request a shutdown via
CloudStack (even if you are late for 1-2 seconds, it should still be good -
the whole idea is to request GUI/API shutdown while ACS still sees the VM
as running, even though it might be stopped already but the hypervisor has
not yet reported that back to mgmt server)

Doing things like that, means ACS will send another ACPI shutdown request
to VM (which OS will actually ignore since it's ALREADY being shut down)
and the VM will be stopped (since you initiated shutdown from inside the
VM), and ACS will see that the VM is stopped, as expected after the API
call.
I have used this sometimes to hack around the HA enabled VMs.


Best
Andrija

On Sun, 24 Nov 2019 at 15:44, li jerry <di...@hotmail.com> wrote:

> Hello All
>
> I started VM HA through the calculation scheme.
> However, at work, it is sometimes necessary to "temporarily" shut down the
> HA for testing.
> My current practice is to directly modify cloud.ha_enabled=0;
>
> Is there any hidden danger in this operation?
>
>
> -Jerry
>
>

-- 

Andrija Panić

Re: VM HA is turned on and off

Posted by Andrija Panic <an...@gmail.com>.
Hi Li,

if that works for you, then that's all you need. You can always revert the
change back AND test that it works fine (i.e. stop VM and see if ACS will
start it again)

If you have a need to just occasionally stop the VM from inside the OS -
then, assuming you doing some manual work (i.e not automated) - you can
always do as following, without changing the DB:
1. Start the OS shutdown sequence inside the VM
2. Quickly, while OS is still being shut down, request a shutdown via
CloudStack (even if you are late for 1-2 seconds, it should still be good -
the whole idea is to request GUI/API shutdown while ACS still sees the VM
as running, even though it might be stopped already but the hypervisor has
not yet reported that back to mgmt server)

Doing things like that, means ACS will send another ACPI shutdown request
to VM (which OS will actually ignore since it's ALREADY being shut down)
and the VM will be stopped (since you initiated shutdown from inside the
VM), and ACS will see that the VM is stopped, as expected after the API
call.
I have used this sometimes to hack around the HA enabled VMs.


Best
Andrija

On Sun, 24 Nov 2019 at 15:44, li jerry <di...@hotmail.com> wrote:

> Hello All
>
> I started VM HA through the calculation scheme.
> However, at work, it is sometimes necessary to "temporarily" shut down the
> HA for testing.
> My current practice is to directly modify cloud.ha_enabled=0;
>
> Is there any hidden danger in this operation?
>
>
> -Jerry
>
>

-- 

Andrija Panić