Creating Linux Containers

ElliotLepley

New Member
Oct 7, 2017
4
0
1
23
Hi there, I noticed that the default CentOS 7 Container doesn't have OpenSSH installed on it by default, and I'd rather like this to be on there. How would I go about creating a new CentOS 7 LXC Container and adding it as a template to my VE Cluster?

Thanks.
 
Just uncompress the template (it's a compressed tar), chroot into it, change whatever you want (including security updates), exit the chroot and repack the template under a new name that states your changes.
 
Nice yes... if you use ZFS it is easy to do that. And yes chroot is also an option. How i to that for me?
  1. Start you LXC, enter it an change what ever you would like
  2. Stop the container
  3. Login on the PVEhost and go in containers rootdirectory
  4. Delete every temp/cache/history that you not would like to give with
  5. Make a package like next line
Code:
cd /root/of/the/container
tar -czf /home/iso-images/template/cache/ubuntu-16.04-private-edit_16.04-2_amd64.tar.gz .
 

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!