Discussion:
Current status of lxc on ubuntu lucid and red hat 6
(too old to reply)
张章
2012-05-11 02:54:00 UTC
Permalink
hello,all
I have tried starting linux container(lxc 0.7.5) on lucid and red hat 6, but both failed (succeeded in ubuntu precise)
The procedure I used is somehow standard:
1 using the lxc-ubuntu(not for red hat 6) script to prepare filesystem and then configuring the network part by hand
2 lxc-create -n lxc -f config
3 lxc-start -n lxc
For lucid, lxc-start simpily says "segament fault" and for red hat, I do not know what script to use.
Does anyone have some ideas? Or has anyone succeeded on lucid or rhel 6?

many thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120511/333d586a/attachment.html>
Fajar A. Nugraha
2012-05-11 04:30:17 UTC
Permalink
On Fri, May 11, 2012 at 9:54 AM, ?? <zhang_zhang at live.com> wrote:
> hello,all
> I have tried starting linux container(lxc 0.7.5) on lucid and red hat 6, but
> both failed (succeeded in ubuntu precise)

If a linux environment has recent-enough kernel and lxc userland
tools, it should work. So if you're willing to manually install both
(possibly compiliing from source), it should work. If it doesn't work,
usualy it's because either one or both component is too old.

That being said, I say don't bother. Seriously.

Just use something that's known to work for your host (e.g. precise),
and use whatever your application needs (lucid, rhel/centos6,
whatever) as guest container.

--
Fajar
张章
2012-05-11 06:06:10 UTC
Permalink
Is it porper to use different filesystems between host and guest container?
And is there red hat 6 template availble?

Thanks!



> Date: Fri, 11 May 2012 11:30:17 +0700
> Subject: Re: [Lxc-users] Current status of lxc on ubuntu lucid and red hat 6
> From: list at fajar.net
> To: zhang_zhang at live.com
> CC: lxc-users at lists.sourceforge.net
>
> On Fri, May 11, 2012 at 9:54 AM, ?? <zhang_zhang at live.com> wrote:
> > hello,all
> > I have tried starting linux container(lxc 0.7.5) on lucid and red hat 6, but
> > both failed (succeeded in ubuntu precise)
>
> If a linux environment has recent-enough kernel and lxc userland
> tools, it should work. So if you're willing to manually install both
> (possibly compiliing from source), it should work. If it doesn't work,
> usualy it's because either one or both component is too old.
>
> That being said, I say don't bother. Seriously.
>
> Just use something that's known to work for your host (e.g. precise),
> and use whatever your application needs (lucid, rhel/centos6,
> whatever) as guest container.
>
> --
> Fajar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120511/6d39218e/attachment.html>
Fajar A. Nugraha
2012-05-11 06:14:48 UTC
Permalink
On Fri, May 11, 2012 at 1:06 PM, ?? <zhang_zhang at live.com> wrote:
> Is it porper to use different filesystems between host and guest container?

Depends on what you need.

Using lvm+ext4 with a separate LV for each container would allow you
to set size limits to the guest container, while btrfs (even on the
same filesystem as the host) allows you to easily snapshot/clone
containers as long as they're in their on subvolume. WIth zfs you'd
get both ability, but some people consider zfsonlinux still not
suitable for production use.

> And is there red hat 6 template availble?

No.

However you take a look at
http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6

--
Fajar
张章
2012-05-11 08:43:10 UTC
Permalink
Thanks for your detailed explanation :)You told that "use ubuntu precise for my host and other (lucid, rhel/centos6) as guest container" Is that possible? I do not see any document for it.
Thanks

