Skip to content

Instantly share code, notes, and snippets.

@valorad
Last active October 24, 2023 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valorad/d29a30eb4812f1cf315c3b19d4df7e3b to your computer and use it in GitHub Desktop.
Save valorad/d29a30eb4812f1cf315c3b19d4df7e3b to your computer and use it in GitHub Desktop.
Proxmox Container Mounting

Need to login as root

Host: /etc/pve/lxc/XXX.conf

arch: amd64
cores: 1
features: nesting=1
hostname: MY_HOST_NAME
memory: 512
mp0: /path/to/dlctr,mp=/workspace/downloadCenter
net0: name=eth0,bridge=vmbr1,firewall=1,gw=10.10.10.1,hwaddr=XXXXXXXXXXXXXXXX,ip=10.10.10.10/24,type=veth
onboot: 1
ostype: alpine
rootfs: local-btrfs:XXX/vm-XXX-disk-0.raw,size=4G
swap: 512
unprivileged: 1


# uid map: from uid 0 map 1000 uids (in the ct) to the range starting 100000 (on the host), so 0..999 (ct) -> 100000..100999 (host)
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
# we map 1 uid starting from uid 1000 onto 1000, so 1000 -> 1000
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1000 1000 1
# we map the rest of 65535 from 1001 upto 101001, so 1001..65535 -> 101001..165535
lxc.idmap: u 1001 101001 64535
lxc.idmap: g 1001 101001 64535

Host: /etc/subuid

root:100000:65536
valorad:165536:65536
root:1000:1

Host: /etc/subgid

root:100000:65536
valorad:165536:65536
root:1000:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment