You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Asai <as...@globalchangemusic.org> on 2018/08/15 02:38:08 UTC

Autostarting VMs on KVM?

Greetings,

Can anyone offer advice on how to autostart VMs at boot time using KVM?  There doesn’t seem to be any documentation for this in the CS docs.  We’re on CS 4.9.2.0.

I tried doing it with virsh autostart, but it just throws an error.

Thank you,
Asai

Re: Autostarting VMs on KVM?

Posted by Asai <as...@globalchangemusic.org>.
Thank you, Makrand.

On 8/27/2018 11:11 AM, Makrand wrote:
> Hi Asai,
>
> The Server offering with HA enabled will do trick. While launching the VM
> just choose this SO. In case your previous SO was not ha enabled (and thus
> VM) you can actually change the SO and relaunch VM. Just test it before on
> one of the VMs.
>
> The VMs with HA enabled will come back on its own once the standalone host
> comes back online (Assuming VMs went down abruptly while host went down and
> not shutdown manually)
>
> Note- By default, all virtual router VMs and Elastic Load Balancing VMs are
> automatically configured as HA-enabled.
>
> --
> Makrand
>
>
> On Thu, Aug 16, 2018 at 2:41 AM, Asai <as...@globalchangemusic.org> wrote:
>
>> Thanks, Eric,
>>
>> Do they have to be already created as HA instances?  Can you turn on HA
>> after the fact?
>>
>> Also, what if it’s only one standalone server with no failover?
>>
>> Asai
>>
>>
>>> On Aug 15, 2018, at 1:39 PM, Eric Lee Green <er...@gmail.com>
>> wrote:
>>> If you set the offering to allow HA and create the instances as HA
>> instances, they will autostart once the management server figures out
>> they're really dead (either because it used STONITH to kill the unreachable
>> node, or because that node became reachable again). When I had to reboot my
>> cluster due to a massive network failure (critical 10 gigabit switch
>> croaked, had to slide a new one in), all the instances marked "HA" came
>> back up all by themselves without me having to do anything about it.
>>> On 8/15/18 09:11, Asai wrote:
>>>> Thanks, Dag,
>>>>
>>>> Looks like scripting it is the way to go.
>>>> Asai
>>>>
>>>>
>>>>> On Aug 15, 2018, at 9:06 AM, Dag Sonstebo <Da...@shapeblue.com>
>> wrote:
>>>>> Hi Asai,
>>>>>
>>>>> In short – no that is not a use case CloudStack is designed for, the
>> VM states are controlled by CloudStack management. You should however look
>> at using HA service offerings and host HA (if you meet all the
>> pre-requisites). Between these mechanisms VMs can be brought up on other
>> hosts if a host goes down.
>>>>> Alternatively if you are looking to trigger an automated startup of
>> VMs I suggest you simply script this with e.g. cloudmonkey. Keep in mind
>> this still requires a healthy management server though.
>>>>> Regards,
>>>>> Dag Sonstebo
>>>>> Cloud Architect
>>>>> ShapeBlue
>>>>>
>>>>> On 15/08/2018, 16:47, "Asai" <as...@globalchangemusic.org> wrote:
>>>>>
>>>>>     Thanks, Dag,
>>>>>
>>>>>     On boot of the server, I would like the VMs to start up
>> automatically, rather than me having to go to the management console and
>> start them manually.  We suffered some downtime and in restarting the
>> hardware, I had to manually get everything back up and running.
>>>>>     Asai
>>>>>
>>>>>
>>>>>
>>>>> Dag.Sonstebo@shapeblue.com
>>>>> www.shapeblue.com
>>>>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
>>>>> @shapeblue
>>>>>
>>>>>
>>>>>
>>>>>> On Aug 15, 2018, at 1:22 AM, Dag Sonstebo <Da...@shapeblue.com>
>> wrote:
>>>>>> Hi Asai,
>>>>>>
>>>>>> Can you explain a bit more what you are trying to achieve? Everything
>> in CloudStack is controlled by the management server, not the KVM host, and
>> in general the assumption is a KVM host is always online.
>>>>>> Regards,
>>>>>> Dag Sonstebo
>>>>>> Cloud Architect
>>>>>> ShapeBlue
>>>>>>
>>>>>> On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:
>>>>>>
>>>>>>    Greetings,
>>>>>>
>>>>>>    Can anyone offer advice on how to autostart VMs at boot time using
>> KVM?  There doesn’t seem to be any documentation for this in the CS docs.
>> We’re on CS 4.9.2.0.
>>>>>>    I tried doing it with virsh autostart, but it just throws an error.
>>>>>>
>>>>>>    Thank you,
>>>>>>    Asai
>>>>>>
>>>>>>
>>>>>>
>>>>>> Dag.Sonstebo@shapeblue.com
>>>>>> www.shapeblue.com
>>>>>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
>>>>>> @shapeblue
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>

