[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Serge Hallyn
How did you create this container? If I do: sudo lxc-create -t ubuntu -n e1 sudo chroot /var/lib/lxc/e1/rootfs apt-get update sudo chroot /var/lib/lxc/e1/rootfs apt-get install lxc sudo lxc-execute -n e1 /bin/echo hi I get lxc-init: failed to mount /dev/shm : No such file or directory hi If

Re: [Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Robert Collins
Hi, the wiki page I was following had no container, it was using an implicit one or something - that gave me the impression it could just act as an isolation layer around / , isolating only the things configured (e.g. dev access, or networking). That said, lxc-execute with an ephemeral mode looks

[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread B Clausius
Sorry for the incomplete info I am using a container without rootfs. Just type for a not existing container test: $ sudo lxc-execute -n test /bin/echo hi lxc-execute: Invalid argument - failed to get real path for '(null)' lxc-execute: failed to pin the container's rootfs lxc-execute: failed to

[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Serge Hallyn
Ah. I see now. Thanks, guys. There are actually two things you need to add to a configuration file to make this work. If I do: cat test.conf EOF lxc.aa_profile = unconfined lxc.rootfs = / EOF lxc-execute -n test -f test.conf -- /bin/echo hi That works for me. Skipping the pinning of

Re: [Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Robert Collins
Thanks Serge! -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/981955 Title: lxc-execute without config does not seem to work in precise To manage notifications about this bug go to:

[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-19 Thread B Clausius
** Attachment added: debug.out https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+attachment/3092780/+files/debug.out -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/981955

[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-16 Thread Serge Hallyn
Thanks for reporting this bug. The output (in particular '(null)' looks strange. Is lxc installed in the container? In particular, does it have /usr/lib/lxc/lxc-init and all its dependencies installed? Can you give the contents of debug.out after running: lxc-execute -l DEBUG -o debug.out