Created
July 12, 2023 05:44
-
-
Save bvierra/ec7fd87d7afafe3eeb056b0d1df406db to your computer and use it in GitHub Desktop.
Revisions
-
bvierra created this gist
Jul 12, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ #!/usr/bin/env bash wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img wget https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS cat SHA256SUMS | grep jammy-server-cloudimg-amd64.img > sha256sum sha256sum --check sha256sum qm create 8000 --name ubuntu-22.04-server-template --memory 1024 --net0 virtio,bridge=vmbr0 --cores 1 --sockets 1 --cpu cputype=host --description "Ubuntu 22.04 (jammy) server with cloud-init image" --kvm 1 --numa 1 qm importdisk 8000 jammy-server-cloudimg-amd64.img proxmox-nfs qm disk rescan qm set 8000 --scsihw virtio-scsi-pci --virtio0 proxmox-nfs:8000/vm-8000-disk-0.raw qm set 8000 --serial0 socket qm set 8000 --boot c --bootdisk virtio0 qm set 8000 --agent 1 qm set 8000 -hotplug disk,network,usb,memory,cpu qm set 8000 -vcpus 1 qm set 8000 -name ubuntu-22.04-server-template qm set 8000 -ide2 proxmox-nfs:cloudinit qm set 8000 -sshkey bvierra.pub qm disk resize 8000 virtio0 10G virt-customize --colors -a jammy-server-cloudimg-cust.img --update --install qemu-guest-agent --ssh-inject root:file:bvierra.pub --timezone America/Los_Angeles virt-sysprep --colors -a jammy-server-cloudimg-cust.img --operations defaults,-ssh-userdir qm template 8000