Re: Autostarting VMs on KVM?

Posted by Makrand <ma...@gmail.com>.
Hi Asai,

The Server offering with HA enabled will do trick. While launching the VM
just choose this SO. In case your previous SO was not ha enabled (and thus
VM) you can actually change the SO and relaunch VM. Just test it before on
one of the VMs.

The VMs with HA enabled will come back on its own once the standalone host
comes back online (Assuming VMs went down abruptly while host went down and
not shutdown manually)

Note- By default, all virtual router VMs and Elastic Load Balancing VMs are
automatically configured as HA-enabled.

--
Makrand


On Thu, Aug 16, 2018 at 2:41 AM, Asai <as...@globalchangemusic.org> wrote:

> Thanks, Eric,
>
> Do they have to be already created as HA instances?  Can you turn on HA
> after the fact?
>
> Also, what if it’s only one standalone server with no failover?
>
> Asai
>
>
> > On Aug 15, 2018, at 1:39 PM, Eric Lee Green <er...@gmail.com>
> wrote:
> >
> > If you set the offering to allow HA and create the instances as HA
> instances, they will autostart once the management server figures out
> they're really dead (either because it used STONITH to kill the unreachable
> node, or because that node became reachable again). When I had to reboot my
> cluster due to a massive network failure (critical 10 gigabit switch
> croaked, had to slide a new one in), all the instances marked "HA" came
> back up all by themselves without me having to do anything about it.
> >
> > On 8/15/18 09:11, Asai wrote:
> >> Thanks, Dag,
> >>
> >> Looks like scripting it is the way to go.
> >> Asai
> >>
> >>
> >>> On Aug 15, 2018, at 9:06 AM, Dag Sonstebo <Da...@shapeblue.com>
> wrote:
> >>>
> >>> Hi Asai,
> >>>
> >>> In short – no that is not a use case CloudStack is designed for, the
> VM states are controlled by CloudStack management. You should however look
> at using HA service offerings and host HA (if you meet all the
> pre-requisites). Between these mechanisms VMs can be brought up on other
> hosts if a host goes down.
> >>>
> >>> Alternatively if you are looking to trigger an automated startup of
> VMs I suggest you simply script this with e.g. cloudmonkey. Keep in mind
> this still requires a healthy management server though.
> >>>
> >>> Regards,
> >>> Dag Sonstebo
> >>> Cloud Architect
> >>> ShapeBlue
> >>>
> >>> On 15/08/2018, 16:47, "Asai" <as...@globalchangemusic.org> wrote:
> >>>
> >>>    Thanks, Dag,
> >>>
> >>>    On boot of the server, I would like the VMs to start up
> automatically, rather than me having to go to the management console and
> start them manually.  We suffered some downtime and in restarting the
> hardware, I had to manually get everything back up and running.
> >>>    Asai
> >>>
> >>>
> >>>
> >>> Dag.Sonstebo@shapeblue.com
> >>> www.shapeblue.com
> >>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> >>> @shapeblue
> >>>
> >>>
> >>>
> >>>> On Aug 15, 2018, at 1:22 AM, Dag Sonstebo <Da...@shapeblue.com>
> wrote:
> >>>>
> >>>> Hi Asai,
> >>>>
> >>>> Can you explain a bit more what you are trying to achieve? Everything
> in CloudStack is controlled by the management server, not the KVM host, and
> in general the assumption is a KVM host is always online.
> >>>>
> >>>> Regards,
> >>>> Dag Sonstebo
> >>>> Cloud Architect
> >>>> ShapeBlue
> >>>>
> >>>> On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:
> >>>>
> >>>>   Greetings,
> >>>>
> >>>>   Can anyone offer advice on how to autostart VMs at boot time using
> KVM?  There doesn’t seem to be any documentation for this in the CS docs.
> We’re on CS 4.9.2.0.
> >>>>
> >>>>   I tried doing it with virsh autostart, but it just throws an error.
> >>>>
> >>>>   Thank you,
> >>>>   Asai
> >>>>
> >>>>
> >>>>
> >>>> Dag.Sonstebo@shapeblue.com
> >>>> www.shapeblue.com
> >>>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> >>>> @shapeblue
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >
>
>

