[lxc-users] incorrect info on linuxcontainers.org
Serge Hallyn
serge.hallyn at ubuntu.com
Fri Feb 7 05:12:40 UTC 2014
Quoting ivo welch (ivo.welch at anderson.ucla.edu):
> (there was no email admin address to send corrections to, so I thought
> I would post it here. I am a *complete* novice. I wanted to try out
> lxc). I read the main page and followed it:)
>
> How do I use it?
>
> More details are available in the individual manpages shipped with LXC
> itself. But a basic example of how to create, start and stop a
> container would be as follow:
>
> lxc-create -t ubuntu -n p1
> lxc-start -n p1 -d
> lxc-ls --fancy p1
> lxc-stop -n p1
This all should work, and
> ok, so I tried it. on my ubuntu 13.04 gnome system, this does not work:
>
> $ sudo bash
> # lxc-create -t ubuntu -n p1
> ...
> Generating locales...
> en_US.UTF-8... up-to-date
> Generation complete.
> Creating SSH2 RSA key; this may take some time ...
> Creating SSH2 DSA key; this may take some time ...
> Creating SSH2 ECDSA key; this may take some time ...
> invoke-rc.d: policy-rc.d denied execution of start.
>
> ##
> # The default user is 'ubuntu' with password 'ubuntu'!
> # Use the 'sudo' command to run tasks as root in the container.
> ##
>
> # lxc-start -n -p1 -d
Is this exactly what you typed? If so, the problem is that you put the
dash in front of '-p1'. p1 is the name of the container you want to
start.
It has been pointed out to me regarding my blog posts that it would be
helpful to always use long arguments the first time they are introduced,
i.e.
lxc-create --template --name p1
lxc-start --name p1 --daemon
lxc-ls --fancy
lxc-stop --name p1
> lxc-start: Executing '/sbin/init' with no configuration file may crash the host
>
>
> this is probably explained elsewhere, but if the function of the home
> page is to get novices to try, posting a set of starter instructions
> that work under vanilla ubuntu would be helpful.
>
> in addition, may I suggest stating in the document how one would
> access/ssh into the container? does it have a host-ip or interface?
> this would make novicing into lxc easier, too.
lxc-ls --fance (lxc-ls -f) will show you the ip address of the running
container. You can also set up a rule
server=/lxc/10.0.3.1
in /etc/dnsmasq.conf so that you can just
ssh p1.lxc
and have dnsmasq resolve the (<container>.lxc) name for you.
> I don't want to waste everyone's time, so I will probably move on to
> some other software experiments...
Suggestions for making the documentation more useful are definately
not a waste of time.
thanks,
-serge
More information about the lxc-users
mailing list