Does Proxmox support LXC dir backend ?

yreveillon.ext

New Member
Oct 23, 2021
1
0
1
45
Hi,

With LXC, I can have :
Host : /data/vm/rootfs
And the LXC VM boot on /data/vm/rootfs, which is a simple directory on the host.

How to do the same thing under Promox ?
I can create a raw file to become the rootfs then add with :
pct set <id> -mp0 /data/vm/rootfs/home,mp=/home,backup=0

But how to make this for the root VM ?

In LXC config, this is do with :
lxc.rootfs.path = dir:/data/vm/rootfs

Thanks
 
Hi,

With LXC, I can have :
Host : /data/vm/rootfs
And the LXC VM boot on /data/vm/rootfs, which is a simple directory on the host.

How to do the same thing under Promox ?
I can create a raw file to become the rootfs then add with :
pct set <id> -mp0 /data/vm/rootfs/home,mp=/home,backup=0

But how to make this for the root VM ?

In LXC config, this is do with :
lxc.rootfs.path = dir:/data/vm/rootfs

Thanks
Hi,
Lxc and lxc in proxmox are two really differents thinks: most of options and commands are modified in Proxmox environment. But you can tey to puah manually yours tips directly in container configuration file located /etc/pve/lxc/
 
the first question would be why you want to do that ;) you can access a container's file using 'pct mount' and 'pct pull'/'pct push', so it's usually better to use real volumes and all the advantages that gives you over a plain directory.

that being said, there are two options:
- use ZFS, where containers use datasets, which are only bind-mounted into the container and exist as mounted datasets on the hypervisor host
- use --rootfs STORAGE:0,size=0 where STORAGE is the ID of your directory storage - this will allocate a directory instead of an image file, but won't support snapshots and other things
 

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!