Re: Autostarting VMs on KVM?

Posted by Asai <as...@globalchangemusic.org>.
Thanks, Eric,

Do they have to be already created as HA instances?  Can you turn on HA after the fact?

Also, what if it’s only one standalone server with no failover?

Asai


> On Aug 15, 2018, at 1:39 PM, Eric Lee Green <er...@gmail.com> wrote:
> 
> If you set the offering to allow HA and create the instances as HA instances, they will autostart once the management server figures out they're really dead (either because it used STONITH to kill the unreachable node, or because that node became reachable again). When I had to reboot my cluster due to a massive network failure (critical 10 gigabit switch croaked, had to slide a new one in), all the instances marked "HA" came back up all by themselves without me having to do anything about it.
> 
> On 8/15/18 09:11, Asai wrote:
>> Thanks, Dag,
>> 
>> Looks like scripting it is the way to go.
>> Asai
>> 
>> 
>>> On Aug 15, 2018, at 9:06 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
>>> 
>>> Hi Asai,
>>> 
>>> In short – no that is not a use case CloudStack is designed for, the VM states are controlled by CloudStack management. You should however look at using HA service offerings and host HA (if you meet all the pre-requisites). Between these mechanisms VMs can be brought up on other hosts if a host goes down.
>>> 
>>> Alternatively if you are looking to trigger an automated startup of VMs I suggest you simply script this with e.g. cloudmonkey. Keep in mind this still requires a healthy management server though.
>>> 
>>> Regards,
>>> Dag Sonstebo
>>> Cloud Architect
>>> ShapeBlue
>>> 
>>> On 15/08/2018, 16:47, "Asai" <as...@globalchangemusic.org> wrote:
>>> 
>>>    Thanks, Dag,
>>> 
>>>    On boot of the server, I would like the VMs to start up automatically, rather than me having to go to the management console and start them manually.  We suffered some downtime and in restarting the hardware, I had to manually get everything back up and running.
>>>    Asai
>>> 
>>> 
>>> 
>>> Dag.Sonstebo@shapeblue.com
>>> www.shapeblue.com
>>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
>>> @shapeblue
>>> 
>>> 
>>> 
>>>> On Aug 15, 2018, at 1:22 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
>>>> 
>>>> Hi Asai,
>>>> 
>>>> Can you explain a bit more what you are trying to achieve? Everything in CloudStack is controlled by the management server, not the KVM host, and in general the assumption is a KVM host is always online.
>>>> 
>>>> Regards,
>>>> Dag Sonstebo
>>>> Cloud Architect
>>>> ShapeBlue
>>>> 
>>>> On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:
>>>> 
>>>>   Greetings,
>>>> 
>>>>   Can anyone offer advice on how to autostart VMs at boot time using KVM?  There doesn’t seem to be any documentation for this in the CS docs.  We’re on CS 4.9.2.0.
>>>> 
>>>>   I tried doing it with virsh autostart, but it just throws an error.
>>>> 
>>>>   Thank you,
>>>>   Asai
>>>> 
>>>> 
>>>> 
>>>> Dag.Sonstebo@shapeblue.com
>>>> www.shapeblue.com
>>>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
>>>> @shapeblue
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
> 


Re: Autostarting VMs on KVM?

Posted by Eric Lee Green <er...@gmail.com>.
If you set the offering to allow HA and create the instances as HA 
instances, they will autostart once the management server figures out 
they're really dead (either because it used STONITH to kill the 
unreachable node, or because that node became reachable again). When I 
had to reboot my cluster due to a massive network failure (critical 10 
gigabit switch croaked, had to slide a new one in), all the instances 
marked "HA" came back up all by themselves without me having to do 
anything about it.

