[lxc-users] Unavailable loop devices

Serge Hallyn serge.hallyn at ubuntu.com
Tue May 6 14:59:39 UTC 2014


Nak.  Not until we hear more from Seth about his devloop or
namespaced devtmpfs.  Although a commented-out pair of lines
with an explanation above it would be ok.

Quoting CDR (venefax at gmail.com):
> Dear Mike
> It does work indeed.
> I suggest that the developers add these two lines to the sample configuration.
> Yours
> Philip
> 
> On Tue, May 6, 2014 at 9:28 AM, Michael H. Warfield <mhw at wittsend.com> wrote:
> > On Tue, 2014-05-06 at 06:25 -0400, CDR wrote:
> >> Dear Friends
> >
> >> I succesfully created a SLES 11 SP3 container, but when I try to do this
> >
> >> mount -o loop /images/SLE-11-SP3-SDK-DVD-x86_64-GM-DVD1.iso /media
> >
> >> mount: Could not find any loop device. Maybe this kernel does not know
> >>        about the loop device? (If so, recompile or `modprobe loop'.)
> >
> > Add the following to your container configuration file:
> >
> > lxc.cgroup.devices.allow = c 10:137 rwm # loop-control
> > lxc.cgroup.devices.allow = b 7:* rwm    # loop*
> >
> > Then make sure you have the following devices in your container /dev
> > directory...
> >
> > brw-rw----. 1 root disk  7,   0 May  2 13:03 /dev/loop0
> > brw-rw----. 1 root disk  7,   1 May  2 13:03 /dev/loop1
> > brw-rw----. 1 root disk  7,   2 May  2 13:03 /dev/loop2
> > brw-rw----. 1 root disk  7,   3 May  2 13:03 /dev/loop3
> > crw-------. 1 root root 10, 237 May  2 13:03 /dev/loop-control
> >
> > Regards,
> > Mike
> >
> >> My host is Fedora 20 and the LXC version is
> >
> >> rpm -qa | grep lxc
> >> libvirt-daemon-lxc-1.1.3.4-4.fc20.x86_64
> >> libvirt-daemon-driver-lxc-1.1.3.4-4.fc20.x86_64
> >> lxc-devel-1.0.0-1.fc20.x86_64
> >> lxc-debuginfo-1.0.0-1.fc20.x86_64
> >> lxc-libs-1.0.0-1.fc20.x86_64
> >> lxc-1.0.0-1.fc20.x86_64
> >
> >> the configuration is:
> >>
> >> lxc.start.auto = 0
> >> lxc.start.delay = 5
> >> lxc.start.order = 10
> >>
> >> # When using LXC with apparmor, uncomment the next line to run unconfined:
> >> #lxc.aa_profile = unconfined
> >>
> >> 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
> >> lxc.cgroup.devices.allow = c 136:* rwm
> >> lxc.cgroup.devices.allow = c 5:2 rwm
> >> # rtc
> >> lxc.cgroup.devices.allow = c 254:0 rwm
> >>
> >> # mounts point
> >> lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
> >> lxc.mount.entry = sysfs sys sysfs defaults  0 0
> >> lxc.mount.entry = /images  /var/lib/lxc/utel-kde/rootfs/images none bind 0 0
> >>
> >>
> >> lxc.network.type=macvlan
> >> lxc.network.macvlan.mode=bridge
> >> lxc.network.link=eth1
> >> lxc.network.flags=up
> >> lxc.network.hwaddr = e2:91:a8:17:97:e4
> >> lxc.network.ipv4 = 0.0.0.0/21
> >>
> >>
> >> How do make the kernel loop module available for the container?
> >>
> >> Yours
> >> Philip
> >> _______________________________________________
> >> lxc-users mailing list
> >> lxc-users at lists.linuxcontainers.org
> >> http://lists.linuxcontainers.org/listinfo/lxc-users
> >
> > --
> > Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
> >    /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
> >    NIC whois: MHW9          | An optimist believes we live in the best of all
> >  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
> >
> >
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> 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