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 06-16-2010, 01:44 AM   #1
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Rep: Reputation: 9
kvm slackbuild error on Slackware 13.1 (64)


I would like to test "virt-manager" but "stumbled" with kvm..
http://slackbuilds.org/repository/13.1/system/kvm/
I got this error..
Code:
from /tmp/SBo/kvm-88/kvm/kernel/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mm.h: In function 'virt_to_head_page':
include/linux/mm.h:318: error: implicit declaration of function '__pfn_to_page'
include/linux/mm.h:318: warning: initialization makes pointer from integer without a cast
In file included from /tmp/SBo/kvm-88/kvm/kernel/x86/../external-module-compat-comm.h:312,
                 from /tmp/SBo/kvm-88/kvm/kernel/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mm.h: In function 'lowmem_page_address':
include/linux/mm.h:592: error: implicit declaration of function '__page_to_pfn'
In file included from /tmp/SBo/kvm-88/kvm/kernel/x86/../external-module-compat-comm.h:312,
                 from /tmp/SBo/kvm-88/kvm/kernel/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mm.h:943:5: warning: "CONFIG_SPLIT_PTLOCK_CPUS" is not defined
In file included from include/linux/hardirq.h:10,
                 from include/linux/interrupt.h:12,
                 from /tmp/SBo/kvm-88/kvm/kernel/x86/../external-module-compat-comm.h:675,
                 from /tmp/SBo/kvm-88/kvm/kernel/x86/external-module-compat.h:16,
                 from <command-line>:0:
arch/x86/include/asm/hardirq.h: At top level:
arch/x86/include/asm/hardirq.h:29: error: requested alignment is not a constant
In file included from /tmp/SBo/kvm-88/kvm/kernel/include/linux/kvm_host.h:67,
                 from /tmp/SBo/kvm-88/kvm/kernel/x86/svm.c:56:
/tmp/SBo/kvm-88/kvm/kernel/include/asm/kvm_host.h: In function 'page_header':
/tmp/SBo/kvm-88/kvm/kernel/include/asm/kvm_host.h:705: warning: initialization makes pointer from integer without a cast
/tmp/SBo/kvm-88/kvm/kernel/x86/svm.c: In function 'svm_hardware_unsetup':
In file included from /tmp/SBo/kvm-88/kvm/kernel/x86/svm.c:56:
/tmp/SBo/kvm-88/kvm/kernel/include/linux/kvm_host.h: At top level:
/tmp/SBo/kvm-88/kvm/kernel/include/linux/kvm_host.h:209: error: field 'mmu_notifier' has incomplete type
/tmp/SBo/kvm-88/kvm/kernel/x86/svm.c:529: warning: passing argument 1 of '__free_pages' makes pointer from integer without a cast
include/linux/gfp.h:326: note: expected 'struct page *' but argument is of type 'int'
/tmp/SBo/kvm-88/kvm/kernel/x86/svm.c: In function 'svm_free_vcpu':
/tmp/SBo/kvm-88/kvm/kernel/x86/svm.c:758: warning: passing argument 1 of '__free_pages' makes pointer from integer without a cast
include/linux/gfp.h:326: note: expected 'struct page *' but argument is of type 'int'
/tmp/SBo/kvm-88/kvm/kernel/x86/svm.c:759: warning: passing argument 1 of '__free_pages' makes pointer from integer without a cast
include/linux/gfp.h:326: note: expected 'struct page *' but argument is of type 'int'
/tmp/SBo/kvm-88/kvm/kernel/x86/svm.c:760: warning: passing argument 1 of '__free_pages' makes pointer from integer without a cast
include/linux/gfp.h:326: note: expected 'struct page *' but argument is of type 'int'
/tmp/SBo/kvm-88/kvm/kernel/x86/svm.c:761: warning: passing argument 1 of '__free_pages' makes pointer from integer without a cast
include/linux/gfp.h:326: note: expected 'struct page *' but argument is of type 'int'
make[4]: *** [/tmp/SBo/kvm-88/kvm/kernel/x86/svm.o] Error 1
make[3]: *** [/tmp/SBo/kvm-88/kvm/kernel/x86] Error 2
make[2]: *** [_module_/tmp/SBo/kvm-88/kvm/kernel] Error 2
make[1]: *** [all] Error 2
make: *** [kvm-kmod] Error 2
bash-4.1#
..and I don't have the knowledge to understand what is wrong so any help is much appreciated.

/Håkan
 
Old 06-16-2010, 02:12 AM   #2
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 484

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Hi,

This slackbuild is old. You have to use qemu-kvm with this slackbuild.
 
Old 06-16-2010, 09:01 AM   #3
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Original Poster
Rep: Reputation: 9
Thank you, I already had this installed together with the other dependencies for virt-manager..
Code:
libvirt,
GConf, +orbit2 
gnome-python, +libgnome +gnome-vfs (GConf (orbit2) gnome-mime-data libbonobo (orbit2) and optional avahi?)
urlgrabber, 
virtinst, +libvirt
gtk-vnc,
tunctl, 
rarian and 
optionally qemu +kqemu
and/or kvm +qemu-kvm
..so I then fixed the groups, loaded the modules and started virtlibd..
Code:
spiken@hakan:~$ groups
users floppy audio video cdrom plugdev power netdev kvm libvirt
spiken@hakan:~$ su
Password: 
root@hakan:/home/spiken# modprobe kvm
root@hakan:/home/spiken# modprobe kvm-intel
root@hakan:/home/spiken# lsmod |grep kvm
kvm_intel              42832  0 
kvm                   265284  1 kvm_intel

