Mount a live container disk on the host

falves1

Well-Known Member
Jan 11, 2009
99
3
48
In regular LXC the rootfs is just a dir in the host. How do I achieve the same effect in Proxmox? I want to enter the live or off containers rootfs from the host. Same with VMs.
Is it possible?
 
Code:
pct enter <vmid>
The image files of the running container are mapped devices, with above command you can enter a running container.
 
I need to copy files from the host and viceversa, like it is possible in LXC. "entering" alone is not sufficient, I need to mount the container´s space.
Is there a way?
 
Depending on storage they are not accessible as a directory.
https://pve.proxmox.com/pve-docs/chapter-pct.html
Code:
USAGE: pct <COMMAND> [ARGS] [OPTIONS]
       pct enter <vmid>
       pct mount <vmid>
       pct pull <vmid> <path> <destination> [OPTIONS]
       pct push <vmid> <file> <destination> [OPTIONS]
Mount locks the container, you get more info with 'pct help <cmd>'.
 
This model of isolation, siloed, has a big flaw. Typically I move LXC containers from host to host using RSYNC. With the Proxmox implementation it is impossible. I have many containers with apps that are difficult or impossible to install, how do I move containers in and out of Proxmox. We need patch to mount any container like if it was part of the file system.
In the corporate world, there cannot be siloes. This is a killer problem.
 
if you use zfs as an underlying storage, the container filesystems are subvolumes, which you can access normally
 

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!