From: David Mair Subject: Re: kvm rpms for sles Date: Wed, 02 Jul 2008 23:57:42 -0600 Message-ID: <486C6A56.601@mair-family.org> References: <486BF35E.3000401@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from nobody.sfcn.org ([160.7.248.25]:39485 "EHLO mail.mair-family.org" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755169AbYGCGI7 (ORCPT ); Thu, 3 Jul 2008 02:08:59 -0400 Received: from [192.168.10.171] (unknown [192.168.10.7]) by mail.mair-family.org (Postfix) with ESMTP id 8E3C42BF026 for ; Wed, 2 Jul 2008 23:57:48 -0600 (MDT) In-Reply-To: <486BF35E.3000401@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: carlopmart wrote: > Hi all, > > Sombedody knows where I can find rpm kvm-70 packages for sles 10 sp2?? > If not, can I compile kvm-70 without problems under sles 10 sp2?? I've been compiling it for OpenSuSE 10.3 (and 11.0 recently) with only minor effort since kvm-65 or earlier. My method should work as-is for SLE 10 versions. This message may be a bit long and OT for the list but I'll take the heat and maybe someone can help me understand why the second part of the patch is needed for me. If you have any questions that require much discussion maybe we can take it off-list. Procedure (kvm-70 and later): Make sure you have the kernel source and C/C++ development pattern installed. # cd /usr/src/linux # make cloneconfig # make modules-prepare Download the kvm source tarball Explode it somewhere # cd kvm- # ./configure Patch kernel/Makefile as follows, the first change can be avoided easily but it's easier to just patch the Makefile as shown. The second change really seems necessary on my SuSE platforms. Be careful to consider if my or your mail client word wraps the patch (I pasted it as plain text). The patch just replaces the relative path to the kernel source with a literal path that works on OpenSuSE 10.3/11.0 and adds the kernel source's linux/include as a higher priority include path than the kvm include-compat. --- kernel/Makefile 2008-04-28 11:54:18.000000000 -0600 +++ kernel/Makefile 2008-04-28 11:59:36.000000000 -0600 @@ -9,7 +9,7 @@ rpmrelease = devel -LINUX = ../linux-2.6 +LINUX = /usr/src/linux version = $(shell cd $(LINUX); git describe) @@ -27,7 +27,8 @@ all:: # include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat $(MAKE) -C $(KERNELDIR) M=`pwd` \ - LINUXINCLUDE="-I`pwd`/include -Iinclude -I`pwd`/include-compat \ + LINUXINCLUDE="-I`pwd`/include -Iinclude -I/usr/src/linux/include \ + -I`pwd`/include-compat \ -include include/linux/autoconf.h" \ "$$@" # make # make install OpenSuSE 10.3 and 11.0 include kvm modules and qemu. I delete all the kvm stuff under /lib/modules/ before the install. To get the kvm drivers to load at boot time add the kvm.ko and kvm-.ko module to the INITRD_MODULES section of /etc/sysconfig/kernel and run mkinitrd. modprobe or insmod the drivers to start right away or reboot the host to load them from the ramdisk. When you update the kernel you may as well repeat the process from the top. The qemu executable is qemu-system-x86_64 and has been working really well for me. --- David.