LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   KVM command not found though QEMU works fine Slackware64 13.1 multilib (http://www.linuxquestions.org/questions/slackware-14/kvm-command-not-found-though-qemu-works-fine-slackware64-13-1-multilib-826803/)

RajahBrooke 08-17-2010 01:05 PM

KVM command not found though QEMU works fine Slackware64 13.1 multilib
 
I've been trying to get some kind of virtualisation solution for my Slackware64, and I'd been having an absolute nightmare trying to get virtualbox to work on my Slackware64 install, so I decided to ditch it and move to KVM instead, as a type 1 hypervisor, having had success with QEMU in the past.

I installed qemu-kvm along with all the dependencies using sbopkg, and I didn't have any problems building it, nor creating a user for kvm, or anything of that sort. However, now if I try to open a .iso on a disk image I created using qemu:

Code:

qemu-img create -f qcow2 ubuntu.qcow 4G
Which I am then easily able to access with qemu using the following command:

Code:

qemu ubuntu.qcow -cdrom /ISO/ubuntu-8.10-dvd-i386.iso -m 256 &
(I have an old ubuntu 8.10.iso on my PC that I used just to see if the thing would work)

This works just as expected. However, if I try to launch the same .iso using kvm

Code:

kvm -hda ubuntu.qcow -cdrom /ISO/ubuntu-8.10-dvd-i386.iso -m 256 -boot -d &
all I get is "bash: command not found: kvm"

I have already loaded the following modules: kvm, kvm-intel, tun. Could I be missing something?

Has anyone successfully got KVM to work before and thinks they could help me?

[edit]

Also just noticed that though I have created a group for kvm and added myself to libvirt, but when I issue the command "groups" neither of them are there, though I did use:

Code:

groupadd -g 221 kvm
And I was under the impression that I just needed to add my user to libvirt, without needing to manually create the group itself.

I may have misunderstood the procedure for installing this properly, but I'm not sure what I've done wrong.

Chuck56 08-17-2010 03:19 PM

What do you mean you installed all the dependencies? All you need is the qemu-kvm package. You also don't need libvert if you run qemu-kvm from the command line.

The start up command is not "kvm" but is "qemu-system-x86_64" for both 32bit and 64bit slackware.

Make sure you load either the kvm-intel or kvm-amd modules depending on your cpu type.

RajahBrooke 08-17-2010 05:04 PM

Quote:

Originally Posted by Chuck56 (Post 4069332)
What do you mean you installed all the dependencies? All you need is the qemu-kvm package. You also don't need libvert if you run qemu-kvm from the command line.

The start up command is not "kvm" but is "qemu-system-x86_64" for both 32bit and 64bit slackware.

Make sure you load either the kvm-intel or kvm-amd modules depending on your cpu type.

alright will check that out - i think what i've done is created a conflict since i had intended to use virt-manager but decided against it. will uninstall all related packages and start clean since the packages are already compiled.

[edit] wait, just checking - so all i need is qemu-kvm and i'll have kvm and qemu? that might sound like a stupid question, but slackbuilds has packages for qemu, kvm, kmod and qemu-kvm - and most of the how-to's available online are for ubuntu, with v different package names.

Chuck56 08-17-2010 05:30 PM

Quote:

Originally Posted by RajahBrooke (Post 4069442)
[edit] wait, just checking - so all i need is qemu-kvm and i'll have kvm and qemu? that might sound like a stupid question, but slackbuilds has packages for qemu, kvm, kmod and qemu-kvm - and most of the how-to's available online are for ubuntu, with v different package names.

That's right, all you need is qemu-kvm.

qemu(0.12.5) - pure qemu with limited kvm functionality
kqemu(1.4.0pre1) - software acceleration for qemu
qemu-kvm(0.12.5) - slightly modified qemu with full kvm functionality
kvm-kmod(2.6.34.1) - updated kvm modules as of 2.6.34.1 kernel
kvm(88) - development qemu-kvm & kvm-kmod combined (not current code)


All times are GMT -5. The time now is 07:49 PM.