[SOLVED] PVE 4.1 - where's LXC rootfs

cmonty14

Well-Known Member
Mar 4, 2014
343
5
58
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
 
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
 
General question:
Are there any technical reasons to run Router-/Gateway-Server in Container (LXC)?
 
Last edited:
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.
 
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
 
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.
 
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.
 
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.
 
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?