Hi,
I am trying to mount using "mount -o loop" on a container and I am not able to do it.
The container is running Debian 9. My Proxmox version is 5.2-8.
I have done lots of web searching and read many posts about similar attempts (but nothing identical). As a result of have this set up.
I have created an apparmor profile:
	
	
	
		
and have a container configuration file:
	
	
	
		
When I attempt to mount an ISO image within the container filesystem I get this error:
	
	
	
		
The container does not have any loop devices avaiable in /dev:
	
	
	
		
I think I might need to bind mount the hypervisor /dev/loop* devices into the container, but I can't work out how to do this.
If anyone can give me some advice or point me to an online guide I would really appreciate the help. If you need more information from me please let me know.
Thanks,
Jon
				
			I am trying to mount using "mount -o loop" on a container and I am not able to do it.
The container is running Debian 9. My Proxmox version is 5.2-8.
I have done lots of web searching and read many posts about similar attempts (but nothing identical). As a result of have this set up.
I have created an apparmor profile:
		Code:
	
	root@pve:~# cat /etc/apparmor.d/lxc/lxc-container-default-cgns-with-mounting
# Do not load this file.  Rather, load /etc/apparmor.d/lxc-containers, which
# will source all profiles under /etc/apparmor.d/lxc
#
# This profile is a combination of lxc-container-default-cgns and
# lxc-container-default-with-mounting and other options to allow SAMBA and
# iso9660 mounts.
profile lxc-container-default-cgns-with-mounting flags=(attach_disconnected,mediate_deleted) {
  #include <abstractions/lxc/container-base>
# From pofile lxc-container-default-cgns:
  # the container may never be allowed to mount devpts.  If it does, it
  # will remount the host's devpts.  We could allow it to do it with
  # the newinstance option (but, right now, we don't).
  deny mount fstype=devpts,
  mount fstype=cgroup -> /sys/fs/cgroup/**,
  mount fstype=cgroup2 -> /sys/fs/cgroup/**,
# From pofile lxc-container-default-with-mounting:
  # allow standard blockdevtypes.
  # The concern here is in-kernel superblock parsers bringing down the
  # host with bad data.  However, we continue to disallow proc, sys, securityfs,
  # etc to nonstandard locations.
  mount fstype=ext*,
  mount fstype=xfs,
  mount fstype=btrfs,
# Allow SAMBA mounts:
  mount fstype=cifs,
# Allow iso9660 mounts:
  mount fstype=iso9660,
}and have a container configuration file:
		Code:
	
	root@pve:~# cat /etc/pve/lxc/100.conf
arch: amd64
cores: 30
hostname: circle-wml-container
memory: 28610
net0: name=eth0,bridge=vmbr0,hwaddr=6E:4D:EE:3D:01:A1,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: zfs-containers:subvol-100-disk-1,size=4000G
swap: 4000
lxc.apparmor.profile: lxc-container-default-cgns-with-mounting
lxc.cgroup.devices.allow = b 7:* rwm
lxc.cgroup.devices.allow = c 10:237 rwmWhen I attempt to mount an ISO image within the container filesystem I get this error:
		Code:
	
	[jclark@circle-wml-container 16:45:46 ~]$ sudo mount -v -o loop /isos/SL-7.3-x86_64-netinst.iso /home/jclark/misc/mountTest/
mount: /home/jclark/misc/mountTest/: mount failed: Unknown error -1The container does not have any loop devices avaiable in /dev:
		Code:
	
	[jclark@circle-wml-container 16:55:10 ~]$ ls -l /dev/loop*
ls: cannot access '/dev/loop*': No such file or directoryI think I might need to bind mount the hypervisor /dev/loop* devices into the container, but I can't work out how to do this.
If anyone can give me some advice or point me to an online guide I would really appreciate the help. If you need more information from me please let me know.
Thanks,
Jon
 
	 
	 
 
		