<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">If you look into those init scripts
      (under /etc/one-context.d) you will figure out the details.<br>
      In my context setting (4.4.1), I have both SET_HOSTNAME and
      DNS_HOSTNAM and it works well.<br>
      <table id="template_template_table" class="info_table
        transparent_table" height="150" width="525">
        <tbody>
          <tr>
            <td class="key_td" style="padding-left:10px;
              font-weight:bold; border-bottom:1px solid #CCCCCC;
              padding-top:6px; padding-bottom:6px;">CONTEXT</td>
            <td class="value_td" style="border-bottom:1px solid #CCCCCC;
              padding-top:6px; padding-bottom:6px"> <br>
            </td>
          </tr>
          <tr>
            <td class="key_td" style=" padding-left:35px;
              font-weight:normal; border-bottom:0; padding-top:1px;
              padding-bottom:1px">NETWORK</td>
            <td class="value_td" style=" border-bottom:0;
              padding-top:1px; padding-bottom:1px">YES</td>
          </tr>
          <tr>
            <td class="key_td" style=" padding-left:35px;
              font-weight:normal; border-bottom:0; padding-top:1px;
              padding-bottom:1px">TOKEN</td>
            <td class="value_td" style=" border-bottom:0;
              padding-top:1px; padding-bottom:1px">YES</td>
          </tr>
          <tr>
            <td class="key_td" style=" padding-left:35px;
              font-weight:normal; border-bottom:0; padding-top:1px;
              padding-bottom:1px">SET_HOSTNAME</td>
            <td class="value_td" style=" border-bottom:0;
              padding-top:1px; padding-bottom:1px">$UNAME$VMID</td>
          </tr>
          <tr>
            <td class="key_td" style=" padding-left:35px;
              font-weight:normal; border-bottom:0; padding-top:1px;
              padding-bottom:1px">SEARCH_DOMAIN</td>
            <td class="value_td" style=" border-bottom:0;
              padding-top:1px; padding-bottom:1px">**********************</td>
          </tr>
          <tr>
            <td class="key_td" style=" padding-left:35px;
              font-weight:normal; border-bottom:0; padding-top:1px;
              padding-bottom:1px">DNS_HOSTNAME</td>
            <td class="value_td" style=" border-bottom:0;
              padding-top:1px; padding-bottom:1px">YES</td>
          </tr>
        </tbody>
      </table>
      <br>
      <pre class="moz-signature" cols="72">Gene</pre>
      On 14-08-19 07:59 AM, Diego M. wrote:<br>
    </div>
    <blockquote cite="mid:BLU174-W5C043330061B045BAC255D2D50@phx.gbl"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
      <div dir="ltr">
        <div>
          <div dir="ltr">Assigning the name is part of the
            contextualization, it would depend on the version you are
            running, but assumign it is the last one, you can refer to
            this link: <a moz-do-not-send="true"
href="http://docs.opennebula.org/4.8/user/virtual_machine_setup/cong.html"
              target="_blank">http://docs.opennebula.org/4.8/user/virtual_machine_setup/cong.html</a>
            <div><br>
            </div>
            <div>As you will see there, the hostname is assigned through
              the hostname variable on the context like this:</div>
            <div>
              <div class="code ecxhighlight-python"
                style="box-sizing:border-box;color:rgb(53, 55,
                53);font-family:Verdana, Geneva,
                sans-serif;font-size:13px;line-height:19.0476188659668px;background-color:rgb(255,
                255, 255);">
                <pre style="box-sizing:border-box;overflow-x:auto;overflow-y:hidden;font-family:Monaco, Menlo, Consolas, 'Courier New', monospace;white-space:pre-wrap;padding:9.5px;line-height:1.428571429;color:rgb(51, 51, 51);word-break:break-all;word-wrap:break-word;border:1px solid rgb(204, 204, 204);border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:rgb(235, 235, 237);">CONTEXT = [
  HOSTNAME="$name"
]</pre>
                <div><br>
                </div>
                <div>Let me know if it works for you :)</div>
                <div><br>
                </div>
                <div>Cheers!</div>
              </div>
              <br>
              <div>> Date: Tue, 19 Aug 2014 11:51:58 +0200<br>
                > From: <a class="moz-txt-link-abbreviated" href="mailto:roedie@roedie.nl">roedie@roedie.nl</a><br>
                > To: <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opennebula.org">users@lists.opennebula.org</a><br>
                > Subject: [one-users] Hostname missing from context<br>
                > <br>
                > Hi,<br>
                > <br>
                > When I create a VM with OpenNebula the VM does not
                get the correct <br>
                > hostname.<br>
                > <br>
                > I can't seem to figure out why, but it is missing
                from my context <br>
                > settings. When I look in context.sh I see:<br>
                > <br>
                > # Context variables generated by OpenNebula<br>
                > DISK_ID='1'<br>
                > ETH0_DNS='8.8.8.8 '<br>
                > ETH0_GATEWAY='192.168.3.1'<br>
                > ETH0_IP='192.168.3.202'<br>
                > ETH0_MAC='02:00:c0:a8:03:ca'<br>
                > ETH0_MASK='255.255.255.0'<br>
                > ETH0_NETWORK='192.168.3.0'<br>
                > NETWORK='YES'<br>
                > SSH_PUBLIC_KEY='ssh-rsa [...] sander@gallumbits<br>
                > '<br>
                > TARGET='hda'<br>
                > <br>
                > I expected that OpenNebula would add the vm-name as
                hostname. Am I <br>
                > wrong?<br>
                > <br>
                > Greets,<br>
                > <br>
                > Sander<br>
                > _______________________________________________<br>
                > Users mailing list<br>
                > <a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
                >
                <a class="moz-txt-link-freetext" href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
              </div>
            </div>
          </div>
        </div>
        <style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style> </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>