[one-users] Cannot connect to VM

Christophe Hamerling - Petals Link christophe.hamerling at petalslink.com
Wed Dec 15 01:06:50 PST 2010


On Tue, Dec 14, 2010 at 11:29 PM, <Carsten.Friedrich at csiro.au> wrote:

>  I think your problem is that the ttylinux VM does not configure its
> network card. Although OpenNebula will assign the VM a MAC address and an IP
> address, only the MAC address will actually be set by the hypervisor. It is
> up to the VM operating system (in your case ttylinux) to configure its
> network card with the assigned IP address. You can do this by passing the
> OpenNebula assigned IP address in the context section or using means like
> DHCP.
>

I was really hoping that the VM provided there
http://www.opennebula.org/documentation:rel2.0:vmg works. So I think (and
hope) that I have a configuration issue or I do not understand this part.

I removed all the context section since I do not understand this statement
"You should choose the ip_public field to be an IP which does not match any
of the predefined LEASES of small_network.net (only for demonstration
purposes)."
What is the goal of this ip_public field if ONE takes the IP from the LEASES
list?

If the context is not set, what will be the IP address of the VM? The one
from the leases list?
If the context is set, what is the role of the public_ip field?

Can someone give me details on this part? In
http://www.opennebula.org/documentation:rel2.0:vmg there are two different
IP addresses with and without context...




