<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi<br>
        In your techniques, you've told to ping the VM, but I don't get
    IP at that point.<br>
        I want to wait, to get the ip from my VM. When i run a vm in
    AWS(public cloud) cloud, I can wait for  <i><big><span class="n">vm_hash</span><span
          class="o">[</span><span class="s1">'VM'</span><span class="o">][</span><span
          class="s1">'TEMPLATE'</span><span class="o">].</span><span
          class="n">has_key?</span><span class="p">(</span><span
          class="s1">'AWS_IP_ADDRESS'</span>)</big></i>, to get the ip.<br>
        In the above case, the key <i><big><span class="s1">AWS_IP_ADDRESS
        </span></big></i>seems to be depends on AWS cloud.<br>
        If i create a vm in private cloud, for which key(like <i><big><span
          class="s1">AWS_IP_ADDRESS)</span></big></i> , i can wait to
    get the ip address?<br>
    <pre><span class="p"> 
</span></pre>
    <div class="moz-cite-prefix">On Thursday 01 May 2014 08:06 AM, Megam
      Systems wrote:<br>
    </div>
    <blockquote cite="mid:5361B310.2070003@megam.co.in" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      fya.<br>
      <br>
      As we would loose a 12 hr. window, I queued up a request in the
      dev mailing list. <br>
      <br>
      See if these options help you.<br>
      <div class="moz-forward-container"><br>
        <br>
        -------- Original Message --------
        <table class="moz-email-headers-table" border="0"
          cellpadding="0" cellspacing="0">
          <tbody>
            <tr>
              <th align="RIGHT" valign="BASELINE" nowrap="nowrap">Subject:

              </th>
              <td>Re: [one-dev] Megam: addon-knife (How can I know a VM
                is fully launched)</td>
            </tr>
            <tr>
              <th align="RIGHT" valign="BASELINE" nowrap="nowrap">Date:
              </th>
              <td>Wed, 30 Apr 2014 20:23:42 +0200</td>
            </tr>
            <tr>
              <th align="RIGHT" valign="BASELINE" nowrap="nowrap">From:
              </th>
              <td>Ruben S. Montero <a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:rsmontero@opennebula.org"><rsmontero@opennebula.org></a></td>
            </tr>
            <tr>
              <th align="RIGHT" valign="BASELINE" nowrap="nowrap">To: </th>
              <td>Megam Systems <a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:gomegam@megam.co.in"><gomegam@megam.co.in></a></td>
            </tr>
            <tr>
              <th align="RIGHT" valign="BASELINE" nowrap="nowrap">CC: </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:dev@lists.opennebula.org">dev@lists.opennebula.org</a></td>
            </tr>
          </tbody>
        </table>
        <br>
        <br>
        <div dir="ltr">Hi
          <div><br>
          </div>
          <div>As mentioned in yout email you are looking for the
            AWS_IP_ADDRESS key, which is only valid for Amazon Hybrid
            VMs. This value is obtained through the monitorization
            process as reported/updated by Amazon.</div>
          <div><br>
          </div>
          <div>In general, as boot time of a VM depends on the software
            stack running wihtin, you cannot rely on the VM status
            reported by the hypervisors, i.e. RUNNING means that the VM
            is running at hypervisor level but it can be stuck in the
            virtual BIOS because of an error or misconfiguration.</div>
          <div><br>
          </div>
          <div>In our internal testing platform we use two techniques:</div>
          <div><br>
          </div>
          <div>1.- Pro-active ping the VM, a simple ping+sleep loop with
            a timeout.</div>
          <div>2.- Make the VM callback home to a known URL (you may use
            onegate for this)</div>
          <div><br>
          </div>
          <div>Note that both requires connectivity to some extent
            between the knife controller and the VM.</div>
          <div><br>
          </div>
          <div>Cheers</div>
          <div><br>
          </div>
          <div>Ruben</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div class="gmail_extra"><br>
            <br>
            <div class="gmail_quote">On Wed, Apr 30, 2014 at 4:24 PM,
              Megam Systems <span dir="ltr"><<a
                  moz-do-not-send="true"
                  href="mailto:gomegam@megam.co.in" target="_blank">gomegam@megam.co.in</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear
                Dev-OpenNebula,<br>
                <br>
                When working on the addon-knife, upon launching a VM
                using the OpenNebula API, there is a need to wait till
                the VM is fully launched. Currently we wait until an IP
                address is available from the VMPool.<br>
                <br>
                Please find the reference of the code here.<br>
                <a moz-do-not-send="true"
