Initial Commit
This commit is contained in:
@ -14,14 +14,15 @@ distro_url="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-gene
|
||||
filename="proxmox_cloudinit"
|
||||
|
||||
wget -q "$distro_url" -O "$filename.${file##*.}"
|
||||
|
||||
file="$filename.${file##*.}"
|
||||
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
|
||||
vm_id=$NEXTID
|
||||
vm_name="debian"
|
||||
|
||||
echo "What is the VM name?"
|
||||
read -p "Enter your choice: " vm_name
|
||||
qm create $vm_id --name $vm_name --net0 virtio,bridge=vmbr0 >/dev/null
|
||||
|
||||
qm importdisk $vm_id $file local-lvm >/dev/null
|
||||
qm set $vm_id --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-$vm_id-disk-0 >/dev/null
|
||||
qm set $vm_id --ide2 local-lvm:cloudinit >/dev/null
|
||||
@ -34,7 +35,12 @@ qm set $vm_id --tablet 0 >/dev/null
|
||||
qm set $vm_id --agent enabled=1 >/dev/null
|
||||
qm set $vm_id --serial0 socket --vga serial0 >/dev/null
|
||||
qm set $vm_id --ipconfig0 ip=dhcp,ip6=dhcp >/dev/null
|
||||
qm set $vm_id --ciuser test --cipassword test >/dev/null
|
||||
|
||||
echo "What is the Username for the VM?"
|
||||
read -p "Enter your choice: " username
|
||||
echo "What is the Password for the VM?"
|
||||
read -p "Enter your choice: " password
|
||||
qm set $vm_id --ciuser $username --cipassword $password >/dev/null
|
||||
|
||||
function make_template() {
|
||||
qm template $vm_id >/dev/null
|
||||
|
Reference in New Issue
Block a user