From 01a311c573167cc5ecdf5a0a391320df8c80426c Mon Sep 17 00:00:00 2001 From: Nguyen Thuong Hai <58414694+kmille36@users.noreply.github.com> Date: Mon, 4 Oct 2021 05:21:03 +0700 Subject: [PATCH] Update foreground.sh --- windows/foreground.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/windows/foreground.sh b/windows/foreground.sh index 3d359e0..39e891a 100644 --- a/windows/foreground.sh +++ b/windows/foreground.sh @@ -1 +1,5 @@ -apt-get install -y python; git clone https://github.com/novnc/noVNC.git; wget https://raw.githubusercontent.com/zuhito/node-red-playground/master/windows/index.html; mv index.html noVNC/index.html; sh -c "noVNC/utils/launch.sh --listen 8080 --vnc localhost:5901 &"; apt-get update; apt-get install -y qemu-system-x86; wget https://az792536.vo.msecnd.net/vms/VMBuild_20190311/HyperV/MSEdge/MSEdge.Win10.HyperV.zip; unzip MSEdge.Win10.HyperV.zip; qemu-system-x86_64 -m 1024 -smp 2 -hda Virtual\ Hard\ Disks/MSEdge\ -\ Win10.vhdx -vnc :1; +availableRAMcommand="free -m | tail -2 | head -1 | awk '{print \$7}'" +availableRAM=$(echo $availableRAMcommand | bash) +custom_param_ram="-m "$(expr $availableRAM)"M" +cpus=$(lscpu | grep CPU\(s\) | head -1 | cut -f2 -d":" | awk '{$1=$1;print}') +apt-get install -y python; git clone https://github.com/novnc/noVNC.git; wget https://raw.githubusercontent.com/zuhito/node-red-playground/master/windows/index.html; mv index.html noVNC/index.html; sh -c "noVNC/utils/launch.sh --listen 8080 --vnc localhost:5901 &"; apt-get update; apt-get install -y qemu-kvm; curl -L -o lite11.qcow2 https://bit.ly/38ZYSq3; qemu-system-x86_64 -nographic -net nic -net user,hostfwd=tcp::30889-:3389 -show-cursor $custom_param_ram -localtime -enable-kvm -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,+nx -M pc -smp cores=$cpus -vga std -machine type=pc,accel=kvm -usb -device usb-tablet -k en-us -drive file=lite11.qcow2,index=0,media=disk,format=qcow2 -boot once=d -vnc :1;