Initial Commit

This commit is contained in:
2023-07-26 05:21:42 +02:00
parent 1546e05b99
commit 7a197e3841
4 changed files with 131 additions and 24 deletions

View File

@ -21,5 +21,29 @@ read -p "Enter your choice: " what_storage
qm importdisk 123 openwrt.raw $what_storage
echo "What is the VM name?"
read -p "Enter your choice: " vm_name
qm create $vm_id --memory 2048 --core 2 --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
qm set $vm_id --boot c --bootdisk scsi0 >/dev/null
qm set $vm_id --serial0 socket --vga serial0 >/dev/null
qm set $vm_id --balloon 0 >/dev/null
qm set $vm_id --onboot 0 >/dev/null
qm set $vm_id --tablet 0 >/dev/null
qm set $vm_id --agent enabled=1 >/dev/null
qm set $vm_id --ipconfig0 ip=dhcp,ip6=dhcp >/dev/
echo "What is the Username?"
read -p "Enter your choice: " username
echo "What is the Password?"
read -p "Enter your choice: " password
qm set $vm_id --ciuser $username --cipassword $password >/dev/null
# Exit the script.
exit 0