On 8/15/18 09:11, Asai wrote:
> Thanks, Dag,
>
> Looks like scripting it is the way to go.
> Asai
>
>
>> On Aug 15, 2018, at 9:06 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
>>
>> Hi Asai,
>>
>> In short – no that is not a use case CloudStack is designed for, the VM states are controlled by CloudStack management. You should however look at using HA service offerings and host HA (if you meet all the pre-requisites). Between these mechanisms VMs can be brought up on other hosts if a host goes down.
>>
>> Alternatively if you are looking to trigger an automated startup of VMs I suggest you simply script this with e.g. cloudmonkey. Keep in mind this still requires a healthy management server though.
>>
>> Regards,
>> Dag Sonstebo
>> Cloud Architect
>> ShapeBlue
>>
>> On 15/08/2018, 16:47, "Asai" <as...@globalchangemusic.org> wrote:
>>
>>     Thanks, Dag,
>>
>>     On boot of the server, I would like the VMs to start up automatically, rather than me having to go to the management console and start them manually.  We suffered some downtime and in restarting the hardware, I had to manually get everything back up and running.
>>     Asai
>>
>>
>>
>> Dag.Sonstebo@shapeblue.com
>> www.shapeblue.com
>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
>> @shapeblue
>>
>>
>>
>>> On Aug 15, 2018, at 1:22 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
>>>
>>> Hi Asai,
>>>
>>> Can you explain a bit more what you are trying to achieve? Everything in CloudStack is controlled by the management server, not the KVM host, and in general the assumption is a KVM host is always online.
>>>
>>> Regards,
>>> Dag Sonstebo
>>> Cloud Architect
>>> ShapeBlue
>>>
>>> On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:
>>>
>>>    Greetings,
>>>
>>>    Can anyone offer advice on how to autostart VMs at boot time using KVM?  There doesn’t seem to be any documentation for this in the CS docs.  We’re on CS 4.9.2.0.
>>>
>>>    I tried doing it with virsh autostart, but it just throws an error.
>>>
>>>    Thank you,
>>>    Asai
>>>
>>>
>>>
>>> Dag.Sonstebo@shapeblue.com
>>> www.shapeblue.com
>>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
>>> @shapeblue
>>>
>>>
>>>
>>
>>
>


Re: Autostarting VMs on KVM?

Posted by Asai <as...@globalchangemusic.org>.
Thanks, Dag,

Looks like scripting it is the way to go.
Asai


> On Aug 15, 2018, at 9:06 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
> 
> Hi Asai,
> 
> In short – no that is not a use case CloudStack is designed for, the VM states are controlled by CloudStack management. You should however look at using HA service offerings and host HA (if you meet all the pre-requisites). Between these mechanisms VMs can be brought up on other hosts if a host goes down. 
> 
> Alternatively if you are looking to trigger an automated startup of VMs I suggest you simply script this with e.g. cloudmonkey. Keep in mind this still requires a healthy management server though.
> 
> Regards,
> Dag Sonstebo
> Cloud Architect
> ShapeBlue
> 
> On 15/08/2018, 16:47, "Asai" <as...@globalchangemusic.org> wrote:
> 
>    Thanks, Dag,
> 
>    On boot of the server, I would like the VMs to start up automatically, rather than me having to go to the management console and start them manually.  We suffered some downtime and in restarting the hardware, I had to manually get everything back up and running.
>    Asai
> 
> 
> 
> Dag.Sonstebo@shapeblue.com 
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
> 
> 
> 
>> On Aug 15, 2018, at 1:22 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
>> 
>> Hi Asai,
>> 
>> Can you explain a bit more what you are trying to achieve? Everything in CloudStack is controlled by the management server, not the KVM host, and in general the assumption is a KVM host is always online. 
>> 
>> Regards,
>> Dag Sonstebo
>> Cloud Architect
>> ShapeBlue
>> 
>> On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:
>> 
>>   Greetings,
>> 
>>   Can anyone offer advice on how to autostart VMs at boot time using KVM?  There doesn’t seem to be any documentation for this in the CS docs.  We’re on CS 4.9.2.0.
>> 
>>   I tried doing it with virsh autostart, but it just throws an error.
>> 
>>   Thank you,
>>   Asai
>> 
>> 
>> 
>> Dag.Sonstebo@shapeblue.com 
>> www.shapeblue.com
>> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
>> @shapeblue
>> 
>> 
>> 
> 
> 
> 


