Proxmox adding existing ext4 harddisk to LXC container

Tomm

New Member
Jul 9, 2025
13
2
3
Hello, On a testserver I've installed Proxmox 8 and installed a samba server according to this youtube video.
https://www.youtube.com/watch?v=Hu3t8pcq8O0

I've added two SATA drives, from new, formatted them and without problems added them to the LXC.

In a Linux VM, it was quiet easy using "qm set" but adding a existing ext4 drive to a Linux container, I didn't found the solution yet.

Can somebody point me to a manual how to add an existing HDD EXT4 to an LXC?

Thank you very much.

Tom
 
Wouldn't you just add them as a mount point as shown in the video under the section 'Container Mount Points'?

FWIW, here's another good video on doing the same general thing (setting up a NAS share on Proxmox).
 
Last edited:
Hello, On a testserver I've installed Proxmox 8 and installed a samba server according to this youtube video.
https://www.youtube.com/watch?v=Hu3t8pcq8O0Sprunki Retake

I've added two SATA drives, from new, formatted them and without problems added them to the LXC.

In a Linux VM, it was quiet easy using "qm set" but adding a existing ext4 drive to a Linux container, I didn't found the solution yet.

Can somebody point me to a manual how to add an existing HDD EXT4 to an LXC?

Thank you very much.

Tom
Hey Tom, you can't directly pass a whole SATA drive into an LXC like you can with a VM using qm set. For LXC containers, Proxmox expects storage to be managed via mount points. What you should do is use pvesm to create a directory-based storage (like a folder on your formatted drives) and then bind-mount it into the container using lxc.mount.entry in the container’s config file (/etc/pve/lxc/<container-id>.conf). Just make sure the drives are mounted on the host first, then point the LXC to specific directories on them. It’s a bit different from VMs, but works well once set up.
 
Last edited:
The idea that Proxmox is built on Debian and so it would be a bit foolish to use another OS on top of it, as a NAS/Linux server, was triggering my idea to use a LXC directly on Proxmox.
But as I understand, like in Docker, I've to link disks, users and groups to the LXC.
I'll guess my server is powerfull enough to run an extra OS on top of it.

But, curious as I am, I'm going to study it.

@memilanuk Thank you for pointing me to that video. He's good. I'm going to study how he does it.

@SprunkiRetake Thank You, I'm going to study that as well.