Convert to template, where is the template stored?

Forssux

Member
Mar 27, 2022
56
4
8
Hi There

I stopped the container and converted it to a template.
This worked because afterwards I could clone this template to a running container.
However when I wanted to copy this template I noticed that I couldn't find it.
I know that normally templates are in /var/lib/vz/ but it wasn't in any of the sub directory's.

can somebody tell me where to find it?

Regards,
Guy
 
the config of the template is in /etc/pve/
the disks depend on the underlying storage, can you post the config? 'pct config ID'
 
  • Like
Reactions: Forssux
hi,

However when I wanted to copy this template I noticed that I couldn't find it.
I know that normally templates are in /var/lib/vz/ but it wasn't in any of the sub directory's.

can somebody tell me where to find it?
take a look at the container configuration: pct config CTID (replace CTID with your container id)

it should tell you which storage the "rootfs" is stored and the name of the volume (starts with "base-CTID" for templates)
 
  • Like
Reactions: Forssux
The rootfs is for containers and VM's
rootfs: Virtual:base-120-disk-0,size=6G

Virtual is /dev/nvme0n1p1 and LVM-Thin
I found the block device in /dev/dm-33
I could mount it with: mount -t ext4 -o noatime,nodiratime /dev/dm-33 /mnt/test
But how to convert this blockdevice to a file template on /mnt/pve/Backup-Virtual/template/cache?

Kind regards
Guy
 
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!