[SOLVED] Help: Undo converting a LXC to a template

mishanw

New Member
Feb 2, 2024
27
3
3
Hi Everyone, I was trying to increase the size of a container and did something stupid after a week of putting in a lot of work into the docker LXC. I accidentally converted it to a template. All my services are now in town and that including my reverse proxy etc.

What can I do to undo my mistake?

Thank you kindly.
 
RightClick on the template --> Clone
That what I did, unfortunately for some reason I get anything to work, the Docker LXC had Portainer and I belive this is not working when cloned and since this was not configured with a static IP, and all the services were pointing staticky to the Dynamic IP of the docker container, its a mess. I was hoping to revert the template back, so everything would get restored.

I had Traefik running on the docker and so all my SSL certs are gone.

I created a new Traefic instance temporarily, but I think since the certs were already issued to the other container, there is some issue with that, its not working as well.
 
Code:
root@pve7demo1:/tmp# pct config 100 > normal
root@pve7demo1:/tmp# pct template 100
root@pve7demo1:/tmp# pct config 100 > template
root@pve7demo1:/tmp# sdiff normal template
arch: amd64                                                     arch: amd64
cores: 1                                                        cores: 1
hostname: CT100                                                 hostname: CT100
memory: 512                                                     memory: 512
mp0: bb-iscsi:vm-100-disk-1,mp=/data,backup=1,size=8G         | mp0: bb-iscsi:base-100-disk-1,mp=/data,backup=1,size=8G
mp1: bb-iscsi:vm-100-disk-2,mp=/data1,backup=1,size=16G       | mp1: bb-iscsi:base-100-disk-2,mp=/data1,backup=1,size=16G
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:F4:73   net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:F4:73
ostype: ubuntu                                                  ostype: ubuntu
rootfs: bb-iscsi:vm-100-disk-0,size=8G                        | rootfs: bb-iscsi:base-100-disk-0,size=8G
swap: 512                                                       swap: 512
                                                              > template: 1

The above are the configuration changes that happen when you convert a container to template. You can manually "undo" them following a procedure similar to https://forum.proxmox.com/threads/undo-convert-to-template.35386/

This is not an official way, obviously


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: Kingneutron
FYI if you manage to recover from this and revert, remember to enable regular backups so you have something to restore from
 
I ended up re-creating the entire project from ground up again. The issue was that I could not get all the dots to connect. Since docker and portainer were on that LXC, After recreating everything, I also ended up deciding to move the services out of the LXC to a VM and also backup everything.
 
  • Like
Reactions: Kingneutron

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!