Update vmcreate.sh
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user