Skip to content

Create the Rocky Linux template

The VM configuration in terraform/proxmox/vm clones every machine from a cloud-init template. The template ID is set in locals.tf (defaults.clone_vm_id, currently 8000).

Pick a Rocky Linux GenericCloud image:

  • Rocky 10: https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2
  • Rocky 9: https://download.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2

Download it directly on the Proxmox node:

Terminal window
ssh root@<proxmox-ip>
cd /tmp
wget https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2

Or copy it from your workstation:

Terminal window
scp C:\path\to\Rocky-10-GenericCloud-Base.latest.x86_64.qcow2 root@<proxmox-ip>:/tmp/

In the Proxmox web UI, create a VM with:

Tab Setting
General ID matching clone_vm_id (e.g. 8000), name rocky-template
OS Do not use any media
System Defaults (SeaBIOS is fine)
Disks Delete the default disk
CPU 2 cores
Memory 2048 MB
Network Bridge vmbr0, model VirtIO

Do not start the VM.

On the Proxmox node:

Terminal window
qm importdisk <VMID> /tmp/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2 local-lvm

The disk appears as Unused Disk 0 in the VM’s hardware list.

4. Attach the disk and the cloud-init drive

Section titled “4. Attach the disk and the cloud-init drive”
  1. In Hardware, double-click Unused Disk 0, select the SCSI bus and make sure it is attached as scsi0.
  2. Add a CloudInit Drive (Hardware → Add → CloudInit Drive) on local-lvm. It is added as scsi1 or ide2.

In Options → Boot Order, enable scsi0 and move it first. Network boot can be second; the cloud-init drive goes last.

  1. Start the VM and open the noVNC console.
  2. Check that it boots, gets an IP over DHCP and that cloud-init runs. Look at /var/log/cloud-init.log if something fails.

Stop the VM, right-click it and choose Convert to Template.

The template is ready for Deploy VMs.