>
>
> To verify that this is really the problem, add VNC support to your VM
> template; connect to VNC; log into the VM; run “ifconfig” and look at the
> network settings.
>
>
>
> Carsten
>
>
>
> *From:* users-bounces at lists.opennebula.org [mailto:
> users-bounces at lists.opennebula.org] *On Behalf Of *Christophe Hamerling -
> Petals Link
> *Sent:* Wednesday, 15 December 2010 5:06
> *To:* OpenNebula Users ML
> *Subject:* [one-users] Can not connect to VM
>
>
>
> Hi all,
>
>
>
> Trying to run OpenNebula for the first time, apologies for basic questions
> in this mail.
>
> I spent all the day looking at this problem without any success... I think
> I have a problem in my network interface configuration but I am not sure...
>
> So, I try to run the ttylinux example without any success. I am able to
> create the new VM but I can not ping nor SSH it.
>
> Can someone help me solving this issue?
>
> Thanks a lot!
>
>
>
>  Here are all the details:
>
>
>
> My environment : libvirt/KVM on Debian 5 (In fact the Debian Node runs on
> top of virtual box, I hope that it is not a problem).
>
> The front is running on 192.168.2.60, I only have one node on 192.168.2.61.
>
> On 192.168.2.61, I manually configured a bridge in /etc/network/interfaces
> like this (I removed all the eth0 related parts...)
>
> auto br0
>
> iface br0 inet static
>
>             address 192.168.2.61
>
>             netmask 255.255.255.0
>
>             network 192.68.2.0
>
>             broadcast 192.168.2.255
>
>             gateway 192.168.2.1
>
>             bridge_ports eth0
>
>             bridge_stp off
>
>             #bridge_maxwait 0
>
>             bridge_fd 9
>
>             bridge_maxage 12
>
>             bridge_hello 2
>
>
>
> Here are my TTYLinux configuration files, I put the bridge value to the one
> defined just before :
>
>
>
> debian-01:~/one-templates$ more small_network.net
>
> NAME = "Small network"
>
> TYPE = FIXED
>
>
>
> #Now we'll use the cluster private network (physical)
>
> BRIDGE = br0
>
> LEASES = [ IP="192.168.2.71"]
>
> #LEASES = [ IP="192.168.0.6"]
>
> #LEASES = [ IP="192.168.0.7"]
>
>
>
> #######
>
>
>
> debian-01:~/one-templates$ more ttylinux.one
>
> NAME   = ttylinux
>
> CPU    = 0.1
>
> MEMORY = 64
>
>
>
> DISK   = [
>
>   source   = "/srv/cloud/one/one-templates/ttylinux.img",
>
>   target   = "hda",
>
>   readonly = "no" ]
>
>
>
> NIC    = [ NETWORK = "Small network" ]
>
>
>
> FEATURES=[ acpi="no" ]
>
>
>
> ##########
>
>
>
>
>
>
>
> ##############################
>
> THE ONE* COMMANDS RESULTS
>
> ##############################
>
>
>
> debian-01:~/one-templates$ onevm show 9
>
> VIRTUAL MACHINE 9 INFORMATION
>
>
> ID             : 9
>
> NAME           : ttylinux
>
> STATE          : ACTIVE
>
> LCM_STATE      : RUNNING
>
> START TIME     : 12/14 18:47:11
>
> END TIME       : -
>
> DEPLOY ID:     : one-9
>
>
>
> VIRTUAL MACHINE MONITORING
>
>
> NET_TX         : 0
>
> NET_RX         : 0
>
> USED MEMORY    : 0
>
> USED CPU       : 0
>
>
>
> VIRTUAL MACHINE TEMPLATE
>
>
> CPU=0.1
>
> DISK=[
>
>   DISK_ID=0,
>
>   READONLY=no,
>
>   SOURCE=/srv/cloud/one/one-templates/ttylinux.img,
>
>   TARGET=hda ]
>
> FEATURES=[
>
>   ACPI=no ]
>
> MEMORY=64
>
> NAME=ttylinux
>
> NIC=[
>
>   BRIDGE=br0,
>
>   IP=192.168.2.71,
>
>   MAC=02:00:c0:a8:02:47,
>
>   NETWORK=Small network,
>
>   NETWORK_ID=1 ]
>
> VMID=9
>
>
>
> #######
>
>
>
> debian-01:~/one-templates$ onehost list
>
>   ID NAME              CLUSTER  RVM   TCPU   FCPU   ACPU    TMEM    FMEM
> STAT
>
>    0 192.168.2.61      default    1    100     99     90  377.2M  349.1M
> on
>
>
>
> ##
>
> debian-01:~/one-templates$ onehost show 0
>
> HOST 0 INFORMATION
>
>
> ID                    : 0
>
> NAME                  : 192.168.2.61
>
> CLUSTER               : default
>
> STATE                 : MONITORED
>
> IM_MAD                : im_kvm
>
> VM_MAD                : vmm_kvm
>
> TM_MAD                : tm_nfs
>
>
>
> HOST SHARES
>
>
> MAX MEM               : 386252
>
> USED MEM (REAL)       : 62020
>
> USED MEM (ALLOCATED)  : 65536
>
> MAX CPU               : 100
>
> USED CPU (REAL)       : 1
>
> USED CPU (ALLOCATED)  : 10
>
> RUNNING VMS           : 1
>
>
>
> MONITORING INFORMATION
>
>
> ARCH=i686
>
> CPUSPEED=2984
>
> FREECPU=98.3
>
> FREEMEMORY=357524
>
> HOSTNAME=debian-node01
>
> HYPERVISOR=kvm
>
> MODELNAME=Intel(R) Pentium(R) 4 CPU 3.00GHz
>
> NETRX=0
>
> NETTX=0
>
> TOTALCPU=100
>
> TOTALMEMORY=386252
>
> USEDCPU=1.7
>
> USEDMEMORY=62020
>
>
>
> #########
>
>
>
> debian-01:~/one-templates$ onevnet list
>
>   ID USER     NAME              TYPE BRIDGE P #LEASES
>
>    1 username Small network    Fixed    br0 N       1
>
> ##
>
> debian-01:~/one-templates$ onevnet show 1
>
> VIRTUAL NETWORK 1 INFORMATION
>
>
> ID:       : 1
>
> UID:      : 0
>
> PUBLIC    : N
>
>
>
> VIRTUAL NETWORK TEMPLATE
>
>
> BRIDGE=br0
>
> LEASES=[ IP=192.168.2.71 ]
>
> NAME=Small network
>
> TYPE=FIXED
>
>
>
> LEASES INFORMATION
>
>
> LEASE=[ IP=192.168.2.71, MAC=02:00:c0:a8:02:47, USED=1, VID=9 ]
>
>
>
> #######################
>
> THE DEPLOYMENT FILE:
>
> #######################
>
>
>
> debian-node01:/srv/cloud/one/var/9# more deployment.0
>
> <domain type='kvm'>
>
>             <name>one-9</name>
>
>             <memory>65536</memory>
>
>             <os>
>
>                         <type arch='i686'>hvm</type>
>
>                         <boot dev='hd'/>
>
>             </os>
>
>             <devices>
>
>                         <emulator>/usr/bin/kvm</emulator>
>
>                         <disk type='file' device='disk'>
>
>                                     <source
> file='/srv/cloud/one/var//9/images/disk.0'/>
>
>                                     <target dev='hda'/>
>
>                                     <driver name='qemu' type='raw'/>
>
>                         </disk>
>
>                         <interface type='bridge'>
>
>                                     <source bridge='br0'/>
>
>                                     <mac address='02:00:c0:a8:02:47'/>
>
>                         </interface>
>
>             </devices>
>
> </domain>
>
>
>
> #######################
>
> THE VM LOG FILE
>
> #######################
>
>
>
> deployment.0  images  transfer.0.prolog  vm.log
>
> debian-node01:/srv/cloud/one/var/9# more vm.log
>
> Tue Dec 14 18:47:14 2010 [DiM][I]: New VM state is ACTIVE.
>
> Tue Dec 14 18:47:14 2010 [LCM][I]: New VM state is PROLOG.
>
> Tue Dec 14 18:47:14 2010 [VM][I]: Virtual Machine has no context
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh:
> debian-01:/srv/cloud/one/one-templates/ttylinux.img 192.1
>
> 68.2.61:/srv/cloud/one/var//9/images/disk.0
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh: DST:
> /srv/cloud/one/var//9/images/disk.0
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh: Creating directory
> /srv/cloud/one/var//9/images
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh: Executed "mkdir -p
> /srv/cloud/one/var//9/images".
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh: Executed "chmod a+w
> /srv/cloud/one/var//9/images".
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh: Cloning
> /srv/cloud/one/one-templates/ttylinux.img
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh: Executed "cp -r
> /srv/cloud/one/one-templates/ttylinux.img
>
>  /srv/cloud/one/var//9/images/disk.0".
>
> Tue Dec 14 18:47:17 2010 [TM][I]: tm_clone.sh: Executed "chmod a+rw
> /srv/cloud/one/var//9/images/disk.0"
>
> .
>
> Tue Dec 14 18:47:17 2010 [LCM][I]: New VM state is BOOT
>
> Tue Dec 14 18:47:17 2010 [VMM][I]: Generating deployment file:
> /srv/cloud/one/var/9/deployment.0
>
> Tue Dec 14 18:47:19 2010 [LCM][I]: New VM state is RUNNING
>
> Tue Dec 14 18:57:29 2010 [VMM][D]: Monitor Information:
>
>             CPU   : -1
>
>             Memory: 65536
>
>             Net_TX: -1
>
>             Net_RX: -1
>
>
>
>
>
> --
>
> Christophe Hamerling
>
> R&D Engineer & Project Leader
>
> Petals Link - SOA open-source company
>
> OW2 PEtALS SOA Suite Comitter
>
> Skype : christophe.hamerling
>
> Jabber : chamerling at jabber.org
>
> Blog : http://chamerling.org
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Christophe Hamerling
R&D Engineer & Project Leader
Petals Link - SOA open-source company
OW2 PEtALS SOA Suite Comitter
Skype : christophe.hamerling
Jabber : chamerling at jabber.org
Blog : http://chamerling.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20101215/dbeb21ca/attachment-0003.htm>


More information about the Users mailing list