Re: Autostarting VMs on KVM?

Posted by Dag Sonstebo <Da...@shapeblue.com>.
Hi Asai,

In short – no that is not a use case CloudStack is designed for, the VM states are controlled by CloudStack management. You should however look at using HA service offerings and host HA (if you meet all the pre-requisites). Between these mechanisms VMs can be brought up on other hosts if a host goes down. 

Alternatively if you are looking to trigger an automated startup of VMs I suggest you simply script this with e.g. cloudmonkey. Keep in mind this still requires a healthy management server though.

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 15/08/2018, 16:47, "Asai" <as...@globalchangemusic.org> wrote:

    Thanks, Dag,
    
    On boot of the server, I would like the VMs to start up automatically, rather than me having to go to the management console and start them manually.  We suffered some downtime and in restarting the hardware, I had to manually get everything back up and running.
    Asai
    
    
    
Dag.Sonstebo@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 

> On Aug 15, 2018, at 1:22 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
    > 
    > Hi Asai,
    > 
    > Can you explain a bit more what you are trying to achieve? Everything in CloudStack is controlled by the management server, not the KVM host, and in general the assumption is a KVM host is always online. 
    > 
    > Regards,
    > Dag Sonstebo
    > Cloud Architect
    > ShapeBlue
    > 
    > On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:
    > 
    >    Greetings,
    > 
    >    Can anyone offer advice on how to autostart VMs at boot time using KVM?  There doesn’t seem to be any documentation for this in the CS docs.  We’re on CS 4.9.2.0.
    > 
    >    I tried doing it with virsh autostart, but it just throws an error.
    > 
    >    Thank you,
    >    Asai
    > 
    > 
    > 
    > Dag.Sonstebo@shapeblue.com 
    > www.shapeblue.com
    > 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
    > @shapeblue
    > 
    > 
    > 
    
    


Re: Autostarting VMs on KVM?

Posted by Asai <as...@globalchangemusic.org>.
Thanks, Dag,

On boot of the server, I would like the VMs to start up automatically, rather than me having to go to the management console and start them manually.  We suffered some downtime and in restarting the hardware, I had to manually get everything back up and running.
Asai


> On Aug 15, 2018, at 1:22 AM, Dag Sonstebo <Da...@shapeblue.com> wrote:
> 
> Hi Asai,
> 
> Can you explain a bit more what you are trying to achieve? Everything in CloudStack is controlled by the management server, not the KVM host, and in general the assumption is a KVM host is always online. 
> 
> Regards,
> Dag Sonstebo
> Cloud Architect
> ShapeBlue
> 
> On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:
> 
>    Greetings,
> 
>    Can anyone offer advice on how to autostart VMs at boot time using KVM?  There doesn’t seem to be any documentation for this in the CS docs.  We’re on CS 4.9.2.0.
> 
>    I tried doing it with virsh autostart, but it just throws an error.
> 
>    Thank you,
>    Asai
> 
> 
> 
> Dag.Sonstebo@shapeblue.com 
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
> 
> 
> 


Re: Autostarting VMs on KVM?

Posted by Dag Sonstebo <Da...@shapeblue.com>.
Hi Asai,

Can you explain a bit more what you are trying to achieve? Everything in CloudStack is controlled by the management server, not the KVM host, and in general the assumption is a KVM host is always online. 

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 15/08/2018, 03:38, "Asai" <as...@globalchangemusic.org> wrote:

    Greetings,
    
    Can anyone offer advice on how to autostart VMs at boot time using KVM?  There doesn’t seem to be any documentation for this in the CS docs.  We’re on CS 4.9.2.0.
    
    I tried doing it with virsh autostart, but it just throws an error.
    
    Thank you,
    Asai
    


Dag.Sonstebo@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue