mkvm : gere memoire VM
This commit is contained in:
parent
1134ca261d
commit
c086bcdc7f
16
scripts/mkvm
16
scripts/mkvm
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkvmrelease="v1.3.2"
|
||||
mkvmrelease="v1.3.3"
|
||||
|
||||
ovarelease="2023c"
|
||||
ovafogrelease="2024a"
|
||||
@ -10,10 +10,18 @@ ovafilefog="$HOME/Téléchargements/debian-bullseye-gsb-${ovafogrelease}.ova"
|
||||
startmode=0
|
||||
deletemode=0
|
||||
|
||||
declare -A vmMem
|
||||
vmMem[r-int]=512
|
||||
vmMem[r-ext]=512
|
||||
vmMem[s-nas]=512
|
||||
vmMem[s-infra]=768
|
||||
vmMem[s-backup]=768
|
||||
vmMem[s-elk]=3072
|
||||
|
||||
usage () {
|
||||
echo "$0 - version ${mkvmrelease} - Ova version ${ovarelease}"
|
||||
echo "$0 : creation VM et parametrage interfaces"
|
||||
echo "usage : $0 [-r] [-s] <s-adm|s-infra|r-int|r-ext|s-proxy|s-mon|s-appli|s-backup|s-itil|s-ncx|s-fog>"
|
||||
echo "usage : $0 [-r] [-s] <s-adm|s-infra|r-int|r-ext|s-proxy|s-mon|s-appli|s-backup|s-itil|s-nxc|s-fog>"
|
||||
echo " option -r : efface VM existante avant creation nouvelle"
|
||||
echo " option -s : start VM apres creation"
|
||||
exit 1
|
||||
@ -33,6 +41,10 @@ create_vm () {
|
||||
VBoxManage unregistervm --delete "${nom}"
|
||||
fi
|
||||
vboxmanage import "${nomova}" --vsys 0 --vmname "${nom}"
|
||||
if [[ -v vmMem["${nom}" ]]; then
|
||||
mem=vmMem["${nom}"]
|
||||
VBoxManage modifyvm "${nom}" --memory "${mem}"
|
||||
fi
|
||||
}
|
||||
|
||||
setif () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user