2

I have a CentOS 6.4 box that I'm trying to set up a VM on to run WinXP.

This box doesn't have VT, which may not be ideal, but I'll settle for less than ideal.

Apparently I should be able to install a kqemu kernel module and then use --virt-type kqemu with virt-install, and it should at least run, albeit slowly.

$ sudo modprobe kvm
FATAL: Module kvm_intel not found.

Same with kqemu. Okay, so:

$ sudo yum install kvm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: less.cogeco.net
 * extras: www.cubiculestudio.com
 * updates: centos.mirror.rafal.ca
Setting up Install Process
No package kvm available.
Error: Nothing to do

And same with kqemu and qemu (despite the official docs). Meanwhile:

$ virsh capabilities
...
<domain type='lxc'>
</domain>

The docs say that this last one should tell me which hypervisors are available, but I want to install WinXP on the VM, so LXC will not do the trick.

How can I get kqemu or even just qemu to show up in virsh capabilities?

  • yum search kvm && yum search qemu ? – schaiba Jul 11 '13 at 18:15
  • @schaiba, please see slm's answer below – Kev Jul 11 '13 at 19:17
  • kqemu is long since deprecated – dyasny Jul 12 '13 at 16:03
  • @dyasny, I hadn't come across that information in the docs. What was it replaced with? Is hardware VT support required for it to work at all now? – Kev Jul 12 '13 at 18:18
  • qemu-kvm is the way to go now. It requires VT/AMD-V and can make use of VT-d/IOMMU – dyasny Jul 12 '13 at 18:49
2

When I do a search for kqemu I'm not finding anything on my CentOS 6.x systems.

$ yum search kqemu
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftpmirror.your.org
 * elrepo: mirror.symnds.com
 * epel: mirror.steadfast.net
 * extras: mirror.solarvps.com
 * nux-dextop: li.nux.ro
 * updates: centos.netnitco.net
Warning: No matches found for: kqemu
No Matches found

When I run virsh capabilities I get the following:

   ...
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
   ...

Interrogating further looking to see what package provides my "emulator" I get the following:

$ rpm -qf /usr/libexec/qemu-kvm 
qemu-kvm-0.12.1.2-2.355.0.1.el6.centos.5.x86_64

Search for packages that contain "qemu" or "kvm" I get the following lists:

================================================================= N/S Matched: qemu =================================================================
gpxe-roms-qemu.noarch : Network boot loader roms supported by QEMU, .rom format
qemu-guest-agent.x86_64 : QEMU Guest Agent
qemu-guest-agent-win32.x86_64 : QEMU Guest Agent for Windows
qemu-img.x86_64 : QEMU command line tool for manipulating disk images
sheepdog.x86_64 : The Sheepdog Distributed Storage System for KVM/QEMU
libvirt-lock-sanlock.x86_64 : Sanlock lock manager plugin for QEMU driver
qemu-kvm.x86_64 : Userspace component of KVM
qemu-kvm-tools.x86_64 : KVM debugging and diagnostics tools
vios-proxy-guest.x86_64 : Network proxy using virtioserial for QEMU guest
vios-proxy-host.x86_64 : Network proxy using virtioserial for QEMU host

================================================================= N/S Matched: kvm ==================================================================
qemu-kvm.x86_64 : Userspace component of KVM
qemu-kvm-tools.x86_64 : KVM debugging and diagnostics tools
sheepdog.x86_64 : The Sheepdog Distributed Storage System for KVM/QEMU
virt-manager.x86_64 : Virtual Machine Manager
virt-v2v.x86_64 : Convert a virtual machine to run on KVM
1

$ sudo modprobe kvm FATAL: Module kvm_intel not found.

Well, modprobe kvm_intel first

For kvm to run you need two modules - kvm and kvm_intel (or kvm_amd)

  • Yes, it says both kvm and kvm_intel are not found. What can I use, then? – Kev Jul 12 '13 at 18:21
  • do you have VT enabled in BIOS? If you needed to go in and enable it, make sure to cold boot the machine - these settings don't kick in until you do a full powercycle – dyasny Jul 12 '13 at 18:50
  • the hardware does not support it, c.f. my OP. – Kev Jul 12 '13 at 19:00
  • then your only option is qemu, and it's going to be very slow. virsh capabilities do not include qemu because libvirt doesn't support bare qemu without kvm. – dyasny Jul 12 '13 at 20:19
  • I'm fine with very slow, as I mentioned in the OP, so what do I do next? There seem to be pages out there about VT-less qemu, but I have done what I can with the info they provided and it still didn't work, hence my question here. – Kev Jul 13 '13 at 0:16
0

kvm requires vt (hardware assisted virtualisation in the CPU), so if your box doesn't have that, then you have to use emulation using qemu. This will be very slow.

kqemu is (was) a kernel module which predated vt, and which acted to run all userspace code natively, and only emulate privileged kernel code. This sped things up a lot, but kqemu support was taken out of qemu v0.11 (released summer 2009).

Your options are:

  1. Use qemu without kqemu, or kvm (slow). This should work after "yum install qemu".
  2. Use a kernel which kqemu supports, along with a sufficiently old version of qemu e.g v 0.1 (fiddly).
  3. Get some different hardware which supports VT, and use kvm.
  4. Use a different emulator (e.g. https://www.virtualbox.org/ ) which has functionality equivalent to kqemu.

This last one is probably your best bet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.