HowTo: Install configure KVM Virtualization & run Guest OSes in openSUSE

9 Comments

  1. Author

    Fixed the command now. Should have been “ar”

  2. NO .. there is major disinfo .. steps in this article does not lead to run KVM based guest, but pure software based quest based on qemu..

    to run machine under KVM, proceed as follows ::

    ## add with alias KVM needed repo and install packages
    zypper ar http://download.opensuse.org/repositories/Virtualization:/KVM/openSUSE_11.0 KVM
    zypper refresh
    zypper in -r KVM kvm
    zypper in qemu

    ## load and check modules .. in my case amd
    modprobe kmp
    modprobe kmp-pae
    lsmod | grep kmp

    ## add suggested user into kvm group to can use kvm as non-root
    usermod -A kvm

    ## create disk and run guest ..
    qemu-img create -f raw /path/to/disk.img 2G
    qemu-kvm -hda /path/to/disk.img -cdrom /path/to/bootable.iso -boot d -m 128 -cpu athlon -localtime

    << package qemu is needed only for qemu-img binary .. it is not necessary to add qemu repo as well as installing qemu-modules

    please fix it in article ..

    regards by nettezzaumana

  3. *** sorry ..
    modprobe kmp-amd ## should be there ^^ .. not `modprobe kmp-pae`

  4. ## so i will again write a steps ::

    zypper ar http://download.opensuse.org/repositories/Virtualization:/KVM/openSUSE_11.0 KVM
    zypper refresh
    zypper in -r KVM kvm
    zypper in qemu
    modprobe kmp
    modprobe kmp-amd ## owners of intel need to load kmp-intel instead
    lsmod | grep kmp ## check if loaded
    usermod -A kvm username ## need to reload user if active to make changes affect
    qemu-img create -f raw /path/to/disk.img 2G
    qemu-kvm -hda /path/to/disk.img -cdrom /path/to/bootable.iso -boot d -m 128 -cpu athlon -localtime

    ## you can order these modules be loaded during boot by editing /etc/sysconfig/kernel in variable MODULES_LOADED_ON_BOOT=foo ..

    ## JFYI :: qemu-system-x86_64 binary used in article above is provided by package:

    # rpm -qif `which qemu-system-x86_64` | sed ‘/^Name/!d’
    Name : qemu

    ## and have nothing to do with KVM based virtualization ..

    regards

  5. Have you tried kvm virtualization on OpenSuSE 11.2? TU

  6. I’ve just tried:
    1) installed kvm and qemu through Yast (they are already available in the distribution, i.e. no zypper commands required).
    I was not able to find “kqemu-kmp-default”, hence I didn’t install kqemu.
    3) checked for the modules with “lsmod | grep kvm”
    3) with Yast, added “kvm kvm-amd kqemu” in /etc/sysconfig (although kqemu is missing !!)
    4) created the image
    mkdir /vms
    cd /vms
    qemu-img create -f qcow xp_disk.img 10G
    5) installed XP
    qemu-system-x86_64 -hda /home/vms/xp_disk.img -cdrom /home/iso/WinXP_Pro_SP2_IT.iso -boot d -m 512
    6) started XP, with either:
    qemu-system-x86_64 -hda /home/vms/xp_disk.img
    or
    qemu-kvm -hda /home/vms/kubu_disk.img
    Both commands work. With the latter, XP seems to be faster, BUT not as faster as expected !!

    I guess that with kqemu it should be faster !
    Could someone tell me where can I retrieve it for OpenSUSE 11.2 ?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *