LXC Template from Backup issues

apmuthu

Renowned Member
Feb 26, 2009
868
11
83
Chennai - India & Singapore
github.com
A Debian 10 (Buster) Template was used to create a container and updated and then backed up and renamed as a later version template using the second method as described therein at:
https://febryandana.xyz/posts/proxmox-create-lxc-instance-and-template/

If a new container is created with the updated template using static ip, all works fine is the following are done on startup (/etc/hosts does not have a domain but search is the domain):
Bash:
ssh-keygen -q -t rsa -b 4096 -f ~/.ssh/id_rsa -P "" <<<y >/dev/null 2>&1
# If not done and needed:
# sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
service ssh restart
If DHCP is used in creating the new container, the SSH will not work correctly as the /etc/hosts will have a local IP like 127.0.1.2 and the /etc/resolv.conf will have both domain and search as localdomain.
 
Last edited:

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!