Mount an SMB share and use iGPU on an unprivileged Debian 12 LXC container in Proxmox⚓︎
Procedure⚓︎
Prerequisites:
Create an unprivileged Debian 12 LXC container.
Inside the LXC container, use the root
user to create a non-root user with your name. In the case of mine I wanted to add it to the sudo
and docker
groups after installing Docker inside the LXC container.
Change the user password to whatever you need.
This user's default UID:GID
will be 1000:1000
. If not, create it with:
Take note of this UID:GID
as we'll use it to map the share in Proxmox. The share itself can be on another system. We'll mount it soon. I use an Unraid VM in this same host for this.
SMB share⚓︎
In the Proxmox host⚓︎
We'll create a user that can be mapped from the host to the LXC container. If we don't do this step, we'll end up with just read access inside the LXC container.
Proxmox maps the users and groups from the host to the LXC containers starting at UID:GID
=100000:100000
.
The created ismael
user then:
- Inside the LXC container UID: 1000
- Inside the host UID: 101000
Create a group on the host with GID=101000 that will own the directory we'll create for the SMB share
Create the same user that we'll use inside the LXC container but with the right UID:GID
combination
Make a directory for the share
Change said directory's owner to the previously created user
Modify the /etc/fstab
file to mount the SMB share on the directory we created
Copy this line inside the nano editor for /etc/fstab
(note the guest
part as my SMB share does not have a password set)
If you use a password for your share
//192.168.0.10/media /mnt/media cifs username=<username>,password=<password>,rw,uid=1000,gid=1000,file_mode=0777,dir_mode=0777 0 0
Reload the changes to /etc/fstab before mounting
Create a mountpoint in your LXC container pointing to the created share directory
Start your LXC container and the share will be mounted in /mnt/user/media
and you should be able to write to it!
iGPU⚓︎
Coming soon...