Last active
March 3, 2023 17:54
-
-
Save crookedstorm/03a0d80ca8795a919908686461fd48f2 to your computer and use it in GitHub Desktop.
proxmox template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you intend to use kubernetes, you need a better kernel than the stupid ubuntu kvm one. Use this: | |
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img | |
# image prep | |
wget https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64.img | |
virt-customize -a ubuntu-22.04-minimal-cloudimg-amd64.img --install qemu-guest-agent | |
virt-customize -a ubuntu-22.04-minimal-cloudimg-amd64.img --run-command "truncate -s 0 /etc/machine-id" | |
qemu-img resize ubuntu-22.04-minimal-cloudimg-amd64.img 32G | |
# image prep 2 | |
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img | |
virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent | |
virt-customize -a jammy-server-cloudimg-amd64.img --run-command "truncate -s 0 /etc/machine-id" | |
qemu-img resize jammy-server-cloudimg-amd64.img 32G | |
qm create 9991 --name template001 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9991 --scsi0 local-lvm:0,import-from=/root/ubuntu-22.04-minimal-cloudimg-amd64.img | |
qm set 9991 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9991 | |
qm create 9992 --name template002 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9992 --scsi0 local-lvm:0,import-from=/root/ubuntu-22.04-minimal-cloudimg-amd64.img | |
qm set 9992 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9992 | |
qm create 9993 --name template003 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9993 --scsi0 local-lvm:0,import-from=/root/ubuntu-22.04-minimal-cloudimg-amd64.img | |
qm set 9993 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9993 | |
qm create 9994 --name template004 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9994 --scsi0 local-lvm:0,import-from=/root/ubuntu-22.04-minimal-cloudimg-amd64.img | |
qm set 9994 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9994 | |
qm create 9995 --name template005 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9995 --scsi0 local-lvm:0,import-from=/root/jammy-server-cloudimg-amd64.img | |
qm set 9995 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9995 | |
qm create 9996 --name template006 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9996 --scsi0 local-lvm:0,import-from=/root/jammy-server-cloudimg-amd64.img | |
qm set 9996 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9996 | |
qm create 9997 --name template007 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9997 --scsi0 local-lvm:0,import-from=/root/jammy-server-cloudimg-amd64.img | |
qm set 9997 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9997 | |
qm create 9998 --name template008 --memory 2048 --net0 virtio,bridge=vmbr0 --agent enabled=1 --scsihw virtio-scsi-pci | |
qm set 9998 --scsi0 local-lvm:0,import-from=/root/jammy-server-cloudimg-amd64.img | |
qm set 9998 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 | |
qm template 9998 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment