[lxc-users] incorrect info on linuxcontainers.org

ivo welch ivo.welch at gmail.com
Fri Feb 7 05:34:56 UTC 2014


ugghhh...apologies.  big apologies.  mea culpa.

so, here are complete novice impressions:

* yes, long option names would be better.  maybe a longer name for the
container, too, to make it clear that p1 is not an option?!

* is this mailing list the appropriate destination for FAQ requests,
website suggestions, etc.?  if so, it would be nice to state this at
the bottom of the page.  if not, the right destination there would be
useful.

* lxc works well and easy.  highly recommended.  I think this is what
I have been looking for---a safe way to run a risky perl cgi program.

* now, after I get into my lxc-container p1, I was a bit surprised by
the fact that a "shutdown now" inside the lxc p1 container did not
shut down and return me to my original host.  instead, I would stop
lxc via lxc-stop from another terminal.

* on the docs, I would put under the 'lxc-start' a comment that says
  ## this will start the container and ask you to log into it.
  ## you can then execute arbitrary commands, such as apt-get install apache2
then, to the casual reader, it is immediately clear that this is where
one wants to get to.

* under the lxc-create, I would say where the p1 files are actually
created.  it seems to work magic---I don't see a new file in my home
or Documents directory.

* I see that dockers is also built on lxc.  I was planning to look at it next.

thanks for pointing out my mistake...and being nice about telling
me...and putting lxc together.

regards,

/iaw


----
Ivo Welch (ivo.welch at gmail.com)
http://www.ivo-welch.info/
J. Fred Weston Professor of Finance
Anderson School at UCLA, C519
Director, UCLA Anderson Fink Center for Finance and Investments
Free Finance Textbook, http://book.ivo-welch.info/
Editor, Critical Finance Review, http://www.critical-finance-review.org/



On Thu, Feb 6, 2014 at 9:12 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> 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
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list