LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-01-2010, 10:14 AM   #1
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Rep: Reputation: 29
Building SlackBuilds KVM doesn't work, 2.6.35.4 kernel


Hi,

since there was a lot of talk about virtualization I thought I try kvm -- before I used VirtualBox.
I took the SlackBuild from SlackBuilds.org and got an error with u8 as type in /usr/include/scsi/scsi.h. (sorry, I don't have the exact error message anymore..) I searched for its definition and I only found __u8 in /usr/include/linux/types.h. Then I searched the web and found a "fix" which says I have to change u8 from /usr/include/scsi/scsi.h to __u8.

Okay, this problem was solved, but when I run the SlackBuild now it stops at some point and I don't know why. These are the last few lines of output:
Quote:
CC arm-softmmu/translate.o
CC arm-softmmu/tcg/tcg.o
CC arm-softmmu/tcg/tcg-runtime.o
CC arm-softmmu/fpu/softfloat.o
CC arm-softmmu/op_helper.o
CC arm-softmmu/helper.o
CC arm-softmmu/neon_helper.o
CC arm-softmmu/iwmmxt_helper.o
CC arm-softmmu/disas.o
CC arm-softmmu/i386-dis.o
CC arm-softmmu/arm-dis.o
CC arm-softmmu/vl.o
CC arm-softmmu/monitor.o
CC arm-softmmu/gdbstub-xml.o
AR i386-softmmu/libqemu.a
LINK i386-softmmu/qemu
AR arm-softmmu/libqemu.a
LINK arm-softmmu/qemu-system-arm
root@tux:/home/christian/Downloads/kvm#
I put an echo after the make for building kvm and I put an echo after "make install". None of them are printed.

What now?


Thanks
 
Old 10-01-2010, 10:19 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
kvm is a little old for your kernel, you should use qemu-kvm.

which version of slackware (and so which slackbuild) are you using?

Last edited by ponce; 10-01-2010 at 10:25 AM.
 
1 members found this post helpful.
Old 10-01-2010, 10:26 AM   #3
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
I am using Slackware 13.1 and I'm using this Slackbuild.

I thought qemu-kvm might be some fork or whatever because I read kvm is already a fork of qemu.
Then I'll try qemu-kvm. Thanks.^^
 
Old 10-01-2010, 10:39 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
as you can see here, kvm is the name of the old version of the package stopped in 2009, userspace tools (the modified qemu) and the kernel modules: with 2010 (someone correct me if I'm saying bull**** ) they are packaging only the new stable branch named qemu-kvm containing only the userspace tools (as the kvm modules are already shipped with your distribution's kernel).

Last edited by ponce; 10-01-2010 at 10:45 AM.
 
Old 10-01-2010, 01:13 PM   #5
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
Thank you, I got it now.
Quote:
christian@tux:~$ qemu --version
QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard
But it is still very slow. I think I'll read some tutorials about kvm and if it won't be faster I'll change back to VirtualBox or VMware.
 
Old 10-01-2010, 02:25 PM   #6
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by Squall90 View Post
Thank you, I got it now.

But it is still very slow. I think I'll read some tutorials about kvm and if it won't be faster I'll change back to VirtualBox or VMware.
Did you load the kvm modules first:

Code:
modprobe kvm-intel

- or -

modprobe kvm-amd
If either of those don't load then either your CPU doesn't support virtualization or your motherboard BIOS doesn't support virtualization. A BIOS upgrade is sometimes needed to gain access to the virtualization of the motherboad depending on how old it is.
 
Old 10-01-2010, 03:18 PM   #7
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
Yep, I loaded the kvm-amd module. lsmod verified it.

About the BIOS update: I'd never update a BIOS if it's not absolutely necessary. If it doesn't work due to my BIOS version I'd rather take another virtualization program.
 
Old 10-01-2010, 03:43 PM   #8
maxmiorim
Member
 
Registered: Sep 2010
Location: Brazil
Distribution: Slackware
Posts: 43

Rep: Reputation: 8
Quote:
Originally Posted by Squall90 View Post
Yep, I loaded the kvm-amd module. lsmod verified it.

About the BIOS update: I'd never update a BIOS if it's not absolutely necessary. If it doesn't work due to my BIOS version I'd rather take another virtualization program.
AFAIK, you won't get hardware virtualization from other programs if this isn't enabled by your BIOS.

Also, unless i missed something, if you have the hardware virtualization extension enabled you should see a svm (for AMD) or vmx (for Intel) on your /proc/cpuinfo in the flags line.

As for qemu, you can alternate to the VM console using ctrl+alt+2 and run "info kvm" to see if it go the kvm support enabled.
 
Old 10-01-2010, 03:45 PM   #9
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Like I said, you only need to worry about the CPU or BIOS if the modules didn't load. You're good to go.

So is the slowness you're experiencing related to anything in particular (e.g. display, drives, network)?

How are you starting the vm? What command?

Last edited by Chuck56; 10-01-2010 at 03:47 PM.
 
Old 10-01-2010, 03:49 PM   #10
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
These are my flags:
Quote:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
However, guest OSes with VirtualBox and WMware are much faster than with Qemu.

Like I said, you only need to worry about the CPU or BIOS if the modules didn't load. You're good to go.

Quote:
Originally Posted by Chuck56 View Post
So is the slowness you're experiencing related to anything in particular (e.g. display, drives, network)?
It was even slow at the installation. I was trying to boot the Slackware DVD ISO (mounted). I never saw such a slow installation.

Quote:
Originally Posted by Chuck56 View Post
How are you starting the vm? What command?
Code:
$ qemu -m 2047 -hda ./Qemu/slackware13.1.img -cdrom ./Downloads/slackware-13.1-install-dvd.iso -boot d

Last edited by Squall90; 10-01-2010 at 03:53 PM.
 
Old 10-01-2010, 03:53 PM   #11
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by Squall90 View Post
These are my flags:
However, guest OSes with VirtualBox and WMware are much faster than with Qemu.
So are you running "qemu" or "qemu-system-x86_64"?

EDIT: Disregard... You must have been typing when I asked this question.

Last edited by Chuck56; 10-01-2010 at 03:57 PM.
 
Old 10-01-2010, 03:57 PM   #12
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
Just "qemu".
 
Old 10-01-2010, 04:04 PM   #13
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by Squall90 View Post
Just "qemu".
No wonder it's slow!

The qemu command is just the emulator without any acceleration. It's slower than qemu-kvm even if you add the -enable-kvm option.

Use qemu-system-x86_64 in place of qemu. Don't worry about the reference to x86_64 if you're running 32 bit because it works for both 32 bit and 64 bit.

If I've kept up so far, you've installed packages for qemu, kvm and qemu-kvm. As mentioned earlier in the thread, all you need is qemu-kvm. I suggest you uninstall the qemu and kvm packages.
 
1 members found this post helpful.
Old 10-01-2010, 04:25 PM   #14
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
Ah, this explains a lot. I read about qemu-system-x86_64 but I didnt used it because I didnt want 64bit.^^
I'll try then. Thannks!
 
Old 10-01-2010, 04:28 PM   #15
maxmiorim
Member
 
Registered: Sep 2010
Location: Brazil
Distribution: Slackware
Posts: 43

Rep: Reputation: 8
I didn't know there was a difference between qemu and qemu-system-x86_64 - i use "qemu" for i[456]86 machines and the performance seems the same. :\

Anyway, my performance bottleneck usually is the weird disk caching of qemu, so i just disable it and everything runs smooth again.

Basically, i use:
Code:
-drive index=0,media="disk",if="virtio",cache="none",file="/home/max/vms/disks/slack64-build.img",boot="on"
Istead of:
Code:
-hda /home/max/vms/disks/slack64-build.img
Note that the virtio interface requires a customized kernel with the virtio-blk module, you'd have to replace it for scsi or ide if you don't want to customize the installer.
 
  


Reply

Tags
kvm, slackbuilds



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackbuilds - Net-SSLay building problem hua Slackware 4 08-01-2010 05:44 AM
[SOLVED] Problem building from slackbuilds ~sHyLoCk~ Slackware 14 05-18-2010 01:48 PM
Building slackbuilds.org packages with gcc 4.4.2 ponce Slackware 1 11-05-2009 11:07 AM
building kdebluetooth from Slackbuilds on Slackware64-current gtludwig Slackware 5 06-27-2009 05:59 PM
KVM-85 and using SlackBuilds kvm (83) script Chuck56 Slackware 2 04-22-2009 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration