[one-users] The leased IP is not correct

张佳宝 zhangjiabao at gmail.com
Fri Dec 25 00:54:17 PST 2009


Hi,
I create a virtual network named network-xenbr0,and I can see that it has
leased an ip to a VM.

---------------------
root at server images]# onevnet list
  ID USER     NAME              TYPE BRIDGE #LEASES
   6 root     network-xenbr0   Fixed xenbr0       *1*
[root at server images]# onevnet show 6
VIRTUAL NETWORK 6 INFORMATION

ID:       : 6
UID:      : 0

VIRTUAL NETWORK TEMPLATE

BRIDGE=xenbr0
LEASES=[ IP=192.168.1.11 ]
LEASES=[ IP=192.168.1.12 ]
LEASES=[ IP=192.168.1.13 ]
NAME=network-xenbr0
TYPE=FIXED

LEASES INFORMATION

LEASE=[ IP=192.168.1.11, MAC=00:03:c0:a8:01:0b, USED=1, VID=5 ]
LEASE=[ IP=192.168.1.12, MAC=00:03:c0:a8:01:0c, USED=1, VID=-1 ]
LEASE=[ IP=192.168.1.13, MAC=00:03:c0:a8:01:0d, USED=0, VID=-1 ]

[root at server images]# onevm list
  ID     USER     NAME STAT CPU     MEM        HOSTNAME        TIME
   5     root     vm-1 runn   0  524068          server 00 00:37:51
[root at server images]# onevm show 5
VIRTUAL MACHINE 5 INFORMATION

ID             : 5
NAME           : vm-1
STATE          : ACTIVE
LCM_STATE      : RUNNING
START TIME     : 12/24 10:37:08
END TIME       : -
DEPLOY ID:     : one-5

VIRTUAL MACHINE TEMPLATE

CPU=1
DISK=[
  READONLY=no,
  SOURCE=/srv/cloud/images/centos.5-3.x86-64.img,
  TARGET=sda ]
MEMORY=512
NAME=vm-1
*NIC=[*
*  BRIDGE=xenbr0,*
*  IP=192.168.1.11,*
*  MAC=00:03:c0:a8:01:0b,*
*  NETWORK=network-xenbr0,*
*  VNID=6 ]*
OS=[
  KERNEL=/boot/vmlinuz-2.6.18.8-xenU,
  ROOT=sda ]
VMID=5
---------------------------------

It seems that the ip 192.168.1.11 has leased to VM whose ID is 5,but I can
not communicate with this address,and if I log in the VM using order 'xm
console',I can see the VM's address is not 192.168.1.11,but 192.168.11.254.
------
[root at server images]# xm console 1

-bash-3.2# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:03:C0:A8:01:0B
          inet addr:192.168.11.254  Bcast:192.168.11.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:92094 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9145285 (8.7 MiB)  TX bytes:5836 (5.6 KiB)

---------------
Besides, the deployment.0 file used by xen and created by Opennebula is as
follow,and no IP address in vif there.
-------
name = 'one-11'
#O CPU_CREDITS = 256
memory  = '512'
kernel = '/boot/vmlinuz-2.6.18.8-xenU'
root = '/dev/sda'
disk = [
    'tap:aio:/srv/cloud/one/var/11/images/disk.0,sda,w',
]
vif = [
    'mac=00:03:c0:a8:01:0c,bridge=xenbr0',
]
------
Is anyone know why it is ,and where is the address 192.168.1.11?
BTW,xen should be configed to use bridge networking or router networking?
Thanks in advance.
Atlas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20091225/caa9e147/attachment-0001.htm>


More information about the Users mailing list