[SOLVED] accessing lxc from physical server

Beginer

New Member
Sep 20, 2013
14
0
1
Hello Team,

Is it possible that we can browse the lxc containers like we used to browse in openvz? Path in openvz was /var/lib/vz/private/containerid/. Thank you.
 
That depends on the storage backend. For example the 'zfspool' backend allows that.

There is also a special hack for the directory backend, when you specify size '0' when creating the container. This basically creates a simple subdirectory on the host. But be aware that you do not have quota support in that case (no simfs).
 
Thank you Dietmar for the reply. Is it possible that we can view the contents now as we have already created the container and started using it? I mean, can we now browse the contents from the physical server. I find only a vm-100-disk-1.raw file in the path /var/lib/vz/images/100/.
 
It actually shows nothing when I run that command.


root@srvr ~ # df -h | grep 100
root@srvr ~ #
 
Thank you very much Dietmar. This was very helpful. Is it better to keep it unmounted and mount only when it is required?
 
I thought the VM is running and the question was about running VMs. After mounting (or starting) the df-command should yield something.
 
Yes, it is running and when I mount it as suggested by Dietmar, it shows in df command. When we unmount it, it does not show up in df as expected.

Once mounted, I moved the required file from the container to the physical server and unmounted it again. I was enquiring is it better to keep it unmounted and mount only when it is required? Will it be any security related issue if we keep it mounted always? Thank you.
 
Yes, it is running and when I mount it as suggested by Dietmar, it shows in df command. When we unmount it, it does not show up in df as expected.

Once mounted, I moved the required file from the container to the physical server and unmounted it again. I was enquiring is it better to keep it unmounted and mount only when it is required? Will it be any security related issue if we keep it mounted always? Thank you.

mounting via "pct mount" is intended for maintenance, as it locks the VM configuration. so no, don't leave containers mounted when you don't need access to their file systems ;)
 

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!