[Lxc-users] lxc-execute: failed to move 'eth2' to the container : Invalid argument

lhffjzh lhffjzh at 126.com
Sun May 26 02:50:57 UTC 2013


Hi Friends,

I am investigate lxc now, and I hope to configure a physical NIC(network) into a linux container, as the template "lxc-phys.conf" which in downloaded package, but I got a error "lxc-execute: failed to move 'eth2' to the container : Invalid argument" when I executed command by "lxc-execute", could anyone help me for this?

The OS is CentOS6.3 on my PC, there is a NIC "eth2" plugged on it, and I create a configuration file "./lxc.cfg" for starting physical NIC/network in LXC,  but it complain following error message.
 
# PC platform
[root at DEV_1_A brtest]# uname -a
Linux DEV_1_A 2.6.32-358.6.2.el6.centos.plus.x86_64 #1 SMP Thu May 16 17:43:34 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

# NIC "eth2" on my PC
[root at DEV_1_A brtest]# ifconfig  eth2
eth2      Link encap:Ethernet  HWaddr 00:1B:21:D1:B5:51  
          inet6 addr: fe80::21b:21ff:fed1:b551/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22781478 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11388043 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:34468071848 (32.1 GiB)  TX bytes:751688768 (716.8 MiB)
          Memory:fb400000-fb420000 

# ./lxc.cfg 
lxc.utsname = brtest
lxc.pts = 1024

# When using LXC with apparmor, uncomment the next line to run unconfined:
#lxc.aa_profile = unconfined

lxc.network.type = phys
lxc.network.flags = up
lxc.network.link = eth2
lxc.network.name = eth2
lxc.network.hwaddr = 00:1B:21:D1:B5:51
lxc.network.ipv4 = 10.16.1.2/24
lxc.network.ipv4.gateway = 10.16.1.1

# Error when start lxc
[root at DEV_1_A brtest]# lxc-create -n brtest -f ./lxc.cfg 
'brtest' created
[root at DEV_1_A brtest]# lxc-execute -n brtest -f ./lxc.cfg /bin/bash
lxc-execute: failed to move 'eth2' to the container : Invalid argument
lxc-execute: failed to create the configured network
lxc-execute: failed to spawn 'brtest'



Thanks and Regards,
Haifeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130526/ce39355f/attachment.html>


More information about the lxc-users mailing list