From 4a960d7215ff435b9ab7c0376beafa79efde47e0 Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Sat, 8 Apr 2023 23:24:13 +0800 Subject: [PATCH] Create create_vm.sh --- back/create_vm.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 back/create_vm.sh diff --git a/back/create_vm.sh b/back/create_vm.sh new file mode 100644 index 0000000..c3d9e87 --- /dev/null +++ b/back/create_vm.sh @@ -0,0 +1,9 @@ +qm create 100 --agent 1 --scsihw virtio-scsi-single --serial0 socket --cores 1 --sockets 1 --net0 virtio,bridge=vmbr1 +qm importdisk 100 /root/qcow/ubuntu22.qcow2 local +qm set 100 --scsihw virtio-scsi-pci --scsi0 local:100/vm-100-disk-0.raw +qm set 100 --memory 1024 +qm set 100 --ide2 local:cloudinit +qm set 100 --nameserver 8.8.8.8 +qm set 100 --searchdomain 8.8.4.4 +qm set 100 --ipconfig0 ip=172.16.1.2/24,gw=172.16.1.1 +qm set 100 --cipassword 123456 --ciuser test