courses

Setting up a proxmox host

Initial Setup (already completed)

Proxmox Host Setup for the CAT Network Environment

Creating a VM Template

$  cd /var/lib/vz/images/
$  curl -LO https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img
$  qemu-img resize ubuntu-24.04-server-cloudimg-amd64.img 32G
$  qm create 1001 --name "template-ubuntu-24.04" --ostype l26 --memory 4096 --agent 1 --bios seabios --machine q35 --cpu host --socket 1 --cores 4 --vga serial0 --serial0 socket --net0 virtio,bridge=vnet0
$  qm importdisk 1001 ubuntu-24.04-server-cloudimg-amd64.img local-lvm
$  qm set 1001 --scsihw virtio-scsi-pci --virtio0 local-lvm:vm-1001-disk-0,discard=on
$  qm set 1001 --boot order=virtio0
$  qm set 1001 --ide2 local-lvm:cloudinit
$  cat << EOF | tee /var/lib/vz/snippets/vendor.yaml
#cloud-config
runcmd:
   - apt update
   - apt install -y qemu-guest-agent
   - systemctl start qemu-guest-agent
   - reboot
EOF
$  qm set 1001 --cicustom "vendor=local:snippets/vendor.yaml"
$  qm set 1001 --ciuser student
$  qm set 1001 --cipassword $(openssl passwd -6 super_secret_password)
$  qm set 1001 --ipconfig ip=dhcp
$  qm set 1001 --ipconfig0 ip=dhcp
$  qm cloudinit update 1001
$  qm template 1001
$  qm help clone
$  qm clone 1001 101 --format qcow2 --full --name "Ubuntu-101"