[one-users] Not able to ssh to Virtual Address of VM

ankit anand ankit.s.anand at gmail.com
Tue Jun 12 21:35:46 PDT 2012


Also, Interestingly, i am able to ping but not ssh .Have restarted the ssh
daemon on Vm as well but to no avail :(

On Wed, Jun 13, 2012 at 9:43 AM, ankit anand <ankit.s.anand at gmail.com>wrote:

> Hello Carlos and Everyonel
>
> Thanks Carlos for your reply.
>
> I was able to login into vm through vnc by Virtual machine manager
> provided by suse and can see it running fine.
> I could not get what you meant by vmcontext script . Is it the same as
> init.sh script?
>
> For me init.sh script is :
>
> 'if [ -f /mnt/context.sh ]; then
>   . /mnt/context.sh
> fi
>
> hostname $HOSTNAME
> ifconfig eth0 $IP_PUBLIC
>
> useradd -m $USERNAME
>
> mkdir -p ~$USERNAME/.ssh
> cat /mnt/id_rsa.pub >> ~$USERNAME/.ssh/authorized_keys
>
> chown -R $USERNAME /home/$USERNAME
>
> with VM template above shown .
> and also i could not get
> "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"
> Also, the vm is getting some dynamic IP 10.112.19.218 when i assign it
> 10.112.10.38
> So, the IP is not assigned properly.
> Please guide for the same
>
> Thanks and Regards
> Ankit Anand
>
>
> On Mon, Jun 11, 2012 at 6:41 PM, Carlos Martín Sánchez <
> cmartin at opennebula.org> wrote:
>
>> Hi,
>>
>> 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.
>>
>> The CONTEXT section in the VM template is completely optional, it is not
>> required for the IP setup.
>>
>> 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.
>>
>> Regards
>> --
>> Carlos Martín, MSc
>> Project Engineer
>> OpenNebula - The Open-source Solution for Data Center Virtualization
>> www.OpenNebula.org | cmartin at opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
>>
>>
>>
>> On Mon, Jun 11, 2012 at 12:37 PM, ankit anand <ankit.s.anand at gmail.com>wrote:
>>
>>> Hello All/Davood
>>>
>>> I have set iup the contextualization parameters and my vm template loks
>>> like:
>>> CONTEXT=[
>>>  FILES="~/vm_context/init.sh ~/vm_context/id_rsa.pub",
>>>  HOSTNAME="cloud",
>>>  PUBLIC_IP="10.112.10.35",
>>>  TARGET="hdb",
>>>  USERNAME="oneadmin" ]
>>>
>>> Contextualization is used to pass parameters to open vm and make it
>>> customised. But still not nable to ssh into the vm .Not sure what
>>> exact is the problem ?
>>> May be some problem with bridge .
>>>
>>> Any more ideas?
>>>
>>> Thanks and Regards
>>> Ankit Anand
>>> On 6/8/12, davood ghatreh <davood.gh2000 at gmail.com> wrote:
>>> > Dear Ankit,
>>> >
>>> > I couldn't find any contextualization parameter in your VM template.
>>> You
>>> > need to define it if you want Opennebula to set the TCP/IP
>>> configuration
>>> > (and other OS parameters such as hostname etc) automatically in the VM.
>>> > Here is the related document:
>>> >
>>> > http://opennebula.org/documentation:rel3.4:cong
>>> >
>>> > you can also connect to your VM using VNC, if you want to set the IP
>>> > address manually.
>>> >
>>> >
>>> > Thanks
>>> > Davood
>>> >
>>> > On Fri, Jun 8, 2012 at 9:18 AM, ankit anand <ankit.s.anand at gmail.com>
>>> > wrote:
>>> >
>>> >> Hello All
>>> >>
>>> >> I have set up a vritual machine wchich is in running state .
>>> >>
>>> >> but I am not able to ping to Virtual address of that VM . I mean
>>> Virtual
>>> >> address by one of Vnet address specified in vnet file .
>>> >> I have set up my bridge br0 through open suse yast interface .
>>> >>
>>> >> Details of ifconfig are:
>>> >>
>>> >> br0       Link encap:Ethernet  HWaddr AE:94:4C:63:C9:29
>>> >>           inet addr:10.112.10.35  Bcast:10.112.10.255
>>>  Mask:255.255.255.0
>>> >>           inet6 addr: fe80::ac94:4cff:fe63:c929/64 Scope:Link
>>> >>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>> >>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>>> >>           TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
>>> >>           collisions:0 txqueuelen:0
>>> >>           RX bytes:0 (0.0 b)  TX bytes:5595 (5.4 Kb)
>>> >>
>>> >> eth0      Link encap:Ethernet  HWaddr 00:E0:81:C1:A6:2C
>>> >>           inet addr:10.112.10.35  Bcast:10.112.10.255
>>>  Mask:255.255.255.0
>>> >>           inet6 addr: fe80::2e0:81ff:fec1:a62c/64 Scope:Link
>>> >>           UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
>>> >>           RX packets:418080 errors:0 dropped:9 overruns:0 frame:0
>>> >>           TX packets:125349 errors:0 dropped:0 overruns:0 carrier:0
>>> >>           collisions:0 txqueuelen:1000
>>> >>           RX bytes:148955613 (142.0 Mb)  TX bytes:32412539 (30.9 Mb)
>>> >>           Interrupt:44
>>> >>
>>> >> eth1      Link encap:Ethernet  HWaddr 00:E0:81:C1:A6:2D
>>> >>           UP BROADCAST PROMISC MULTICAST  MTU:1500  Metric:1
>>> >>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>>> >>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>>> >>           collisions:0 txqueuelen:1000
>>> >>           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>>> >>           Interrupt:45 Base address:0x2000
>>> >>
>>> >> lo        Link encap:Local Loopback
>>> >>           inet addr:127.0.0.1  Mask:255.0.0.0
>>> >>           inet6 addr: ::1/128 Scope:Host
>>> >>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>>> >>           RX packets:381969 errors:0 dropped:0 overruns:0 frame:0
>>> >>           TX packets:381969 errors:0 dropped:0 overruns:0 carrier:0
>>> >>           collisions:0 txqueuelen:0
>>> >>           RX bytes:54727247 (52.1 Mb)  TX bytes:54727247 (52.1 Mb)
>>> >>
>>> >>
>>> >> vm DETAILS:
>>> >>
>>> >> VIRTUAL MACHINE 58
>>> >> INFORMATION
>>> >> ID                  : 58
>>> >> NAME                : one-58
>>> >> USER                : oneadmin
>>> >> GROUP               : oneadmin
>>> >> STATE               : ACTIVE
>>> >> LCM_STATE           : RUNNING
>>> >> HOSTNAME            : cloud
>>> >> START TIME          : 06/08 10:16:14
>>> >> END TIME            : -
>>> >> DEPLOY ID           : one-58
>>> >>
>>> >> VIRTUAL MACHINE
>>> >> MONITORING
>>> >> NET_RX              : 0
>>> >> NET_TX              : 0
>>> >> USED CPU            : 0
>>> >> USED MEMORY         : 0
>>> >>
>>> >> PERMISSIONS
>>> >>
>>> >> OWNER               : um-
>>> >> GROUP               : ---
>>> >> OTHER               : ---
>>> >>
>>> >> VIRTUAL MACHINE
>>> >> TEMPLATE
>>> >> CONTEXT=[
>>> >>   TARGET="hdb" ]
>>> >> CPU="1"
>>> >> DISK=[
>>> >>   BUS="ide",
>>> >>   CLONE="YES",
>>> >>   DATASTORE="default",
>>> >>   DATASTORE_ID="1",
>>> >>   DISK_ID="0",
>>> >>   IMAGE="OpenSuse2",
>>> >>   IMAGE_ID="9",
>>> >>   IMAGE_UNAME="oneadmin",
>>> >>   READONLY="NO",
>>> >>   SAVE="NO",
>>> >>
>>> >>
>>> SOURCE="/srv/cloud/one/var/datastores/1/11a9b1e6031e2206511466892f0e960e",
>>> >>   TARGET="hda",
>>> >>   TM_MAD="shared",
>>> >>   TYPE="DISK" ]
>>> >> GRAPHICS=[
>>> >>   LISTEN="10.112.10.35",
>>> >>   PASSWD="cadlab",
>>> >>   PORT="5903",
>>> >>   TYPE="vnc" ]
>>> >> MEMORY="1024"
>>> >> NAME="one-58"
>>> >> NIC=[
>>> >>   BRIDGE="br0",
>>> >>   IP="10.112.10.37",
>>> >>   MAC="02:00:0a:70:0a:25",
>>> >>   NETWORK="Public",
>>> >>   NETWORK_ID="6",
>>> >>   NETWORK_UNAME="oneadmin",
>>> >>   VLAN="NO" ]
>>> >> OS=[
>>> >>   ARCH="x86_64",
>>> >>   BOOT="hd" ]
>>> >> RAW=[
>>> >>   TYPE="kvm" ]
>>> >> TEMPLATE_ID="0"
>>> >> VCPU="1"
>>> >> VMID="58"
>>> >>
>>> >> VIRTUAL MACHINE
>>> >> HISTORY
>>> >>  SEQ        HOSTNAME REASON           START        TIME       PTIME
>>> >>    0           cloud   none  06/08 10:16:33    0d 00:01    0d 00:00
>>> >>
>>> >> VNET FILE DETAILS:
>>> >> VIRTUAL NETWORK 6
>>> >> INFORMATION
>>> >> ID             : 6
>>> >> NAME           : Public
>>> >> USER           : oneadmin
>>> >> GROUP          : oneadmin
>>> >> CLUSTER        : -
>>> >> TYPE           : FIXED
>>> >> BRIDGE         : br0
>>> >> VLAN           : No
>>> >> PHYSICAL DEVICE:
>>> >> VLAN ID        :
>>> >> USED LEASES    : 1
>>> >>
>>> >> PERMISSIONS
>>> >>
>>> >> OWNER          : um-
>>> >> GROUP          : ---
>>> >> OTHER          : ---
>>> >>
>>> >> VIRTUAL NETWORK
>>> >> TEMPLATE
>>> >> DNS="10.16.25.13"
>>> >> GATEWAY="10.112.10.1"
>>> >>
>>> >> USED
>>> >> LEASES
>>> >> LEASE=[ IP="10.112.10.37", MAC="02:00:0a:70:0a:25", USED="1",
>>> VID="58" ]
>>> >>
>>> >> FREE
>>> >> LEASES
>>> >> LEASE=[ IP="10.112.10.38", MAC="02:00:0a:70:0a:26", USED="0",
>>> VID="-1" ]
>>> >> LEASE=[ IP="10.112.10.39", MAC="02:00:0a:70:0a:27", USED="0",
>>> VID="-1" ]
>>> >> LEASE=[ IP="10.112.10.40", MAC="02:00:0a:70:0a:28", USED="0",
>>> VID="-1" ]
>>> >>
>>> >> when i do
>>> >> ssh 10.112.10.37
>>> >> it returns :
>>> >> ssh: connect to host 10.112.10.37 port 22: No route to host
>>> >>
>>> >> Any clues ?
>>> >>
>>> >> Thanks and regards
>>> >> Ankit Anand
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> The details of vnet file :
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> Users mailing list
>>> >> Users at lists.opennebula.org
>>> >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>> >>
>>> >>
>>> >
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120613/c5511f6c/attachment-0003.htm>


More information about the Users mailing list