Hi Richard,<br><br>The template you propose looks fine, but let me make a couple of comments.<br><br>Instead of 'source' and 'save' for DISC, you should use the Image repository, and take advantage of the persistent flag [1] to make sure the contents are saved. <br>
This way you can forget about the 'save', 'clone' and 'readonly' attributes.<br><br>And just in case, when you say "to ensure it keeps its state between restarts", keep in mind that a onevm shutdown command will save the disk, but not the VM state (RAM).<br>
If that's what you need, take a look at the suspend and cancel commands [2].<br><br>Please also note that onevm restart will not start over the life cycle of a VM, it is a way to resubmit the booting command to the hypervisor in cases when the VM gets stuck in the BOOT state.<br>
To continue the execution of a VM you previously shut down, you have to create a new VM instance from the same template file.<br><br><br>Best regards,<br>Carlos.<br><br>[1] <a href="http://opennebula.org/documentation:rel2.2:img_guide#making_images_persistent">http://opennebula.org/documentation:rel2.2:img_guide#making_images_persistent</a><br>
[2] <a href="http://opennebula.org/documentation:rel2.2:vm_guide#virtual_machine_life-cycle">http://opennebula.org/documentation:rel2.2:vm_guide#virtual_machine_life-cycle</a><br><br clear="all"><span style="border-collapse:collapse;color:rgb(136, 136, 136);font-family:arial, sans-serif;font-size:13px">--<br>
Carlos Martín, MSc<br>Project Major Contributor<br><span style="background-color:rgb(255, 255, 204);color:rgb(34, 34, 34);background-repeat:initial initial">OpenNebula</span> - The Open Source Toolkit for Cloud Computing<br>
<a href="http://www.opennebula.org/" style="color:rgb(42, 93, 176)" target="_blank">www.<span style="background-color:rgb(255, 255, 204);color:rgb(34, 34, 34);background-repeat:initial initial">OpenNebula</span>.org</a> | <a href="mailto:cmartin@opennebula.org" style="color:rgb(42, 93, 176)" target="_blank">cmartin@<span style="background-color:rgb(255, 255, 204);color:rgb(34, 34, 34);background-repeat:initial initial">opennebula</span>.org</a></span><br>
<br><br><div class="gmail_quote">On Mon, Jun 27, 2011 at 6:34 PM, Richard Palmer <span dir="ltr"><<a href="mailto:richard.d.palmer@kcl.ac.uk">richard.d.palmer@kcl.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear list,<br>
<br>
To setup a long running server I assume I need to create a specific<br>
template file for it something like this:<br>
<br>
NAME = long-running-server-name<br>
<br>
...<br>
<br>
DISC = [ source = "/path/to/disk/image/for/this/server/only.img",<br>
save = "yes",<br>
....<br>
]<br>
NIC = [ IP = "XXX.XXX.XXX.XXX" ] # Fixed IP for this server<br>
...<br>
<br>
to ensure it keeps its state between restarts. Is anything else<br>
needed ?.<br>
<br>
regards,<br>
<br>
Richard<br>
<br>
--<br>
<font color="#888888">Richard Palmer | Centre for E-Research<br>
| King's College London<br>
<a href="mailto:richard.d.palmer@kcl.ac.uk">richard.d.palmer@kcl.ac.uk</a> |<br>
Tel: <a href="tel:0207%20848%201973" value="+12078481973">0207 848 1973</a> |<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></blockquote></div><br>