Hello Olivier,<div><br></div><div>Very good question!</div><div><br></div><div>You could do two things:</div><div>1) Write a hook [1] on the event of running vm to do "virsh autostart one-<VM_ID>" [2]</div>

<div>2) Add a line in the deployment script [3] to execute "virsh autostart one-<VM_ID>" ( after line 29 of the script for example)</div><div><br></div><div>[1] <a href="http://libvirt.org/sources/virshcmdref/html/sect-autostart.html">http://libvirt.org/sources/virshcmdref/html/sect-autostart.html</a></div>

<div>[2] <a href="http://opennebula.org/documentation:rel3.4:hooks#hooks_for_virtualmachines">http://opennebula.org/documentation:rel3.4:hooks#hooks_for_virtualmachines</a></div><div>[3] <a href="https://github.com/OpenNebula/one/blob/one-3.2/src/vmm_mad/remotes/kvm/deploy#L29">https://github.com/OpenNebula/one/blob/one-3.2/src/vmm_mad/remotes/kvm/deploy#L29</a><br>

<br>BTW, thanks a lot for all your valuable feedback!!</div><div><br>Cheers,</div><div>Jaime<br><br><div class="gmail_quote">On Fri, May 18, 2012 at 9:37 PM, Olivier Berger <span dir="ltr"><<a href="mailto:olivier.berger@it-sudparis.eu" target="_blank">olivier.berger@it-sudparis.eu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi.<br>
<br>
I'd like to make sure that (kvm) VMs running on hosts get restarted whenever<br>
hosts are rebooted.<br>
<br>
Is there such a setting somewhere ?<br>
<br>
If I understand correctly, VMs with "persistent" images (on a shared<br>
file system) won't suffer too much of a host restart in principle : the<br>
disk image is kept intact, normally (although I'm not sure how too fast<br>
the shutting down of kvm VMs is performed for running services inside<br>
the VMs : no proper close of files, cache dumps, etc.)<br>
<br>
But when the host is restarted, the VMs stay in unknown state and I have<br>
to restart them manually.<br>
<br>
Would there be a chance this can be done automatically, or better, they<br>
are suspended upon shutdown of the host and resumed when it restarts ?<br>
<br>
Sorry if this is a FAQ, but I couldn't spot the response, and I plee<br>
guilty in advance of not having all read the (very prolific and) very<br>
good documentation.<br>
<br>
Many thanks in advance.<br>
<br>
P.S. I'm running 3.2.1 from Debian wheezy<br>
<span class="HOEnZb"><font color="#888888">--<br>
Olivier BERGER<br>
<a href="http://www-public.it-sudparis.eu/~berger_o/" target="_blank">http://www-public.it-sudparis.eu/~berger_o/</a> - OpenPGP-Id: 2048R/5819D7E8<br>
Ingenieur Recherche - Dept INF<br>
Institut Mines-Telecom, Telecom SudParis, Evry (France)<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</font></span></blockquote></div><br></div><br clear="all"><div><br></div>-- <br>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a><br>