Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEMU run.sh Windows compatability #377

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions resources/runners/qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ do
shift
done

grep -q -e "vmx" -e "svm" /proc/cpuinfo
if [ $? -eq 0 ]; then
QEMU="$QEMU -enable-kvm"
# Check for hardware-virtualization support
if [ "$(egrep -m 1 '^flags.*(vmx|svm)' /proc/cpuinfo)" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if normal grep command works instead of use egrep, and if not, change to use equivalent grep -E? Also, are the quotes needed? Isn't command expansion just enough?

then
echo ">>> KVM: ON "
export QEMU="qemu-system-x86_64 -M accel=kvm:tcg"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use export nor set explicitly the command to be used, just reassign the QEMU environment variable like it was done before. Have you check if the -enable-kvm flag actually doesn't work on Windows? If so, have you check the -M accel=kvm:tc arguments enable KVM on Linux?

else
echo ">>> KVM: OFF "
export QEMU="qemu-system-i386"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this else branch, or at least the assignation of the QEMU variable.

fi

$QEMU \
Expand Down