master
fanta 2 years ago
parent 3923d47be5
commit d23f73c8c3

7
q

@ -1,5 +1,4 @@
#!/bin/bash
#rocky;8.6;x86_64;http://fanta.56k.es/systems/rocky/8/Rocky-8.6-x86_64-dvd1.iso;20;2048;-enable-kvm
vmsDir="/home/fanta/vms"
function main(){
@ -22,7 +21,11 @@ function downloadSysIsos(){
extra="${data[6]}"
echo "[+] Downloading $isoName"
mkdir -p $vmsDir/${data[0]}-${data[1]}-${data[2]}
wget -q $url -O $vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName
if [ -f "$vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName" ]; then
echo " $vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName exists"
else
wget -q $url -O $vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName
fi
echo " Create img [$sizeDisc] $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2"
qemu-img create -q -f qcow2 "$vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2" $sizeDisc
echo " Create script $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.sh"

Loading…
Cancel
Save