<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20141217095708046799 { }body { font-size: 10.5pt; font-family: Arial; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Thanks,<font color="#444444" face="YaHei UI"><span style="line-height: 20px;">now it's work.</span></font></div><div><font color="#444444" face="YaHei UI"><span style="line-height: 20px;"><br></span></font></div><div><font color="#444444" face="YaHei UI"><span style="line-height: 20px;">before reboot:</span></font></div><div><font color="#444444" face="YaHei UI"><span style="line-height: 20px;"><br></span></font></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">Wed Dec 17 09:49:32 2014 [Z0][DiM][I]: New VM state is ACTIVE.
<br>Wed Dec 17 09:49:32 2014 [Z0][LCM][I]: New VM state is BOOT_POWEROFF
<br>Wed Dec 17 09:49:32 2014 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/1/deployment.1
<br>Wed Dec 17 09:49:33 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 09:49:33 2014 [Z0][VMM][I]: Successfully execute network driver operation: pre.
<br>Wed Dec 17 09:49:33 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 09:49:33 2014 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.
<br>Wed Dec 17 09:49:33 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 09:49:33 2014 [Z0][VMM][I]: Successfully execute network driver operation: post.
<br>Wed Dec 17 09:49:33 2014 [Z0][LCM][I]: New VM state is RUNNING</span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><br></span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">reboot host:</span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><br></span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><span style="background-color: rgba(0, 0, 0, 0);">Wed Dec 17 09:51:33 2014 [Z0][DiM][I]: New VM state is POWEROFF
<br>Wed Dec 17 09:51:33 2014 [Z0][DiM][I]: New VM state is ACTIVE.
<br>Wed Dec 17 09:51:33 2014 [Z0][LCM][I]: New VM state is BOOT_POWEROFF
<br>Wed Dec 17 09:51:33 2014 [Z0][HKM][I]: Success executing Hook: autostart_hook: .
<br>Wed Dec 17 09:51:33 2014 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/1/deployment.2
<br>Wed Dec 17 09:51:34 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 09:51:34 2014 [Z0][VMM][I]: Successfully execute network driver operation: pre.
<br>Wed Dec 17 09:51:34 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 09:51:34 2014 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.
<br>Wed Dec 17 09:51:34 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 09:51:34 2014 [Z0][VMM][I]: Successfully execute network driver operation: post.
<br>Wed Dec 17 09:51:34 2014 [Z0][LCM][I]: New VM state is RUNNING</span></span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><span style="background-color: rgba(0, 0, 0, 0);"><br></span></span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><span style="background-color: rgba(0, 0, 0, 0);">once again reboot host:</span></span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><span style="background-color: rgba(0, 0, 0, 0);"><br></span></span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><span style="background-color: rgba(0, 0, 0, 0);">Wed Dec 17 10:01:34 2014 [Z0][DiM][I]: New VM state is POWEROFF
<br>Wed Dec 17 10:01:34 2014 [Z0][DiM][I]: New VM state is ACTIVE.
<br>Wed Dec 17 10:01:34 2014 [Z0][HKM][I]: Success executing Hook: autostart_hook: .
<br>Wed Dec 17 10:01:34 2014 [Z0][LCM][I]: New VM state is BOOT_POWEROFF
<br>Wed Dec 17 10:01:34 2014 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/1/deployment.3
<br>Wed Dec 17 10:01:35 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 10:01:35 2014 [Z0][VMM][I]: Successfully execute network driver operation: pre.
<br>Wed Dec 17 10:01:35 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 10:01:35 2014 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.
<br>Wed Dec 17 10:01:35 2014 [Z0][VMM][I]: ExitCode: 0
<br>Wed Dec 17 10:01:35 2014 [Z0][VMM][I]: Successfully execute network driver operation: post.
<br>Wed Dec 17 10:01:35 2014 [Z0][LCM][I]: New VM state is RUNNING</span></span></div><div><span style="font-family: "" open="" sans',="" sans-serif";="" font-size:="" 14px;="" color:="" rgb(242,="" 242,="" 242);="" background-color:="" rgba(0,="" 0,="" 0);="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><span style="background-color: rgba(0, 0, 0, 0);"><br></span></span></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>clm_tuan@hotmail.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:cmartin@opennebula.org">Carlos Martín Sánchez</a></div><div><b>Date:</b> 2014-12-16 17:48</div><div><b>To:</b> <a href="mailto:clm_tuan@hotmail.com">clm_tuan@hotmail.com</a></div><div><b>CC:</b> <a href="mailto:users@lists.opennebula.org">users</a></div><div><b>Subject:</b> Re: [one-users] I define a hook, want the host to restart the VM will automatically start after , but has not been successful.</div></div></div><div><div class="FoxDiv20141217095708046799"><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>
</div></div></blockquote>
</body></html>