[SOLVED] PVE 4.1 - where's LXC rootfs

c.monty

Active Member
Mar 4, 2014
293
4
38
Hello!

For any LMC created in PVE4.1 a directory is created in /var/lib/lxc/<vm-id>.

But where are the files belonging to roofs?
The container is stopped, but no files are listed:
Code:
ls -l /var/lib/lxc/101/rootfs/
insgesamt 0
THX
 

c.monty

Active Member
Mar 4, 2014
293
4
38
arch: amd64
cpulimit: 1
cpuunits: 1024
hostname: vm101-router
memory: 512
nameserver: 85.88.19.10 213.73.91.35 94.75.228.28
net0: bridge=vmbr0,hwaddr=66:35:62:31:34:66,ip=dhcp,name=eth0,type=veth
net1: bridge=vmbr2,gw=192.168.100.1,hwaddr=3A:64:62:32:62:64,ip=192.168.100.1/24,name=eth1,type=veth
ostype: debian
rootfs: images:101/vm-101-disk-1.raw,size=4G
searchdomain: awesomeguyz.de
swap: 128
 

c.monty

Active Member
Mar 4, 2014
293
4
38
General question:
Are there any technical reasons to run Router-/Gateway-Server in Container (LXC)?
 
Last edited:

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
14,511
587
133
Eine grundsätzliche Frage:
Gibt es technische Gründe, die gegen den Betrieb eines Router-/Gateway-Servers im Container (LXC) sprechen?
This is an English forum only.
 

dietmar

Proxmox Staff Member
Staff member
Apr 28, 2005
16,707
373
103
Austria
www.proxmox.com
So the container data is on "images:101/vm-101-disk-1". You can get the file system path with

# pvesm path images:101/vm-101-disk-1
 

c.monty

Active Member
Mar 4, 2014
293
4
38
OK... I know quite well where the raw-file is located.
However, I was expecting to be able to chroot or write files directly into rootfs.
I thought when the container is started, the rootfs is "mounted" and I can read the file structure.
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
14,511
587
133
I thought when the container is started, the rootfs is "mounted" and I can read the file structure.
Use ZFS and you will get this.
 

dietmar

Proxmox Staff Member
Staff member
Apr 28, 2005
16,707
373
103
Austria
www.proxmox.com
I thought when the container is started, the rootfs is "mounted" and I can read the file structure.
LXC hides the container mount namespace from the host, so you cannot see the rootfs (unless you use ZFS). We plan to implement some helper commands to make it easier to copy files from/to containers.
 

c.monty

Active Member
Mar 4, 2014
293
4
38
OK... I'll wait then for the enhancement to be implemented, because ZFS is not an option.
BTW, are there any plans using BTRFS as a storage model?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!