You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Yiping Zhang <yz...@marketo.com> on 2018/06/06 22:01:47 UTC

How exactly does CloudStack stop a VM?

Hi, all:

We have a few VM instances which will hang when issue a Stop command from CloudStack web UI or thru API calls, due to the app’s own startup/stop script in guest OS was not properly invoked.  The app’s startup/stop script works properly if we issue shutdown/reboot command in guest OS directly.

Hence here is my question:  when CloudStack tries to stop a running VM instance, what is the exact command it sends to VM to stop it, with or without forced flag?  What are the interactions between the CloudStack, the hypervisor and the guest VM?

Yiping

Re: How exactly does CloudStack stop a VM?

Posted by Suresh Kumar Anaparti <su...@gmail.com>.
Hi Zhang,

Cloudstack would usually trigger a hypervisor level shutdown cmd for the
guest OS to stop the the guest VM. In case of XenServer, a XAPI command for
shutdown VM is sent from Cloudstack. Attempted for hard shutdown if force
flag is set, else a clean shutdown and if the shutdown operations fails in
any case, hard shutdown the VM. The force flag is false by default and set
to true in some cases. What is your case where Cloudstack is shutting down
guest VMs?

-Suresh

On Thu, Jun 7, 2018 at 5:22 AM, Yiping Zhang <yz...@marketo.com> wrote:

> Our VM instances do have xentools installed, though still at 6.2 version,
> whereas our hypervisors have been upgraded to XenServer 6.5 since the VM
> instances were created
>
>
> On 6/6/18, 4:20 PM, "Jean-Francois Nadeau" <th...@gmail.com>
> wrote:
>
>     If the xentools are installed and running in the guest OS it should
> detect
>     the shutdown sent via XAPI.
>
>     On Wed, Jun 6, 2018 at 6:58 PM, Yiping Zhang <yz...@marketo.com>
> wrote:
>
>     > We are using XenServers with our CloudStack instances.
>     >
>     > On 6/6/18, 3:11 PM, "Jean-Francois Nadeau" <th...@gmail.com>
>     > wrote:
>     >
>     >     On KVM,  AFAIK the shutdown is the equivalent of pressing the
> power
>     >     button.  To get the Linux OS to catch this and initiate a clean
>     > shutdown,
>     >     you need the ACPID service running in the guest OS.
>     >
>     >     On Wed, Jun 6, 2018 at 6:01 PM, Yiping Zhang <yzhang@marketo.com
> >
>     > wrote:
>     >
>     >     > Hi, all:
>     >     >
>     >     > We have a few VM instances which will hang when issue a Stop
> command
>     > from
>     >     > CloudStack web UI or thru API calls, due to the app’s own
>     > startup/stop
>     >     > script in guest OS was not properly invoked.  The app’s
> startup/stop
>     > script
>     >     > works properly if we issue shutdown/reboot command in guest OS
>     > directly.
>     >     >
>     >     > Hence here is my question:  when CloudStack tries to stop a
> running
>     > VM
>     >     > instance, what is the exact command it sends to VM to stop it,
> with
>     > or
>     >     > without forced flag?  What are the interactions between the
>     > CloudStack, the
>     >     > hypervisor and the guest VM?
>     >     >
>     >     > Yiping
>     >     >
>     >
>     >
>     >
>
>
>

Re: How exactly does CloudStack stop a VM?

Posted by Yiping Zhang <yz...@marketo.com>.
Our VM instances do have xentools installed, though still at 6.2 version, whereas our hypervisors have been upgraded to XenServer 6.5 since the VM instances were created


On 6/6/18, 4:20 PM, "Jean-Francois Nadeau" <th...@gmail.com> wrote:

    If the xentools are installed and running in the guest OS it should detect
    the shutdown sent via XAPI.
    
    On Wed, Jun 6, 2018 at 6:58 PM, Yiping Zhang <yz...@marketo.com> wrote:
    
    > We are using XenServers with our CloudStack instances.
    >
    > On 6/6/18, 3:11 PM, "Jean-Francois Nadeau" <th...@gmail.com>
    > wrote:
    >
    >     On KVM,  AFAIK the shutdown is the equivalent of pressing the power
    >     button.  To get the Linux OS to catch this and initiate a clean
    > shutdown,
    >     you need the ACPID service running in the guest OS.
    >
    >     On Wed, Jun 6, 2018 at 6:01 PM, Yiping Zhang <yz...@marketo.com>
    > wrote:
    >
    >     > Hi, all:
    >     >
    >     > We have a few VM instances which will hang when issue a Stop command
    > from
    >     > CloudStack web UI or thru API calls, due to the app’s own
    > startup/stop
    >     > script in guest OS was not properly invoked.  The app’s startup/stop
    > script
    >     > works properly if we issue shutdown/reboot command in guest OS
    > directly.
    >     >
    >     > Hence here is my question:  when CloudStack tries to stop a running
    > VM
    >     > instance, what is the exact command it sends to VM to stop it, with
    > or
    >     > without forced flag?  What are the interactions between the
    > CloudStack, the
    >     > hypervisor and the guest VM?
    >     >
    >     > Yiping
    >     >
    >
    >
    >
    


