[lxc-users] variable for containername in profile possible - Assigning existing LVM volume based on containername while container creation

axel+lxc at schoenerzw.de axel+lxc at schoenerzw.de
Fri May 1 11:42:56 UTC 2020


Hello,
  
  
is it possible to use variables like the "container name" in a profile declaration?
I want to assign already existing lvm-volumes by creating a container.
  
  
It could look perhaps like this
  
devices:
...
   xvdb1:
     path: /home
     source: /dev/vgLXD/$containername
     type: disk
...
  
  
My goal is to create the private storage before creating a container and keep it also if the
container has been deleted. I would prefer a lightweight solution that works in a non-priviledged setup.
Are there better ideas?
  
  

Thanks

Axel



More information about the lxc-users mailing list