diff options
author | Michael Janczyk | 2010-04-11 23:08:47 +0200 |
---|---|---|
committer | Michael Janczyk | 2010-04-11 23:08:47 +0200 |
commit | eec193967f7aca562f7d99eaf5d6177f08e9a99e (patch) | |
tree | 34bd6d650c2edc705f67769939a58c646492d017 /os-plugins/plugins/vmchooser/files/run-virt.sh | |
parent | qemukvm network configuration (diff) | |
download | core-eec193967f7aca562f7d99eaf5d6177f08e9a99e.tar.gz core-eec193967f7aca562f7d99eaf5d6177f08e9a99e.tar.xz core-eec193967f7aca562f7d99eaf5d6177f08e9a99e.zip |
virtualization plugin, now with calculation of mem, run-vmgrid and run-virt uses it
Diffstat (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index adfc737e..771ebef4 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -121,22 +121,21 @@ cpu_cores="${cpu_cores}" # check for CPU virtualization flags -# get total amount of memory installed in your machine -totalmem=$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') / 1024) +# total amount of memory defined in stage 3 permem=60 +# get a result which can be divided through 4 mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4) +[ -n "${mainvirtmem}" ] && forcemem=$(expr ${mainvirtmem} / 4 \* 4) # configuring ethernet mac address: first 3 bytes are fixed (00:50:56) # 4th byte is the VM-ID (0D) # last two bytes are taken from the bridge of the host # define one MAC per guest macguestpart="00:50:56:${VM_ID}" -machostpart=$($(which ifconfig) br0 | grep br0 | sed -e "s/ //g" | \ - awk -F ":" '{print $(NF-1)":"$NF}') +machostpart=$(echo ${machostaddr} | awk -F ":" '{print $(NF-1)":"$NF}') macaddr=$(echo "${macguestpart}:${machostpart}" | tr [a-z] [A-Z]) #TODO: remove when vmware modified -mac=$(/sbin/ifconfig eth0 | grep eth0 | sed -e "s/ //g" \ - | awk -F ":" '{print $(NF-1)":"$NF}') +mac=${machostpart} # virtual fd/cd/dvd and drive devices, floppy b: for configuration # if $floppy_0 from run-virt.include set then fdtest="TRUE" |