diff --git a/VM/Cloud-Init/script.sh b/VM/Cloud-Init/script.sh new file mode 100644 index 0000000..1f245b8 --- /dev/null +++ b/VM/Cloud-Init/script.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# ____ _ _ +#/ ___|| |_| |__ ___ _ __ ___ +#\___ \| __| '_ \ / _ \| '_ \ / _ \ +# ___) | |_| | | | (_) | |_) | __/ +#|____/ \__|_| |_|\___/| .__/ \___| +# |_| +# + +# Ubuntu Server 22.04 jammy +ubuntu="https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img" + +# Debian 12 bookworm +debian="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2" + + +echo "What Distribution do you want to install, Ubuntu or Debian?" +read -p "Enter your choice: " distro + +file=$(basename "$distro") +filename="proxmox_cloudinit" + +wget "$distro" -O "$filename.${file##*.}" + +# Proxmox Import Image +# qm importdisk $vm_id debian-12-genericcloud-amd64.qcow2 local-lvm + +# Proxmox Create VM +# qm create $vm_id --name Debian --net0 virtio,bridge=vmbr0 +# 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 set $vm_id --agent enabled=1 +# qm set $vm_id --onboot 0 +# qm set $vm_id --memory 2048 +# qm set $vm_id --balloon 0 +# qm set $vm_id --cores 2 +# qm set $vm_id --tablet 0 + +# qm template $vm_id