Update vmcreate.sh

This commit is contained in:
2025-10-22 16:27:27 +00:00
parent 4e000e3279
commit 2322d90b15

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
while read line cat ./hosts | while read line
do do
ip=$(echo $line | cut -d ' ' -f 1) ip=$(echo $line | cut -d ' ' -f 1)
hostname=$(echo $line | cut -d ' ' -f 2) hostname=$(echo $line | cut -d ' ' -f 2)
@@ -18,4 +18,4 @@ do
qm set $vmnum --ipconfig0 ip=$ip/24,gw=10.10.35.1 qm set $vmnum --ipconfig0 ip=$ip/24,gw=10.10.35.1
qm cloudinit update $vmnum qm cloudinit update $vmnum
qm start $vmnum qm start $vmnum
done < ./hosts done