[Lxc-users] lxc-execute: failed to move 'eth2' to the container : Invalid argument
lhffjzh
lhffjzh at 126.com
Wed May 29 02:44:32 UTC 2013
Hi Serge,
Thanks very much for your help, we'll upgrade kernel and have a trial.
Regards,
Haifeng
-----Original Message-----
From: Serge Hallyn [mailto:serge.hallyn at ubuntu.com]
Sent: Wednesday, May 29, 2013 5:01 AM
To: lhffjzh
Cc: lxc-users
Subject: Re: [Lxc-users] lxc-execute: failed to move 'eth2' to the container
: Invalid argument
Looking at git history, I think you need a kernel newer than 2.6.34 to
be able to move phsyical devices. The reason is that tagged directories
in sysfs were not introduced until then.
-serge
Quoting lhffjzh (lhffjzh at 126.com):
> 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
>
----------------------------------------------------------------------------
--
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring
service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
More information about the lxc-users
mailing list