Re: How exactly does CloudStack stop a VM?

Posted by Jean-Francois Nadeau <th...@gmail.com>.
If the xentools are installed and running in the guest OS it should detect
the shutdown sent via XAPI.

On Wed, Jun 6, 2018 at 6:58 PM, Yiping Zhang <yz...@marketo.com> wrote:

> We are using XenServers with our CloudStack instances.
>
> On 6/6/18, 3:11 PM, "Jean-Francois Nadeau" <th...@gmail.com>
> wrote:
>
>     On KVM,  AFAIK the shutdown is the equivalent of pressing the power
>     button.  To get the Linux OS to catch this and initiate a clean
> shutdown,
>     you need the ACPID service running in the guest OS.
>
>     On Wed, Jun 6, 2018 at 6:01 PM, Yiping Zhang <yz...@marketo.com>
> wrote:
>
>     > Hi, all:
>     >
>     > We have a few VM instances which will hang when issue a Stop command
> from
>     > CloudStack web UI or thru API calls, due to the app’s own
> startup/stop
>     > script in guest OS was not properly invoked.  The app’s startup/stop
> script
>     > works properly if we issue shutdown/reboot command in guest OS
> directly.
>     >
>     > Hence here is my question:  when CloudStack tries to stop a running
> VM
>     > instance, what is the exact command it sends to VM to stop it, with
> or
>     > without forced flag?  What are the interactions between the
> CloudStack, the
>     > hypervisor and the guest VM?
>     >
>     > Yiping
>     >
>
>
>

Re: How exactly does CloudStack stop a VM?

Posted by Yiping Zhang <yz...@marketo.com>.
We are using XenServers with our CloudStack instances.

On 6/6/18, 3:11 PM, "Jean-Francois Nadeau" <th...@gmail.com> wrote:

    On KVM,  AFAIK the shutdown is the equivalent of pressing the power
    button.  To get the Linux OS to catch this and initiate a clean shutdown,
    you need the ACPID service running in the guest OS.
    
    On Wed, Jun 6, 2018 at 6:01 PM, Yiping Zhang <yz...@marketo.com> wrote:
    
    > Hi, all:
    >
    > We have a few VM instances which will hang when issue a Stop command from
    > CloudStack web UI or thru API calls, due to the app’s own startup/stop
    > script in guest OS was not properly invoked.  The app’s startup/stop script
    > works properly if we issue shutdown/reboot command in guest OS directly.
    >
    > Hence here is my question:  when CloudStack tries to stop a running VM
    > instance, what is the exact command it sends to VM to stop it, with or
    > without forced flag?  What are the interactions between the CloudStack, the
    > hypervisor and the guest VM?
    >
    > Yiping
    >
    


Re: How exactly does CloudStack stop a VM?

Posted by Jean-Francois Nadeau <th...@gmail.com>.
On KVM,  AFAIK the shutdown is the equivalent of pressing the power
button.  To get the Linux OS to catch this and initiate a clean shutdown,
you need the ACPID service running in the guest OS.

On Wed, Jun 6, 2018 at 6:01 PM, Yiping Zhang <yz...@marketo.com> wrote:

> Hi, all:
>
> We have a few VM instances which will hang when issue a Stop command from
> CloudStack web UI or thru API calls, due to the app’s own startup/stop
> script in guest OS was not properly invoked.  The app’s startup/stop script
> works properly if we issue shutdown/reboot command in guest OS directly.
>
> Hence here is my question:  when CloudStack tries to stop a running VM
> instance, what is the exact command it sends to VM to stop it, with or
> without forced flag?  What are the interactions between the CloudStack, the
> hypervisor and the guest VM?
>
> Yiping
>