<div dir="ltr">Hi,<div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 15, 2014 at 4:18 AM, <a href="mailto:clm_tuan@hotmail.com">clm_tuan@hotmail.com</a> <span dir="ltr"><<a href="mailto:clm_tuan@hotmail.com" target="_blank">clm_tuan@hotmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>
<div><span></span></div><blockquote style="margin-top:0px;margin-bottom:0px;margin-left:0.5em"><div><div><div style="font-size:16px">Hi All</div><div style="font-size:16px"><br></div><div style="font-size:16px"><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">I</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">define</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">a</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">hook</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">,</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">want</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> the </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">host</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">to</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">restart</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> the </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">VM</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">will</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">automatically</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">start</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> after</span>,<span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">but</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">has</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">not been</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window">successful.</span></div><div style="font-size:16px"><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px;background-color:window"><br></span></div><div style="font-size:16px"><span style="background-color:rgba(0,0,0,0)"> VM_HOOK = [
<br></span><span style="background-color:rgba(0,0,0,0)"> </span><span style="background-color:rgba(0,0,0,0)">name = "autostart_hook",
<br></span><span style="background-color:rgba(0,0,0,0)"> </span><span style="background-color:rgba(0,0,0,0)">on = "CUSTOM",
<br></span><span style="background-color:rgba(0,0,0,0)"> </span><span style="background-color:rgba(0,0,0,0)">state = "POWEROFF",
<br></span><span style="background-color:rgba(0,0,0,0)"> </span><span style="background-color:rgba(0,0,0,0)">lcm_state = "LCM_INIT",
<br></span><span style="background-color:rgba(0,0,0,0)"> </span><span style="background-color:rgba(0,0,0,0)">command = "/usr/bin/env onevm resume",
<br></span><span style="background-color:rgba(0,0,0,0)"> </span><span style="background-color:rgba(0,0,0,0)">arguments = "$ID" ]</span></div>
<div style="font-size:16px"><br></div><div style="font-size:16px"><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">Do</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">you</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">have</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">any</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">good</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">suggestions</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">,</span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px"> </span><span style="padding:0px;margin:0px;color:rgb(68,68,68);font-family:'YaHei UI';line-height:20px">thank you.</span></div></div></div></blockquote></div></blockquote><div><br></div><div>The hook definition looks good. Did you restart opennebula after editing oned.conf?</div><div><br></div><div>You can look for any errors in the hook execution in the individual VM log, in /var/log/one/<id>.log</div><div><br></div><div>Regards.</div><div><div class="gmail_signature"><div dir="ltr"><br class="">--<br><div>Carlos Martín, MSc<br>Project Engineer</div><div>OpenNebula - Flexible Enterprise Cloud Made Simple<br><div><span style="border-collapse:collapse;color:rgb(136,136,136);font-size:13px"><a href="http://www.opennebula.org/" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="border-collapse:collapse;color:rgb(136,136,136);font-size:13px"><a href="mailto:cmartin@opennebula.org" target="_blank" style="color:rgb(42,93,176)"></a></span></div></div></div></div></div><div> </div></div></div></div>