mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-09-20 00:02:03 +02:00
Vars refactor: Replace ram with RAM_VM
This commit is contained in:
parent
1399d62a69
commit
7682463e27
10
quickemu
10
quickemu
|
@ -199,14 +199,14 @@ function vm_boot() {
|
||||||
fi
|
fi
|
||||||
echo " - CPU: ${CORES_VM} Core(s)"
|
echo " - CPU: ${CORES_VM} Core(s)"
|
||||||
|
|
||||||
local ram="2G"
|
local RAM_VM="2G"
|
||||||
local RAM_HOST=$(free --mega -h | grep Mem | cut -d':' -f2 | cut -d'G' -f1 | sed 's/ //g')
|
local RAM_HOST=$(free --mega -h | grep Mem | cut -d':' -f2 | cut -d'G' -f1 | sed 's/ //g')
|
||||||
if [ ${RAM_HOST} -ge 64 ]; then
|
if [ ${RAM_HOST} -ge 64 ]; then
|
||||||
ram="4G"
|
RAM_VM="4G"
|
||||||
elif [ ${RAM_HOST} -ge 16 ]; then
|
elif [ ${RAM_HOST} -ge 16 ]; then
|
||||||
ram="3G"
|
RAM_VM="3G"
|
||||||
fi
|
fi
|
||||||
echo " - RAM: ${ram}"
|
echo " - RAM: ${RAM_VM}"
|
||||||
|
|
||||||
local xres=1152
|
local xres=1152
|
||||||
local yres=648
|
local yres=648
|
||||||
|
@ -278,7 +278,7 @@ function vm_boot() {
|
||||||
-machine q35,accel=kvm \
|
-machine q35,accel=kvm \
|
||||||
-cpu host,kvm=on \
|
-cpu host,kvm=on \
|
||||||
-smp ${CORES_VM} \
|
-smp ${CORES_VM} \
|
||||||
-m ${ram} \
|
-m ${RAM_VM} \
|
||||||
-device virtio-balloon \
|
-device virtio-balloon \
|
||||||
-netdev ${NET},id=nic \
|
-netdev ${NET},id=nic \
|
||||||
-device virtio-net,netdev=nic \
|
-device virtio-net,netdev=nic \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user