[Lxc-users] Running Fedora12 container on Ubuntu

Nirmal Guhan vavatutu at gmail.com
Tue Jul 20 21:24:25 UTC 2010


I think the services are getting started but fail during the process.
Do you have the /var/lock/subsys directory in your container?

--Nirmal

On Tue, Jul 20, 2010 at 5:29 AM, Nikola Simidzievski
<nikola.simidzievski at gmail.com> wrote:
> Hi,
> This change boots the system, but none of the services is started. Here is
> an output:
> ===========================================
> ....
> touch: cannot touch `/var/lock/subsys/rsyslogd': No such file or directory
> Starting sshd:                                       [touch: cannot touch
> `/var/lock/subsys/sshd': No such file or directory
> MySQL Daemon failed to start.
> Starting MySQL:                                      [FAILED]
> touch: cannot touch `/var/lock/subsys/httpd': No such file or directory
> touch: cannot touch `/var/lock/subsys/local': No such file or directory
> .....................
> ============================================
>
> On Tue, Jul 20, 2010 at 2:06 PM, Daniel Lezcano <dlezcano at fr.ibm.com> wrote:
>>
>> On 07/20/2010 01:58 PM, Nikola Simidzievski wrote:
>>>
>>> Hi,
>>> I am trying to get Fedora 12 container on Ubuntu 10.4, but I have several
>>> problems. I installed new  rootfs using febootstrap , and configured it,
>>> and
>>> created new fstab (guided form
>>> http://blog.bodhizazen.net/linux/lxc-configure-fedora-containers ) :
>>>
>>> -----------------------------------------------------------------------------------------------
>>> none /lxc/rootfs.fedora/dev/pts devpts defaults 0 0
>>> none /lxc/rootfs.fedora/proc proc defaults 0 0
>>> none /lxc/rootfs.fedora/sys sysfs defaults 0 0
>>> #none /lxc/rootfs.fedora/var/lock tmpfs defaults 0 0
>>> #none /lxc/rootfs.fedora/var/run tmpfs defaults 0 0
>>> /etc/resolv.conf /lxc/rootfs.fedora/etc/resolv.conf none bind 0 0
>>> ----------------------------------------------------------------------
>>> My lxc conf. file look like this :
>>>
>>> ----------------------------------------------------------------------------------------------------
>>> lxc.utsname = fedora
>>> lxc.tty = 4
>>> lxc.network.type = veth
>>> lxc.network.flags = up
>>> lxc.network.link = br-node0
>>> lxc.network.name = eth0
>>> lxc.network.mtu = 1500
>>> lxc.network.ipv4 = 10.0.0.1/24
>>> lxc.rootfs = /lxc/rootfs.fedora
>>> lxc.mount = /lxc/fstab.fedora
>>> lxc.cgroup.devices.deny = a
>>> # /dev/null and zero
>>> lxc.cgroup.devices.allow = c 1:3 rwm
>>> lxc.cgroup.devices.allow = c 1:5 rwm
>>> # consoles
>>> lxc.cgroup.devices.allow = c 5:1 rwm
>>> lxc.cgroup.devices.allow = c 5:0 rwm
>>> lxc.cgroup.devices.allow = c 4:0 rwm
>>> lxc.cgroup.devices.allow = c 4:1 rwm
>>> # /dev/{,u}random
>>> lxc.cgroup.devices.allow = c 1:9 rwm
>>> lxc.cgroup.devices.allow = c 1:8 rwm
>>> # /dev/pts/* - pts namespaces are "coming soon"
>>> lxc.cgroup.devices.allow = c 136:* rwm
>>> lxc.cgroup.devices.allow = c 5:2 rwm
>>> # rtc
>>> lxc.cgroup.devices.allow = c 254:0 rwm
>>>
>>> ---------------------------------------------------------------------------------------------------------------
>>> When I start the machine with this setup I get this error:
>>> ==================================================
>>> lxc-start: Device or resource busy – failed to mount ‘none’ on
>>> ‘/lxc/rootfs.fedora/dev/pts’
>>> lxc-start: failed to setup the mounts for ‘fedora′
>>> lxc-start: failed to setup the container
>>> ====================================================
>>> So I remove the lxc.mount part from the conf. file and it starts normally
>>> but a get  error when I make ssh connection (PTY allocation request
>>> failed
>>> on channel 0) so I assume that has something to do with wrong mount on
>>> /dev/pts. I tried to mount it manually via chroot but then the booting
>>> slows
>>> down and services like mysqld and httpd can't be started. So any
>>> suggestions
>>> how to solve this?
>>
>> Can you check by removing the "none /lxc/rootfs.fedora/dev/pts devpts
>> defaults 0 0" line in the fstab and add lxc.pts=1 in the configuration file
>> ?
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>
>




More information about the lxc-users mailing list