[one-users] lxc domain's config file doesn't work when I create a lxc domain using opennebula

cmcc.dylan dx10years at 126.com
Mon Dec 10 02:52:05 PST 2012


Hi, everyone!


     I find a  problem after i create lxc domain by opennebula and i hope someone can give some help. 
     As we known, lxc domain's configuration file is "config"  and it's used to configure the lxc domain, for example,as follows.
     when i log into the lxc domain, i find the network card's mac address is not  "00:16:3e:cb:ea:70" and it also doesn't use " lxc.network.link=kvmbr0".  and the values of "lxc.rootfs" and "lxc.mount" are wrong.


   I think the lxc domain can not use this configuration file.  if so, how do I configure the lxc domain.
(1) configuration file -- "config"   
  ----------------------------------------------------------------------------------------------------
  1 lxc.network.type=veth
  2 lxc.network.link=kvmbr0
  3 lxc.network.flags=up
  4 lxc.network.hwaddr = 00:16:3e:cb:ea:70
  5 lxc.utsname = lxc
  6 
  7 lxc.devttydir = lxc
  8 lxc.tty = 4
  9 lxc.pts = 1024
 10 lxc.rootfs = /one_images/1/images/lxc/rootfs
 11 lxc.mount  = /one_images/1/images/lxc/fstab
 12 lxc.arch = amd64
 13 lxc.cap.drop = sys_module mac_admin
 14 lxc.pivotdir = lxc_putold
 15 
 16 # uncomment the next line to run the container unconfined:
 17 #lxc.aa_profile = unconfined
 18 
 19 lxc.cgroup.devices.deny = a
 20 # Allow any mknod (but not using the node)
 21 lxc.cgroup.devices.allow = c *:* m
 22 lxc.cgroup.devices.allow = b *:* m
 23 # /dev/null and zero
 24 lxc.cgroup.devices.allow = c 1:3 rwm
 25 lxc.cgroup.devices.allow = c 1:5 rwm
 26 # consoles
 27 lxc.cgroup.devices.allow = c 5:1 rwm
 28 lxc.cgroup.devices.allow = c 5:0 rwm
 29 #lxc.cgroup.devices.allow = c 4:0 rwm
 30 #lxc.cgroup.devices.allow = c 4:1 rwm


(2) the real phenomenon


ubuntu at lxc:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:d4:ca:f7  
          inet addr:192.168.122.27  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fed4:caf7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9715 errors:0 dropped:0 overruns:0 frame:0
          TX packets:931 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:504559 (504.5 KB)  TX bytes:242719 (242.7 KB)


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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20121210/16832b05/attachment.htm>


More information about the Users mailing list