public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Mair <dmair@mair-family.org>
To: kvm@vger.kernel.org
Subject: Re: kvm rpms for sles
Date: Wed, 02 Jul 2008 23:57:42 -0600	[thread overview]
Message-ID: <486C6A56.601@mair-family.org> (raw)
In-Reply-To: <486BF35E.3000401@gmail.com>

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-<version>
# ./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/<current kernel> before the install.

To get the kvm drivers to load at boot time add the kvm.ko and 
kvm-<platform>.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.

  reply	other threads:[~2008-07-03  6:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02 21:30 kvm rpms for sles carlopmart
2008-07-03  5:57 ` David Mair [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-07-03  7:31 Matthias Pfafferodt
2008-07-03 11:01 ` Alexander Graf
2008-07-11 10:43   ` carlopmart
2008-07-11 11:30     ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486C6A56.601@mair-family.org \
    --to=dmair@mair-family.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox