Pass hard disk to container - startup problem

vobo70

Well-Known Member
Nov 15, 2017
61
2
48
54
Warsaw, Poland
Hello,
I'm trying to pass two mounted hard disks to container (103)
when I start it I get:
Code:
lxc_map_ids: 3672 newuidmap failed to write mapping "newuidmap: uid range [1000-1001) -> [1000-1001) not allowed": newuidmap 458165 0 100000 1000 1000 1000 1 1001 101001 64530
lxc_spawn: 1791 Failed to set up id mapping.
__lxc_start: 2074 Failed to spawn container "103"
TASK ERROR: startup for container '103' failed
disks are mounted on proxmox host pve1 and user smbuser has rights:
Code:
root@pve1:/srv# ls -lah
total 16K
drwxr-xr-x  4 root    root    4.0K Mar 15 13:53 .
drwxr-xr-x 18 root    root    4.0K Mar 27 17:53 ..
drwxrwsr-x 17 root smbuser 4.0K Jun 10 10:00 vol1
drwxr-xr-x 18 root smbuser 4.0K Nov 22  2021 vol2
inside owner is smbuser:smbuser.
my 103.conf look like this:
Code:
arch: amd64
cores: 2
features: nesting=1
hostname: serwer
memory: 2048
mp0: /srv/vol1,mp=/srv/vol1
mp1: /srv/vol2,mp=/srv/vol2
net0: name=eth0,bridge=vmbr0,hwaddr=CA:9B:14:95:5B:DD,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local:103/vm-103-disk-0.raw,size=8G
swap: 1024
unprivileged: 1
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1000 1000 1
lxc.idmap: u 1001 101001 64530
lxc.idmap: g 1001 101001 64530
smbuser exist on both host and container and have uid/gid: 1000
Code:
root@pve1:/srv# id smbuser
uid=1000(smbuser) gid=1000(smbuser) groups=1000(smbuser)
user root added to group smbuser on host
Can I kindly ask for help.
Thanks in advance.
Regards,
Maciek
 
lxc.idmap: u 1001 101001 64530
lxc.idmap: g 1001 101001 64530
You are only mapping UID/GID 1001-65530 to 101001-165530. Mapping of 65530-65535 to 165530-165535 is missing. Try it with:
Code:
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1000 1000 1
lxc.idmap: u 1001 101001 64535
lxc.idmap: g 1001 101001 64535
 
tried but still no luck:
Code:
lxc_map_ids: 3672 newgidmap failed to write mapping "newgidmap: gid range [1000-1001) -> [1000-1001) not allowed": newgidmap 464103 0 100000 1000 1000 1000 1 1001 101001 64535
lxc_spawn: 1791 Failed to set up id mapping.
__lxc_start: 2074 Failed to spawn container "103"
TASK ERROR: startup for container '103' failed[/CODE
 

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!