<div dir="ltr"><div><div>Hi Tamas,<br><br></div>Thanks for you reply,<br><br>>>Please do not crosspost.<br>
</div>Sorry Tamas, I'm new to lxc, I won't repeat it again. I tried to a lot find the solution elsewhere but of no use. <br><div>
<br>
>>In the container config:<br>
>><br>
>>lxc.aa_profile = lxc-container-default--with-<div id=":x6">>>loops<br>
>># loop<br>
>>lxc.cgroup.devices.allow = b 7:* rwm<br>
>>lxc.cgroup.devices.allow = c 10:237 rwm<br>
</div><div id=":x6">Should i create a new container with this property in config file or will it work if i change and start the container with the new config file<br></div><div id=":x6">
<br>
>>apparmor:<br>
>><br>
>>$ cat /etc/apparmor.d/lxc/lxc-default--with-loops<br>
>># Do not load this file.  Rather, load /etc/apparmor.d/lxc-containers, which<br>
>># will source all profiles under /etc/apparmor.d/lxc<br>
>><br>
>>profile lxc-container-default--with-loops flags=(attach_disconnected,mediate_deleted) {<br>
>><br>
>>[.... something default, can be inherited, check Quantal configuration ....]<br>
>><br>>>  # custom<br>
>>   mount fstype=iso9660 -> /mnt/**,<br>
>>}</div><br></div><div>I dont have any file called lxc-default--with-loops. I just have the below file. Should i add <br># custom<br>mount fstype=iso9660 -> /mnt/**,<br>
</div><div>in this file only. should i change ** to anything or should it be **<br></div><div><br><br>root@ubuntu:/etc/apparmor.d/lxc# ls<br>lxc-default<br>root@ubuntu:/etc/apparmor.d/lxc# cat lxc-default <br># Do not load this file.  Rather, load /etc/apparmor.d/lxc-containers, which<br>

# will source all profiles under /etc/apparmor.d/lxc<br><br>profile lxc-container-default flags=(attach_disconnected,mediate_deleted) {<br>  network,<br>  capability,<br>  file,<br>  umount,<br><br>  # ignore DENIED message on / remount<br>

  deny mount options=(ro, remount) -> /,<br><br>  # allow tmpfs mounts everywhere<br>  mount fstype=tmpfs,<br><br>  # allow mqueue mounts everywhere<br>  mount fstype=mqueue,<br><br>  # allow fuse mounts everywhere<br>

  mount fstype=fuse.*,<br><br>  # the container may never be allowed to mount devpts.  If it does, it<br>  # will remount the host's devpts.  We could allow it to do it with<br>  # the newinstance option (but, right now, we don't).<br>

  deny mount fstype=devpts,<br><br>  # allow bind mount of /lib/init/fstab for lxcguest<br>  mount options=(rw, bind) /lib/init/fstab.lxc/ -> /lib/init/fstab/,<br><br>  # deny writes in /proc/sys/fs but allow fusectl to be mounted<br>

  mount fstype=binfmt_misc -> /proc/sys/fs/binfmt_misc/,<br>  deny @{PROC}/sys/fs/** wklx,<br><br>  # block some other dangerous paths<br>  deny @{PROC}/sysrq-trigger rwklx,<br>  deny @{PROC}/mem rwklx,<br>  deny @{PROC}/kmem rwklx,<br>

  deny @{PROC}/sys/kernel/[^s][^h][^m]* wklx,<br>  deny @{PROC}/sys/kernel/*/** wklx,<br><br>  # deny writes in /sys except for /sys/fs/cgroup, also allow<br>  # fusectl, securityfs and debugfs to be mounted there (read-only)<br>

  mount fstype=fusectl -> /sys/fs/fuse/connections/,<br>  mount fstype=securityfs -> /sys/kernel/security/,<br>  mount fstype=debugfs -> /sys/kernel/debug/,<br>  deny mount fstype=debugfs -> /var/lib/ureadahead/debugfs/,<br>

  mount fstype=proc -> /proc/,<br>  mount fstype=sysfs -> /sys/,<br>  deny /sys/[^f]*/** wklx,<br>  deny /sys/f[^s]*/** wklx,<br>  deny /sys/fs/[^c]*/** wklx,<br>  deny /sys/fs/c[^g]*/** wklx,<br>  deny /sys/fs/cg[^r]*/** wklx,<br>

}<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 January 2013 22:16, Papp Tamas <span dir="ltr"><<a href="mailto:tompos@martos.bme.hu" target="_blank">tompos@martos.bme.hu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 01/10/2013 05:36 PM, Sujay M wrote:<br>
> Hi all,<br>
><br>
> I have created a container vm0 using the ubuntu template. I want to use /mnt/sdb1/ as loopback<br>
> storage. so if i try to mount it i'm getting<br>
><br>
> root@vm0:~# mount /mnt/sdb1/<br>
> mount: Could not find any loop device. Maybe this kernel does not know<br>
>         about the loop device? (If so, recompile or `modprobe loop'.)<br>
><br>
> root@vm0:~# modprobe loop<br>
> FATAL: Could not load /lib/modules/3.2.0-23-generic/modules.dep: No such file or directory<br>
><br>
> How can i overcome this problem? Please help. Thanks in advance.<br>
<br>
<br>
</div>Please do not crosspost.<br>
<br>
<br>
In the container config:<br>
<br>
lxc.aa_profile = lxc-container-default--with-loops<br>
# loop<br>
lxc.cgroup.devices.allow = b 7:* rwm<br>
lxc.cgroup.devices.allow = c 10:237 rwm<br>
<br>
<br>
apparmor:<br>
<br>
$ cat /etc/apparmor.d/lxc/lxc-default--with-loops<br>
# Do not load this file.  Rather, load /etc/apparmor.d/lxc-containers, which<br>
# will source all profiles under /etc/apparmor.d/lxc<br>
<br>
profile lxc-container-default--with-loops flags=(attach_disconnected,mediate_deleted) {<br>
<br>
[.... something default, can be inherited, check Quantal configuration ....]<br>
<br>
<br>
   # custom<br>
   mount fstype=iso9660 -> /mnt/**,<br>
}<br>
<br>
<br>
<br>
tamas<br>
<br>
------------------------------------------------------------------------------<br>
Master Visual Studio, SharePoint, SQL, <a href="http://ASP.NET" target="_blank">ASP.NET</a>, C# 2012, HTML5, CSS,<br>
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current<br>
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft<br>
MVPs and experts. ON SALE this month only -- learn more at:<br>
<a href="http://p.sf.net/sfu/learnmore_122712" target="_blank">http://p.sf.net/sfu/learnmore_122712</a><br>
_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Best Regards,<br><br>Sujay M<br>Final year B.Tech<br>Computer Engineering<br>NITK Surathkal<br><br>contact: +918971897571<br></div>
</div>