root@hakan:/home/spiken# /usr/sbin/libvirtd &
[1] 2446
root@hakan:/home/spiken# 15:21:02.326: warning : qemudStartup:1099 : Unable to create cgroup for driver: No such device or address
..but it ends like this (attached pictures) when it's time to install XP. Any help is appreciated

/Håkan
Attached Thumbnails
Click image for larger version

Name:	virt-manager.png
Views:	43
Size:	47.6 KB
ID:	3859   Click image for larger version

Name:	virt-manager1.png
Views:	42
Size:	42.6 KB
ID:	3860  
 
Old 06-18-2010, 08:08 AM   #4
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Hi

You have to modprobe tun and possibly virtio as well. This worked for me I am currently installing FreeBSD-8.0 using the Virtual Machine Manager.

samac
 
Old 06-18-2010, 08:25 AM   #5
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 484

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by samac View Post
You have to modprobe tun and possibly virtio as well.
Virtual machines use virtio, host machines don't.

Last edited by Thom1b; 06-18-2010 at 08:37 AM.
 
1 members found this post helpful.
Old 06-18-2010, 09:12 AM   #6
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Quote:
Virtual machines use virtio, host machines don't.
Thanks I didn't know this.

samac
 
Old 06-19-2010, 12:56 AM   #7
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Original Poster
Rep: Reputation: 9
Thank you, that fixed it!

Can I ask some more questions..

Where do you put this commands so it's done on "boot" (rc.modules?? rc.local??)?

I saw that in FedoraCore there's a "skript" in /etc/init.d called "libvirtd" for libvirt but I cant see any hint of that in Slackware, and do you get the same "error" as I do (above) when "/usr/sbin/libvirtd %"?

Where can I change "policy" so I dont have to be "root" when starting, I have done the "groupadd" (above)?

My /home is the biggest partition so I would like to have the images there...how do I change that from the "default" /var/lib/libvirt ?

/Håkan
 
Old 06-19-2010, 02:21 AM   #8
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Quote:
Where do you put this commands so it's done on "boot" (rc.modules?? rc.local??)?

I saw that in FedoraCore there's a "skript" in /etc/init.d called "libvirtd" for libvirt but I cant see any hint of that in Slackware, and do you get the same "error" as I do (above) when "/usr/sbin/libvirtd %"?

Where can I change "policy" so I dont have to be "root" when starting, I have done the "groupadd" (above)?

My /home is the biggest partition so I would like to have the images there...how do I change that from the "default" /var/lib/libvirt ?
All good questions. You put the modprobes and the libvirtd commands in rc.local. It would be possible to make a similar script and put it in /etc/rc.d/rc.libvirtd but if just starting the libvirt daemon by rc.local works then this shouldn't be required.

Changing policy could be done by udev, but I'm not sure how.

Changing the default for your images will probably be as easy as changing a line in a .conf file. Try searching for libvirt.conf, I would add that this is just a guess.

samac
 
Old 06-19-2010, 07:50 AM   #9
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Original Poster
Rep: Reputation: 9
I tried it in /etc/rc.d/rc.local
Code:
## for virt-manager
modprobe kvm
modprobe kvm-intel
# With kvm module you don't need kqemu. Kqemu is only 
# used on computer without virtualization on processor.
# modprobe kqemu
modprobe tun
/usr/sbin/libvirtd &
..it works!

I found that the "image-directory" can be changed in /etc/libvirt/storage/default.xml

I choose a bad "title" on this thread, should have been something with "virt-manager" instead..but as I am "up and running" now I consider this "Solved".

Again, many thanks to both of you for helping me.

/Håkan

Last edited by hakan56; 06-20-2010 at 02:12 AM. Reason: Info from "Thom1b"
 
1 members found this post helpful.
Old 07-28-2010, 08:17 PM   #10
enine
Senior Member
 
Registered: Nov 2003
Distribution: Slackʍɐɹǝ
Posts: 1,486
Blog Entries: 4

Rep: Reputation: 282Reputation: 282Reputation: 282
What specifically got it working, I just tried to build kvm and got the same error so I found this thread saying I needed qemu-kvm and built it but get this

bash-4.1# modprobe kvm-intel
FATAL: Error inserting kvm_intel (/lib/modules/2.6.33.4-smp/kernel/arch/x86/kvm/kvm-intel.ko): Operation not supported
bash-4.1#
 
Old 07-29-2010, 03:48 AM   #11
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, V.N.Gaia, Portugal
Distribution: Slackware
Posts: 528

Rep: Reputation: 272Reputation: 272Reputation: 272
First, check if your cpu supports hardware virtualization: grep vmx /proc/cpuinfo
Then, check if it's enabled in your BIOS

I'm assuming you have an Intel cpu....

Last edited by Slax-Dude; 07-29-2010 at 09:57 AM.
 
Old 07-29-2010, 08:39 AM   #12
enine
Senior Member
 
Registered: Nov 2003
Distribution: Slackʍɐɹǝ
Posts: 1,486
Blog Entries: 4

Rep: Reputation: 282Reputation: 282Reputation: 282
Ahh, yea, more searching myself shows I don't have that flag. Found another post stating I need qemu-legacy and kqemu also to emulate it, I installed those, now I just need to figure out what to do with them.
 
  


Reply



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] ffmpeg slackbuild error for slackware 13.1 el_jauzaa Slackware 9 06-16-2010 03:45 AM
[SOLVED] LMMS Slackbuild Error with Slackware Current (GCC 4.4.3) smoooth103 Slackware 4 01-30-2010 09:06 PM
PyQt4 module error in SlackBuild for Slackware 12.2 under Slackware64 13... Alexvader Slackware 3 12-28-2009 04:02 PM
Slackbuild Opera 9.5 for Slackware 12? TL_CLD Slackware 6 06-28-2008 11:48 AM

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

All times are GMT -5. The time now is 08:57 PM.

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