Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried following the steps to create and start an lxc container from here: https://help.ubuntu.com/lts/serverguide/lxc.html

My host is running an up to date 64-bit Precise (12.04), and I'm trying to start a precise containers. I created the container like this:

sudo lxc-create -t ubuntu -n precise -- -r precise

and it seemed to complete succesfully. When I try and start, I get:

$ sudo lxc-start -n precise
lxc-start: failed to spawn 'precise'

and kern.log says:

Sep 27 09:27:15 hans kernel: [3738467.397433] device vethrtJYFO entered promiscuous mode
Sep 27 09:27:15 hans kernel: [3738467.399113] ADDRCONF(NETDEV_UP): vethrtJYFO: link is not ready
Sep 27 09:27:15 hans kernel: [3738467.409192] init: Failed to spawn network-interface (vethLNDNFP) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.412190] init: Failed to spawn network-interface-security (network-interface/vethLNDNFP) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.413059] init: Failed to spawn network-interface (vethLNDNFP) post-stop process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.417246] init: Failed to spawn network-interface (vethrtJYFO) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.419247] init: Failed to spawn network-interface-security (network-interface/vethrtJYFO) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.420327] init: Failed to spawn network-interface (vethrtJYFO) post-stop process: unable to change root directory: No such file or directory
share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

I think the package cgroup-lite is not installed. Try:

$ sudo apt-get install cgroup-lite
$ sudo cgroups-mount

And run the container again.

share|improve this answer
    
Seems to work. Bug in the deps of some package? –  NeilenMarais Dec 5 '13 at 14:07
    
@NeilenMarais lxc doesn't depend on cgroup-lite, but recommends it (or cgroup-bin). That could be the problem. –  nealmcb Dec 28 '13 at 20:52
1  
I had completely different stuff in kern.log, but installing cgroup-lite helped me as well. Thanks! –  Adam Ryczkowski Feb 8 at 19:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.