proxmox
Getting Started with Proxmox VE LXC and VM Templates
Proxmox VE (PVE) allows users to create and manage both LXC containers and KVM virtual machines (VMs). This guide walks you through the process of downloading, importing, and creating templates for both.
LXC Templates
LXC containers are lightweight and ideal for running Linux services with minimal overhead.
List Available Templates
To view the available LXC templates:
pveam list
Download Templates
Use the pveam download command to import templates to the local storage:
pveam download local ubuntu-22.04-standard_22.04-1_amd64.tar.gz
pveam download local ubuntu-24.04-standard_24.04-1_amd64.tar.zst
pveam download local debian-12-standard_11.7-1_amd64.tar.zst
Once downloaded, these templates can be used to create new LXC containers from the Proxmox web interface or via CLI.
VM Template from Ubuntu Cloud Image
KVM VMs are ideal when you need full virtualization, for instance, to run Windows or more complex Linux systems.
Download Ubuntu Cloud Image
Download the official Ubuntu 24.04 cloud
wget http://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img
Create the Virtual Machine
Create a new VM with ID 910 (you can pick any unused ID):
qm create 910 -name template-ubuntu-jammy -memory 2048 -net0 virtio,bridge=vmbr0 -cores 2 -sockets 1
Import and Attach the Disk
Choose the correct storage (replace nvme if you use a different storage name):
qm importdisk 910 ubuntu-24.04-server-cloudimg-amd64.img nvme
qm set 910 -scsihw virtio-scsi-pci -virtio0 nvme:vm-910-disk-0
Configure the VM
qm set 910 -serial0 socket
qm set 910 -boot c -bootdisk virtio0
qm set 910 -agent 1
qm set 910 -hotplug disk,network,usb
qm set 910 -vcpus 1
qm set 910 -vga qxl
qm set 910 -ide2 nvme:cloudinit
qm resize 910 virtio0 +8G
If your disk is using SCSI instead of virtio, resize like this:
qm resize 910 scsi0 +8G
Convert the VM into a Template
qm template 910
Now you can use this template to clone new VMs instantly.