Hi,<div><br></div>The VM needs to have the contextualization scripts configured to be run at start-up. The important one is vmcontext, it reads the MAC address and sets the IP from it: the assigned IP 10.112.10.37 is 0a:70:0a:25 in hexadecimal.<div>
<br></div><div>The CONTEXT section in the VM template is completely optional, it is not required for the IP setup.</div><div><br></div><div>If you continue having troubles, you can try to log into your VM using VNC and check if the VM is really running and booted successfully. Try to execute the vmcontext script as root, if the IP is then configured, you may need to change the runlevel where you put it.</div>
<div><br></div><div>Regards</div><div><div>--<br>Carlos Martín, MSc<br>Project Engineer<br>OpenNebula - The Open-source Solution for Data Center Virtualization<div><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;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-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span></div>
<br>
<br><br><div class="gmail_quote">On Mon, Jun 11, 2012 at 12:37 PM, ankit anand <span dir="ltr"><<a href="mailto:ankit.s.anand@gmail.com" target="_blank">ankit.s.anand@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello All/Davood<br>
<br>
I have set iup the contextualization parameters and my vm template loks like:<br>
CONTEXT=[<br>
FILES="~/vm_context/init.sh ~/vm_context/id_rsa.pub",<br>
HOSTNAME="cloud",<br>
PUBLIC_IP="10.112.10.35",<br>
TARGET="hdb",<br>
USERNAME="oneadmin" ]<br>
<br>
Contextualization is used to pass parameters to open vm and make it<br>
customised. But still not nable to ssh into the vm .Not sure what<br>
exact is the problem ?<br>
May be some problem with bridge .<br>
<br>
Any more ideas?<br>
<br>
Thanks and Regards<br>
<span class="HOEnZb"><font color="#888888">Ankit Anand<br>
</font></span><div class="HOEnZb"><div class="h5">On 6/8/12, davood ghatreh <<a href="mailto:davood.gh2000@gmail.com">davood.gh2000@gmail.com</a>> wrote:<br>
> Dear Ankit,<br>
><br>
> I couldn't find any contextualization parameter in your VM template. You<br>
> need to define it if you want Opennebula to set the TCP/IP configuration<br>
> (and other OS parameters such as hostname etc) automatically in the VM.<br>
> Here is the related document:<br>
><br>
> <a href="http://opennebula.org/documentation:rel3.4:cong" target="_blank">http://opennebula.org/documentation:rel3.4:cong</a><br>
><br>
> you can also connect to your VM using VNC, if you want to set the IP<br>
> address manually.<br>
><br>
><br>
> Thanks<br>
> Davood<br>
><br>
> On Fri, Jun 8, 2012 at 9:18 AM, ankit anand <<a href="mailto:ankit.s.anand@gmail.com">ankit.s.anand@gmail.com</a>><br>
> wrote:<br>
><br>
>> Hello All<br>
>><br>
>> I have set up a vritual machine wchich is in running state .<br>
>><br>
>> but I am not able to ping to Virtual address of that VM . I mean Virtual<br>
>> address by one of Vnet address specified in vnet file .<br>
>> I have set up my bridge br0 through open suse yast interface .<br>
>><br>
>> Details of ifconfig are:<br>
>><br>
>> br0 Link encap:Ethernet HWaddr AE:94:4C:63:C9:29<br>
>> inet addr:10.112.10.35 Bcast:10.112.10.255 Mask:255.255.255.0<br>
>> inet6 addr: fe80::ac94:4cff:fe63:c929/64 Scope:Link<br>
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br>
>> RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
>> TX packets:33 errors:0 dropped:0 overruns:0 carrier:0<br>
>> collisions:0 txqueuelen:0<br>
>> RX bytes:0 (0.0 b) TX bytes:5595 (5.4 Kb)<br>
>><br>
>> eth0 Link encap:Ethernet HWaddr 00:E0:81:C1:A6:2C<br>
>> inet addr:10.112.10.35 Bcast:10.112.10.255 Mask:255.255.255.0<br>
>> inet6 addr: fe80::2e0:81ff:fec1:a62c/64 Scope:Link<br>
>> UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1<br>
>> RX packets:418080 errors:0 dropped:9 overruns:0 frame:0<br>
>> TX packets:125349 errors:0 dropped:0 overruns:0 carrier:0<br>
>> collisions:0 txqueuelen:1000<br>
>> RX bytes:148955613 (142.0 Mb) TX bytes:32412539 (30.9 Mb)<br>
>> Interrupt:44<br>
>><br>
>> eth1 Link encap:Ethernet HWaddr 00:E0:81:C1:A6:2D<br>
>> UP BROADCAST PROMISC MULTICAST MTU:1500 Metric:1<br>
>> RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
>> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>
>> collisions:0 txqueuelen:1000<br>
>> RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br>
>> Interrupt:45 Base address:0x2000<br>
>><br>
>> lo Link encap:Local Loopback<br>
>> inet addr:127.0.0.1 Mask:255.0.0.0<br>
>> inet6 addr: ::1/128 Scope:Host<br>
>> UP LOOPBACK RUNNING MTU:16436 Metric:1<br>
>> RX packets:381969 errors:0 dropped:0 overruns:0 frame:0<br>
>> TX packets:381969 errors:0 dropped:0 overruns:0 carrier:0<br>
>> collisions:0 txqueuelen:0<br>
>> RX bytes:54727247 (52.1 Mb) TX bytes:54727247 (52.1 Mb)<br>
>><br>
>><br>
>> vm DETAILS:<br>
>><br>
>> VIRTUAL MACHINE 58<br>
>> INFORMATION<br>
>> ID : 58<br>
>> NAME : one-58<br>
>> USER : oneadmin<br>
>> GROUP : oneadmin<br>
>> STATE : ACTIVE<br>
>> LCM_STATE : RUNNING<br>
>> HOSTNAME : cloud<br>
>> START TIME : 06/08 10:16:14<br>
>> END TIME : -<br>
>> DEPLOY ID : one-58<br>
>><br>
>> VIRTUAL MACHINE<br>
>> MONITORING<br>
>> NET_RX : 0<br>
>> NET_TX : 0<br>
>> USED CPU : 0<br>
>> USED MEMORY : 0<br>
>><br>
>> PERMISSIONS<br>
>><br>
>> OWNER : um-<br>
>> GROUP : ---<br>
>> OTHER : ---<br>
>><br>
>> VIRTUAL MACHINE<br>
>> TEMPLATE<br>
>> CONTEXT=[<br>
>> TARGET="hdb" ]<br>
>> CPU="1"<br>
>> DISK=[<br>
>> BUS="ide",<br>
>> CLONE="YES",<br>
>> DATASTORE="default",<br>
>> DATASTORE_ID="1",<br>
>> DISK_ID="0",<br>
>> IMAGE="OpenSuse2",<br>
>> IMAGE_ID="9",<br>
>> IMAGE_UNAME="oneadmin",<br>
>> READONLY="NO",<br>
>> SAVE="NO",<br>
>><br>
>> SOURCE="/srv/cloud/one/var/datastores/1/11a9b1e6031e2206511466892f0e960e",<br>
>> TARGET="hda",<br>
>> TM_MAD="shared",<br>
>> TYPE="DISK" ]<br>
>> GRAPHICS=[<br>
>> LISTEN="10.112.10.35",<br>
>> PASSWD="cadlab",<br>
>> PORT="5903",<br>
>> TYPE="vnc" ]<br>
>> MEMORY="1024"<br>
>> NAME="one-58"<br>
>> NIC=[<br>
>> BRIDGE="br0",<br>
>> IP="10.112.10.37",<br>
>> MAC="02:00:0a:70:0a:25",<br>
>> NETWORK="Public",<br>
>> NETWORK_ID="6",<br>
>> NETWORK_UNAME="oneadmin",<br>
>> VLAN="NO" ]<br>
>> OS=[<br>
>> ARCH="x86_64",<br>
>> BOOT="hd" ]<br>
>> RAW=[<br>
>> TYPE="kvm" ]<br>
>> TEMPLATE_ID="0"<br>
>> VCPU="1"<br>
>> VMID="58"<br>
>><br>
>> VIRTUAL MACHINE<br>
>> HISTORY<br>
>> SEQ HOSTNAME REASON START TIME PTIME<br>
>> 0 cloud none 06/08 10:16:33 0d 00:01 0d 00:00<br>
>><br>
>> VNET FILE DETAILS:<br>
>> VIRTUAL NETWORK 6<br>
>> INFORMATION<br>
>> ID : 6<br>
>> NAME : Public<br>
>> USER : oneadmin<br>
>> GROUP : oneadmin<br>
>> CLUSTER : -<br>
>> TYPE : FIXED<br>
>> BRIDGE : br0<br>
>> VLAN : No<br>
>> PHYSICAL DEVICE:<br>
>> VLAN ID :<br>
>> USED LEASES : 1<br>
>><br>
>> PERMISSIONS<br>
>><br>
>> OWNER : um-<br>
>> GROUP : ---<br>
>> OTHER : ---<br>
>><br>
>> VIRTUAL NETWORK<br>
>> TEMPLATE<br>
>> DNS="10.16.25.13"<br>
>> GATEWAY="10.112.10.1"<br>
>><br>
>> USED<br>
>> LEASES<br>
>> LEASE=[ IP="10.112.10.37", MAC="02:00:0a:70:0a:25", USED="1", VID="58" ]<br>
>><br>
>> FREE<br>
>> LEASES<br>
>> LEASE=[ IP="10.112.10.38", MAC="02:00:0a:70:0a:26", USED="0", VID="-1" ]<br>
>> LEASE=[ IP="10.112.10.39", MAC="02:00:0a:70:0a:27", USED="0", VID="-1" ]<br>
>> LEASE=[ IP="10.112.10.40", MAC="02:00:0a:70:0a:28", USED="0", VID="-1" ]<br>
>><br>
>> when i do<br>
>> ssh 10.112.10.37<br>
>> it returns :<br>
>> ssh: connect to host 10.112.10.37 port 22: No route to host<br>
>><br>
>> Any clues ?<br>
>><br>
>> Thanks and regards<br>
>> Ankit Anand<br>
>><br>
>><br>
>><br>
>><br>
>> The details of vnet file :<br>
>><br>
>><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>
>><br>
><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>
</div></div></blockquote></div><br></div></div>