href="https://github.com/OpenNebula/addon-knife/blob/master/lib/chef/knife/opennebula_server_create.rb#L168"
                  target="_blank">https://github.com/OpenNebula/addon-knife/blob/master/lib/chef/knife/opennebula_server_create.rb#L168</a><br>
                <br>
                We need a better way as OpenNebula can run in private
                clouds as well.<br>
                <br>
                How can we know that a VM is fully launched and running
                ? What parameter (status etc..) helps us to figure out
                that the VM is running.<span><font color="#888888"><br>
                    <br>
                    -- <br>
                    Cheers,<br>
                    Megam Systems; <a moz-do-not-send="true"
                      href="http://www.gomegam.com" target="_blank">http://www.gomegam.com</a><br>
                    email : <a moz-do-not-send="true"
                      href="mailto:gomegam@megam.co.in" target="_blank">gomegam@megam.co.in</a>;
                    twitter: @megamsystems<br>
                    blog  : <a moz-do-not-send="true"
                      href="http://blog.megam.co" target="_blank">http://blog.megam.co</a>
                           | try     : <a moz-do-not-send="true"
                      href="https://www.megam.co" target="_blank">https://www.megam.co</a><br>
                    github: <a moz-do-not-send="true"
                      href="https://github.com/megamsys" target="_blank">https://github.com/megamsys</a>
                    | youtube : <a moz-do-not-send="true"
                      href="http://youtube.com/indykish" target="_blank">youtube.com/indykish</a><br>
                    <br>
                    _______________________________________________<br>
                    Dev mailing list<br>
                    <a moz-do-not-send="true"
                      href="mailto:Dev@lists.opennebula.org"
                      target="_blank">Dev@lists.opennebula.org</a><br>
                    <a moz-do-not-send="true"
                      href="http://lists.opennebula.org/listinfo.cgi/dev-opennebula.org"
                      target="_blank">http://lists.opennebula.org/listinfo.cgi/dev-opennebula.org<br
                        clear="all">
                      <div><br>
                      </div>
                      -- <br>
                    </a>
                    <div dir="ltr"><a moz-do-not-send="true"
                        href="http://lists.opennebula.org/listinfo.cgi/dev-opennebula.org"
                        target="_blank">
                        <div>
                          <div>-- <br>
                          </div>
                        </div>
                        Ruben S. Montero, PhD<br>
                        Project co-Lead and Chief Architect</a>
                      <div><a moz-do-not-send="true"
                          href="http://lists.opennebula.org/listinfo.cgi/dev-opennebula.org"
                          target="_blank">OpenNebula - Flexible
                          Enterprise Cloud Made Simple<br>
                        </a><a moz-do-not-send="true"
                          href="http://www.OpenNebula.org"
                          target="_blank">www.OpenNebula.org</a> | <a
                          moz-do-not-send="true"
                          href="mailto:rsmontero@opennebula.org"
                          target="_blank">rsmontero@opennebula.org</a> |
                        @OpenNebula</div>
                    </div>
                  </font></span></blockquote>
            </div>
            <font color="#888888"> </font></div>
        </div>
        <br>
      </div>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
With Warm Regards,
Thomas Alrin,
Infrastructure Engineer; Megam Systems;
email: <a class="moz-txt-link-abbreviated" href="mailto:alrin@megam.co.in">alrin@megam.co.in</a>; cell: +91 9789345999
twitter : @thomasalrin</pre>
  </body>
</html>