libvirt-bin with QEMU ignores KQEMU
Bug #228299 reported by
Morten Siebuhr
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kqemu (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
libvirt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: libvirt-bin
There does not seem to be any way to make libvirtd use kqemu instead of qemu. When it launches sub-processes, it explicitly adds the argument "--no-kqemu", with no option for changing this.
From searching on the internet, it seems libvirtd once supported this, but RedHat removed the feature as they did not ship KQEMU...
To post a comment you must log in.
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' ):
argv[argv. index(' -no-kqemu' )] = '-kernel-kqemu'
print "Cannot run kqemu - the device does not exist!"
else:
if '-no-kqemu' in argv:
execv(original_ file, argv)