adding 2204lts
This commit is contained in:
26
Ubuntu-22-04-LTS.sh
Normal file
26
Ubuntu-22-04-LTS.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
VM_ID=9999
|
||||
VM_NAME="Ubuntu-22-04-LTS-Large-Docker"
|
||||
CPU_CORE=4
|
||||
CPU_SOCKET=2
|
||||
RAM=8192
|
||||
DISK=100
|
||||
#getting latest image"
|
||||
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
|
||||
#installing qemu guest agent and remove HW ID
|
||||
virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent,neofetch #docker.io,docker-compose
|
||||
virt-customize -a jammy-server-cloudimg-amd64.img --run-command "echo -n > /etc/machine-id"
|
||||
virt-customize -a jammy-server-cloudimg-amd64.img --run-command "curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh"
|
||||
qm create $VM_ID --name $VM_NAME --net0 virtio,bridge=vmbr0
|
||||
qm set $VM_ID --cores "$CPU_CORE" --sockets "$CPU_SOCKET" --memory "$RAM"
|
||||
qm importdisk "$VM_ID" jammy-server-cloudimg-amd64.img local-lvm
|
||||
qm set "$VM_ID" --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-"$VM_ID"-disk-0
|
||||
qm set "$VM_ID" --ide2 local-lvm:cloudinit
|
||||
qm set "$VM_ID" --boot c --bootdisk scsi0
|
||||
qm set "$VM_ID" --serial0 socket --vga serial0
|
||||
qm resize $VM_ID scsi0 "$DISK"G
|
||||
qm set "$VM_ID" --ipconfig0 ip=dhcp
|
||||
qm set "$VM_ID" --agent enabled=1
|
||||
qm template "$VM_ID"
|
||||
rm jammy-server-cloudimg-amd64.img #clean iso
|
||||
echo "Template er ferdig med id "$VM_ID""
|
||||
Reference in New Issue
Block a user