proxmox7 mount file inside LXC container

Apr 25, 2023
3
0
1
hi, i have LXC container and will like to mount file
my /etc/pve/lxc/102.conf:
Bash:
arch: amd64
cores: 3
features: nesting=1
hostname: d
memory: 5120
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=FA:59:8D:CB:AD:47,type=veth
ostype: ubuntu
rootfs: local:102/vm-102-disk-0.raw,size=20G
swap: 512
unprivileged: 1

/var/lib/lxc/102/config
Bash:
lxc.cgroup.relative = 0
lxc.cgroup.dir.monitor = lxc.monitor/102
lxc.cgroup.dir.container = lxc/102
lxc.cgroup.dir.container.inner = ns
lxc.arch = amd64
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.include = /usr/share/lxc/config/ubuntu.userns.conf
lxc.seccomp.profile = /var/lib/lxc/102/rules.seccomp
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.mount.auto = sys:mixed
lxc.monitor.unshare = 1
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536
lxc.tty.max = 2
lxc.environment = TERM=linux
lxc.uts.name = d
lxc.cgroup2.memory.max = 5368709120
lxc.cgroup2.memory.swap.max = 536870912
lxc.rootfs.path = /var/lib/lxc/102/rootfs
lxc.net.0.type = veth
lxc.net.0.veth.pair = veth102i0
lxc.net.0.hwaddr = FA:59:8D:CB:AD:47
lxc.net.0.name = eth0
lxc.net.0.script.up = /usr/share/lxc/lxcnetaddbr
lxc.cgroup2.cpuset.cpus = 7,15,18

if i try to run : root@d:~# mount -o loop,ro my /mnt

i'm getting this error : mount: /mnt: mount failed: Operation not permitted.

any help will be appreciate
thank you
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!