Where is the templates from a VM

9acca9

Well-Known Member
Dec 27, 2017
35
3
48
74
Hi.
I do a template from a vm ("convert to template"), and i want to know where is created that file. I search in /var/lib/vz/. but i dont find nothing.
In my case it will be in a local storage.
Somebody can give me a hand?
Thanks
 
check your config with:

> pct config ID

this will tell you where the rootfs is located.
 
Hi.
I get this.

root@pve4:/etc/pve/qemu-server# pct config 111
Configuration file 'nodes/pve4/lxc/111.conf' does not exist

And this is the machine:

root@pve4:/etc/pve/qemu-server# cat 111.conf
bootdisk: virtio0
cores: 1
ide2: local:iso/openmediavault_3.0.94-amd64.iso,media=cdrom
memory: 2048
name: Copy-of-ovault-1
net0: virtio=3A:52:D3:43:94:32,bridge=vmbr6
net1: virtio=56:3A:EF:7A:53:E2,bridge=vmbr7
net2: virtio=FE:60:60:D6:98:D4,bridge=vmbr8
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=d7b1215b-0ab0-4953-82b5-38058b9336e0
sockets: 2
virtio0: local-lvm:vm-111-disk-1,cache=directsync,size=20G
virtio1: local-lvm:vm-111-disk-2,cache=directsync,size=100G

But i dont see any reference to where is the "template" of this machine.

Thanks
 
If you run

I do a template from a vm ("convert to template")

by context menu you transform a VM into a template (=base for additional VMs) - don't mix up it with lxc templates! A VM template is just a usual VM, but must not run any more (the content must remain at it is as soon as there are references to it).

However,

root@pve4:/etc/pve/qemu-server# cat 111.conf
bootdisk: virtio0
cores: 1
ide2: local:iso/openmediavault_3.0.94-amd64.iso,media=cdrom
memory: 2048
name: Copy-of-ovault-1
net0: virtio=3A:52:D3:43:94:32,bridge=vmbr6
net1: virtio=56:3A:EF:7A:53:E2,bridge=vmbr7
net2: virtio=FE:60:60:D6:98:D4,bridge=vmbr8
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=d7b1215b-0ab0-4953-82b5-38058b9336e0
sockets: 2
virtio0: local-lvm:vm-111-disk-1,cache=directsync,size=20G
virtio1: local-lvm:vm-111-disk-2,cache=directsync,size=100G

the VM 111 as shown above is not a template, in that case 111.conf would contain the following line

Code:
template: 1


In order to get familiar with that concept: create a test-VM (not necessarily containing any data) convert it, look at the result and create afterwards some clones.
 
  • Like
Reactions: Kingneutron
Since this comes up still as a search term for doing what I wanted to do, I wanted to update this with actual helpful information on a link I found for what people like myself are wanting to do - basically MAKING an LXC template:

https://wiki.chucknemeth.com/proxmox/lxc/lxc-template

As an aside, it would be helpful if the terminology was not mixed with Proxmox and/or a simple way to do what is actually wanted rather than stating it is a misunderstanding on behalf of the users...
 
  • 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!