[one-users] Avoiding manual restart of (peristent) VMs in case of host reboot

Jaime Melis jmelis at opennebula.org
Wed May 23 07:09:20 PDT 2012


Hello Olivier,

Very good question!

You could do two things:
1) Write a hook [1] on the event of running vm to do "virsh autostart
one-<VM_ID>" [2]
2) Add a line in the deployment script [3] to execute "virsh autostart
one-<VM_ID>" ( after line 29 of the script for example)

[1] http://libvirt.org/sources/virshcmdref/html/sect-autostart.html
[2]
http://opennebula.org/documentation:rel3.4:hooks#hooks_for_virtualmachines
[3]
https://github.com/OpenNebula/one/blob/one-3.2/src/vmm_mad/remotes/kvm/deploy#L29

BTW, thanks a lot for all your valuable feedback!!

Cheers,
Jaime

On Fri, May 18, 2012 at 9:37 PM, Olivier Berger <
olivier.berger at it-sudparis.eu> wrote:

> Hi.
>
> I'd like to make sure that (kvm) VMs running on hosts get restarted
> whenever
> hosts are rebooted.
>
> Is there such a setting somewhere ?
>
> If I understand correctly, VMs with "persistent" images (on a shared
> file system) won't suffer too much of a host restart in principle : the
> disk image is kept intact, normally (although I'm not sure how too fast
> the shutting down of kvm VMs is performed for running services inside
> the VMs : no proper close of files, cache dumps, etc.)
>
> But when the host is restarted, the VMs stay in unknown state and I have
> to restart them manually.
>
> Would there be a chance this can be done automatically, or better, they
> are suspended upon shutdown of the host and resumed when it restarts ?
>
> Sorry if this is a FAQ, but I couldn't spot the response, and I plee
> guilty in advance of not having all read the (very prolific and) very
> good documentation.
>
> Many thanks in advance.
>
> P.S. I'm running 3.2.1 from Debian wheezy
> --
> Olivier BERGER
> http://www-public.it-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
> Ingenieur Recherche - Dept INF
> Institut Mines-Telecom, Telecom SudParis, Evry (France)
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Jaime Melis
Project Engineer
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | jmelis at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120523/5ffbc606/attachment-0002.htm>


More information about the Users mailing list