> Date: Fri, 11 May 2012 13:14:48 +0700
> Subject: Re: [Lxc-users] Current status of lxc on ubuntu lucid and red hat 6
> From: list at fajar.net
> To: zhang_zhang at live.com
> CC: lxc-users at lists.sourceforge.net
>
> On Fri, May 11, 2012 at 1:06 PM, ?? <zhang_zhang at live.com> wrote:
> > Is it porper to use different filesystems between host and guest container?
>
> Depends on what you need.
>
> Using lvm+ext4 with a separate LV for each container would allow you
> to set size limits to the guest container, while btrfs (even on the
> same filesystem as the host) allows you to easily snapshot/clone
> containers as long as they're in their on subvolume. WIth zfs you'd
> get both ability, but some people consider zfsonlinux still not
> suitable for production use.
>
> > And is there red hat 6 template availble?
>
> No.
>
> However you take a look at
> http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6
>
> --
> Fajar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120511/7fbbbe93/attachment.html>
Fajar A. Nugraha
2012-05-11 08:43:53 UTC
Permalink
On Fri, May 11, 2012 at 3:43 PM, ?? <zhang_zhang at live.com> wrote:
> Thanks for your detailed explanation :)
> You told that "use ubuntu precise for my host and other (lucid,
> rhel/centos6) as guest container"
> Is that possible?

Yes

> I do not see any document for it.

http://wiki.1tux.org/wiki/Lxc/Installation

--
Fajar
张章
2012-05-15 10:19:35 UTC
Permalink
Thanks for the tips.Using ubuntu precise as host and centos 6.2 as guest container just works fine for me.I have tried compiling linux kernel 3.3.6 and using lxc 0.8.0 to start linux container, but , unfortunately, failed. Everything goes well for me except for lxc-start command. The steps for preparing guest file system(which works well on ubuntu precise host) are at:http://wiki.1tux.org/wiki/Lxc/InstallationThe lxc-start command just gives the following error output and halts, no normal login-in promoting.I think I will simply use ubuntu precise as host. If anyone succeeds in using cetos6.2 as host please let me know.Many thanks!

init: readahead-collector main process (3) terminated with status Welcome to CentOS Starting udev: mkdir: cannot create directory `/dev/pts': File existsmkdir: cannot create directory `/dev/shm': File exists [ OK ]Setting hostname rhel6: [ OK ]Setting up Logical Volume Management: /dev/mapper/control: open failed: Operation not permitted Failure to communicate with kernel device-mapper driver. Check that device-mapper is available in the kernel. selabel_open failed: No such file or directory No volume groups found [ OK ]Checking filesystemsWARNING: couldn't open /etc/fstab: No such file or directory [ OK ]warning: can't open /etc/fstab: No such file or directorymount: can't find / in /etc/fstab or /etc/mtabMounting local filesystems: warning: can't open /etc/fstab: No such file or directory [ OK ]Enabling local filesystem quotas: [ OK ]Enabling /etc/fstab swaps: swapon: /etc/fstab: open failed: No such file or directory [FAILED]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120515/a12ad394/attachment.html>
Ulli Horlacher
2012-05-11 06:52:51 UTC
Permalink
On Fri 2012-05-11 (02:54), ???? wrote:

> I have tried starting linux container(lxc 0.7.5) on lucid and red hat 6, but both failed (succeeded in ubuntu precise)
> The procedure I used is somehow standard:
> 1 using the lxc-ubuntu(not for red hat 6) script to prepare filesystem and then configuring the network part by hand
> 2 lxc-create -n lxc -f config
> 3 lxc-start -n lxc
> For lucid, lxc-start simpily says "segament fault"

The default Ubuntu 10.04 kernel is too old, I have success with
linux-image-server-lts-backport-natty


See also

http://fex.rus.uni-stuttgart.de/lxc-ubuntu


--
Ullrich Horlacher Server- und Arbeitsplatzsysteme
Rechenzentrum E-Mail: horlacher at rus.uni-stuttgart.de
Universitaet Stuttgart Tel: ++49-711-685-65868
Allmandring 30 Fax: ++49-711-682357
70550 Stuttgart (Germany) WWW: http://www.rus.uni-stuttgart.de/
REF: <BLU146-W16470FF2B275D2DA281E85FC170 at phx.gbl>
Continue reading on narkive:
Loading...