[SOLVED] mounting PVE ISO directory in a container

May 8, 2022
16
3
8
Hi everyone,

I'm using an lxc debian container with samba as a file server in a mostly Win10 network. In that container, I'm currently using a bind mount to give the clients access to the ISO images (mainly Windows and virus scanner boot images) that are in PVE's local storage, with this option in the .conf file:

mp0: /var/lib/vz/template/iso,mp=/mnt/empve-local-iso,ro=1

This works just fine, but unfortunately it also prevents createing snapshots of the container. Now, I thought that maybe there is another way: if I add "Container" content in the config of the "local" storage, I should be able to add this to the container as a regular mount point, with a command like this:

pct set 111 --mp0 local:iso,mp=/mnt/iso,backup=0,ro=1,shared=1

Would this work and would that have any drawbacks? I'm rather reluctant to simply try this experimentally, because the pve server is a production environment for our company, so I thought I'd ask here instead. :-)
 
Thanks for the suggestion! I never thought of that, despite using lxc.mount.entry in a different container to mount a device from the host into the container. So this does the trick perfectly now:

lxc.mount.entry: /var/lib/vz/template/iso mnt/empve-local-iso none bind,ro,create=dir

instead of the pve mount point.
 

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!