[ovirt-users] Automatically migrate VM between hosts in the same cluster

Alex Crow acrow at integrafin.co.uk
Fri Sep 18 08:44:20 UTC 2015



On 18/09/15 07:59, Luca Bertoncello wrote:
> Hi Alex
>
>> 2) My question was: "what can I do, so that in case of Kernel Panic or similar, the VM will be migrated (live or not) to another host?"
>>
>> You would make the VMs HA and acquire a fencing solution.
> What do you mean now? Have two VM and build a cluster? This is not what we want...
> If it's possible, I'd like to have more Host AS CLUSTER with migration of the VM between the nodes...
> I think oVirt already do that, since I have to create Clusters. For me a Cluster is not just "more nodes with the same CPU", but also something with load balancing or high availability...

No, use the built in HA in Ovirt. Which requires a fencing solution. 
This means that if a host goes down the VMs on it will autostart on 
another host in the cluster. Yes, it's a cluster of *hosts*. In fact in 
the Ovirt Interface you can see "clusters" in the tree view!

We use the built in Ovirt HA for >200 VMs over 6 hosts and it works just 
fine. We lost a host fairly recently and only a couple of people (out of 
over 300) who use the services of a single VM noticed.

Ovirt also supports balancing the VM load across hosts. That is part of 
the cluster policy. You can also set affinity and anti-affinity of VMs. 
You can also have hosts actually migrate off VMs when they are idle and 
the host to power down to save on your electricity bill. When load on 
other hosts reaches a limit, the host will be powered back on and VMs 
will start migrating to it.

>> 3) I'd like to have a shutdown-script on the host that put the host in Maintenance and wait until it's done, so that I can just shutdown or reboot it without any other action. Is it possible? It would help to manage the power
>   > failure, too, assuming that other hosts have better UPS (it can be possible.)
>> You could probably use the REST API on the Ovirt Engine for that.But it might be better to have a highly available machine (VM or not) running something like Nagios or Icinga which would perform the monitoring of your
>>   hosts and connect to the REST API to perform maintenance and shutdown. You might also consider a UPS service like NUT (unless you're already doing it).
> Well, I already use NUT and we have Icinga monitoring the hosts.
> But I can't understand what you mean and (more important!) how can I do it...
>
> I checked the REST API and the CLI. I can write a little script to put an host in Maintenance or active it again, that's not the problem.
> The problem is to have somewhat starting this script automatically...
>
> Any suggestion? Icinga will not be the solution, since it checks the host every 5 minutes or so, but we need to have this script started in seconds...
>
> Thanks
>
> Mit freundlichen Grüßen
>
> Luca Bertoncello

The rest is out of scope of Ovirt. Icinga was just a suggestion. You 
don't have to use it - but you can change the check interval for a check 
to whatever you want. I was just stating that you should be wary of 
running your checks/scripts from a host if what you are trying to 
trigger on is that host going down or having issues.

And if 5 minutes is too long maybe you need a bigger UPS? We have 1 hour 
battery runtime on ours at the moment (think it's a 160kVA central UPS 
offhand).

Alex
>

-- 
This message is intended only for the addressee and may contain
confidential information. Unless you are that person, you may not
disclose its contents or use it in any way and are requested to delete
the message along with any attachments and notify us immediately.
"Transact" is operated by Integrated Financial Arrangements plc. 29
Clement's Lane, London EC4N 7AE. Tel: (020) 7608 4900 Fax: (020) 7608
5300. (Registered office: as above; Registered in England and Wales
under number: 3727592). Authorised and regulated by the Financial
Conduct Authority (entered on the Financial Services Register; no. 190856).

 .




More information about the Users mailing list