Hi,<div><br></div><div>As you can read in the contextualization guide [1], there are two "levels" of contextualization:</div><div>- The networking contextualization, to set the IP leased by OpenNebula from the MAC.</div>

<div>- And the generic contextualization, that's what the init.sh script is for.</div><div><br></div><div>The <span style>init.sh script is just an example of the kind of contextualization you can perform, and you should customize that to your needs. You don't need to create new users, or copy any keys if you don't need to. The whole CONTEXT section is optional, the only requirement is to setup the IP from the VM's MAC.</span></div>

<div><span style><br></span></div><div><span style>About your networking problem, looks like you are trying to access your VM's IP, but the GRAPHICS attribute creates a VNC server in your Host, not your VM.</span></div>

<div><span style><br></span></div><div><font color="#222222" face="arial, sans-serif">Regards.</font></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">[1] <a href="http://opennebula.org/documentation:rel3.2:cong">http://opennebula.org/documentation:rel3.2:cong</a><br clear="all">

</font><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 Engineer<br>OpenNebula - The Open Source Toolkit for Data Center Virtualization<br>

<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-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span><br>


<br><br><div class="gmail_quote">On Thu, Jan 19, 2012 at 12:09 PM, Mohit Dhingra <span dir="ltr"><<a href="mailto:mohitdhingras@gmail.com">mohitdhingras@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<b>Hi All,</b><br><br>I checked for online documentation for ssh configuration as well. I am not clear with few things. Can somebody please explain..<br><br>I downloaded ttylinux (sample template). I modified my own template file according to it.<br>



<br>As I could figure out from the init.sh file, it configures the VM's ip address, netmask etc. <br>So, I provided the IP address in IP_PUBLIC Variable in Context in VM Template file.<br><br>And then, it copies root rsa public key to root's authorized keys. ( Is it VM's root ?  Which public key path should I give here? My Host's root public key ? This is for ssh without password between ? )<br>



<br>After that, it creates one more user and does the same procedure for created user. (Same question. Which rsa public key should I give here? oneadmin's public key, that I generated in /srv/cloud/one/.ssh ? I have already added that in oneadmin's /srv/cloud/one/.ssh/authorized_keys )<br>



 <br>By using attached template files, I am able to create VMs, and in running state as well, but I am not able to connect through VNC or ssh, or ping itself.<br><br>oneadmin@cadlab:~/Templates/vm_templates> vncviewer 10.112.10.54::5904<div class="im">

<br>

vncviewer: ConnectToTcpAddr: connect: No route to host<br>Unable to connect to VNC server<br><br></div>Any help would be grateful :-)<div class="im HOEnZb"><br><br><b>---------------------------- <br></b><b>Thanks & Regards<br>

<font color="#888888">Mohit Dhingra <br>

<a href="tel:%2B919611190435" value="+919611190435" target="_blank">+919611190435</a></font></b><br>
<br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_quote">On 18 January 2012 21:59, Mohit Dhingra <span dir="ltr"><<a href="mailto:mohitdhingras@gmail.com" target="_blank">mohitdhingras@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<b>Hi All,<br><br></b>I have been able to create host, vnet and VM, using CLI using attached template files. But I don't know how to access VMs.<br><br>I tried pinging ip address assigned to VM - 10.112.10.52. But, was not able to get any reply.<br>




Then I tried using vncviewer. <br><br>oneadmin@cadlab:~/Templates/vm_templates/Used> vncviewer 10.112.10.52<br>vncviewer: ConnectToTcpAddr: connect: No route to host<br>Unable to connect to VNC server<br><br><br>oneadmin@cadlab:~/Templates/vm_templates/Used> onehost list<br>




  ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM   STAT<br>   0 cadlab               2    800    795    600     8G   3.4G     4G     on<br><br>oneadmin@cadlab:~/Templates/vm_templates/Used> onevm list<br>




    ID USER     GROUP    NAME         STAT CPU     MEM        HOSTNAME        TIME<br>     0 oneadmin oneadmin SUSEVM-2     runn   0      2G          cadlab 00 07:21:04<br>     1 oneadmin oneadmin SUSEVM-2     runn   0      2G          cadlab 00 02:34:05<br>




<br>oneadmin@cadlab:~/Templates/vm_templates/Used> onevnet list<br>  ID USER     GROUP    NAME              TYPE BRIDGE  LEASES<br>   0 oneadmin oneadmin Public               F   eth0       2<br><br>oneadmin@cadlab:~/Templates/vm_templates/Used> onevm show 1<br>




VIRTUAL MACHINE 1 INFORMATION                                                   <br>ID                  : 1                   <br>NAME                : SUSEVM-2            <br>USER                : oneadmin            <br>




GROUP               : oneadmin            <br>STATE               : ACTIVE              <br>LCM_STATE           : RUNNING             <br>HOSTNAME            : cadlab              <br>START TIME          : 01/18 19:24:13      <br>




END TIME            : -                   <br>DEPLOY ID           : one-1               <br><br>VIRTUAL MACHINE MONITORING                                                      <br>NET_TX              : 3                   <br>




NET_RX              : 0                   <br>USED MEMORY         : 2097152             <br>USED CPU            : 0                   <br><br>PERMISSIONS                                                                     <br>




OWNER               : um-                 <br>GROUP               : ---                 <br>OTHER               : ---                 <br><br>VIRTUAL MACHINE TEMPLATE                                                        <br>




CONTEXT=[<br>  HOSTNAME=SUSEVM-2,<br>  TARGET=hdb ]<br>CPU=1<br>DISK=[<br>  CLONE=YES,<br>  DISK_ID=0,<br>  IMAGE="SUSE 11.4",<br>  IMAGE_ID=0,<br>  READONLY=NO,<br>  SAVE=NO,<br>  SOURCE=/srv/cloud_3_2/one/var/images/ce4d6171723f9b1d0b0b49bafde1133e,<br>




  TARGET=hda,<br>  TYPE=DISK ]<br>FEATURES=[<br>  ACPI=no ]<br>GRAPHICS=[<br>  LISTEN=0.0.0.0,<br>  PORT=5902,<br>  TYPE=vnc ]<br>MEMORY=2048<br>NAME=one-1<br>NIC=[<br>  BRIDGE=eth0,<br>  IP=10.112.10.52,<br>  MAC=02:00:0a:70:0a:34,<br>




  NETWORK=Public,<br>  NETWORK_ID=0,<br>  VLAN=NO ]<br>OS=[<br>  INITRD=/boot/initrd-xen,<br>  KERNEL=/boot/vmlinuz-xen,<br>  KERNEL_CMD="xencons=tty console=tty1",<br>  ROOT=xvda2 ]<br>VMID=1<br><br>Am I doing something wrong?<br>




<br><b><br clear="all"></b><b><div><b>---------------------------- <br></b></div>Thanks & Regards<span><font color="#888888"><br><font color="#888888">Mohit Dhingra <br><a href="tel:%2B919611190435" value="+919611190435" target="_blank">+919611190435</a></font></font></span></b><br>




</blockquote></div><br>
</div></div><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>
<br></blockquote></div><br></div>