Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Maldaris
Copy link

@Maldaris Maldaris commented Nov 9, 2017

Using mingw (or even the bash that comes with git-scm), and the windows build of QEMU gets us right up to the point of running NodeOS, but the original qemu.sh script doesn't detect KVM in a way that allows Windows to launch it, instead complaining about no accelerator detected.

The patch borrows from lrvick/airgap#3 to circumvent this error. Working on windows 10 with the v2.10 build of QEMU.

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?

if [ "$(egrep -m 1 '^flags.*(vmx|svm)' /proc/cpuinfo)" ]
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?

export QEMU="qemu-system-x86_64 -M accel=kvm:tcg"
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants