Convert to template, where is the template stored?

Forssux

Member
Mar 27, 2022
62
4
13
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: