Comment 1 for bug 228299

Revision history for this message
Morten Siebuhr (msiebuhr) wrote :

It can be hacked by moving /usr/bin/qemu to /usr/bin/qemu-original and inserting this script as /usr/bin/qemu (remember permissions):

#!/usr/bin/env python
#
# Wrapper for /usr/bin/qemu to forcefully enable kqemu support
#
# Morten Siebuhr
# <sbhr sbhr dk>

from sys import argv
from os import system, execv
from os.path import exists

original_file = "/usr/bin/qemu-original"

if not exists('/dev/kqemu'):
    print "Cannot run kqemu - the device does not exist!"
else:
    if '-no-kqemu' in argv:
        argv[argv.index('-no-kqemu')] = '-kernel-kqemu'

execv(original_file, argv)