hippolyte's changes
This commit is contained in:
parent
be1ad867db
commit
177b5cec3e
1 changed files with 14 additions and 12 deletions
26
vm-start.sh
26
vm-start.sh
|
@ -67,12 +67,12 @@ INIT() {
|
||||||
|
|
||||||
mkdir -p conf
|
mkdir -p conf
|
||||||
cat << EOF > "conf/$NAME-vm_var.sh"
|
cat << EOF > "conf/$NAME-vm_var.sh"
|
||||||
NAME="$NAME"
|
NAME="${NAME}"
|
||||||
VMHOSTNAME="\${NAME}-vm"
|
VMHOSTNAME="\${NAME}-vm"
|
||||||
VMDRIVE="\${VMHOSTNAME}.cow"
|
VMDRIVE="\${VMHOSTNAME}.cow"
|
||||||
NPROC="$NPROC"
|
NPROC="${NPROC}"
|
||||||
MEMORY="$MEMORY"
|
MEMORY="${MEMORY}"
|
||||||
FORWARD="$FORWARD"
|
FORWARD="${FORWARD}"
|
||||||
LOCATION="\${NAME}-sandbox"
|
LOCATION="\${NAME}-sandbox"
|
||||||
EOF
|
EOF
|
||||||
chmod +x "conf/$NAME-vm_var.sh"
|
chmod +x "conf/$NAME-vm_var.sh"
|
||||||
|
@ -168,6 +168,14 @@ SUPPRESS() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_uefi() {
|
||||||
|
UEFI="set"
|
||||||
|
OPTION="${OPTION} \
|
||||||
|
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \
|
||||||
|
-drive if=pflash,format=raw,file=${MAIN_LOCATION}/${LOCATION}/OVMF_VARS.4m.fd"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# gère les paramètres
|
# gère les paramètres
|
||||||
|
@ -222,10 +230,7 @@ for (( i=3; i<=$#; i++)); do
|
||||||
MEMORY="${!i#*=}"
|
MEMORY="${!i#*=}"
|
||||||
;;
|
;;
|
||||||
"uefi")
|
"uefi")
|
||||||
UEFI="set"
|
set_uefi
|
||||||
OPTION="$OPTION \
|
|
||||||
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \
|
|
||||||
-drive if=pflash,format=raw,file=${MAIN_LOCATION}/${LOCATION}/OVMF_VARS.4m.fd"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -233,10 +238,7 @@ done
|
||||||
|
|
||||||
if [ "${UEFI}" == "yes" ]
|
if [ "${UEFI}" == "yes" ]
|
||||||
then
|
then
|
||||||
UEFI="set"
|
set_uefi
|
||||||
OPTION="$OPTION \
|
|
||||||
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \
|
|
||||||
-drive if=pflash,format=raw,file=${MAIN_LOCATION}/${LOCATION}/OVMF_VARS.4m.fd"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue