Where is the templates from a VM

Discussion in 'Proxmox VE: Installation and configuration' started by 9acca9, Jan 19, 2018.

  1. 9acca9

    9acca9 New Member

    Joined:
    Dec 27, 2017
    Messages:
    16
    Likes Received:
    1
    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
     
  2. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,639
    Likes Received:
    419
    check your config with:

    > pct config ID

    this will tell you where the rootfs is located.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. 9acca9

    9acca9 New Member

    Joined:
    Dec 27, 2017
    Messages:
    16
    Likes Received:
    1
    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
     
  4. Richard

    Richard Proxmox Staff Member
    Staff Member

    Joined:
    Mar 6, 2015
    Messages:
    704
    Likes Received:
    25
    If you run

    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,

    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice