Results 1 to 7 of 7

Thread: How to QEMU + Kqemu

  1. #1
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Thumbs down How to QEMU + Kqemu

    How to QEMU + KQEMU



    Home page: http://bellard.org/qemu/

    This will be brief

    Pros :
    • Open source.
    • qemu allows emulation of multiple processors.
    • Supports 64 bit guests (on 64 bit hosts).
    • Portability. qemu will run on Windows as well.


    Cons: The biggest disadvantage is qemu is slow, even with kqemu.

    For a more complete how-to on qemu see:



    Installation

    Installation is quite easy.

    Code:
    sudo apt-get install qemu
    Qemu itself is slow so you may wish to add kqemu AKA "QEMU Accelerator".

    For kemu :

    Note: "kqemu" is an ambigious name.

    1. kqemu the qemu accelerator. This is a kernel module that makes qemu faster.
    2. kqemu the KDE application is a graphical interface/launcher for qemu.


    Code:
    sudo apt-get install kqemu-common kqemu-source
    Add your user to the kqemu group
    Log off and back on

    Using any editor, edit /etc/modules (gksu gedit /etc/modules)
    Add kqemu to the bottom of the list.

    This will load kqemu at boot.
    To load without re-booting

    Code:
    sudo modporbe kqemu
    Running qemu (from the command line, using "/media/data/ubuntu-desktop.iso" as an example, you will need to provide a path to an iso image or virtual hard drive):

    For 32 bit hosts:

    Code:
    qemu -cdrom /media/data/ubuntu-desktop.iso -m 512
    For 64 bit hosts

    Code:
    qemu-system-x86_64 -cdrom /media/data/ubuntu-desktop.iso -m 512
    To confirm you are using kqemu:

    Enter the guest with your mouse (click in the box). Hit ctrl-alt-2
    At the qemu command console enter "info-kqemu"
    you should see:
    (qemu) info kqemu
    kqemu support: enabled for user code
    enter ctrl-alt-1 to return to the main console.

    • From the command line. See man qemu.
    • See also How to KVM


    GUI Options
    • qemu-launcher.
    • qemulator.
    • qtemu.
    • kqemu (bad name, this is the KDE graphical front end).


    bodhi.zazen
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  2. #2
    Join Date
    Nov 2008
    Beans
    1

    Re: How to QEMU + Kqemu

    Hello, Im kinda new to this, so I apologize in advance. I followed the following guide to run windows on my linux box.
    https://help.ubuntu.com/community/Wi...UnderQemuHowTo

    Once I get to step 11 I run into problems.
    Install Windows XP. Put the CD in the drive and run:

    qemu -localtime -cdrom /dev/cdrom -m 384 -boot d windows.img
    I get this



    I then googled around and found the following:
    http://ubuntuforums.org/showthread.php?t=407729

    Im stopped at the first step I get the following:

    titan@titan-desktop:~$ /media/cdrom$ mount
    bash: /media/cdrom$: No such file or directory
    titan@titan-desktop:~$

    Im at a loss and look to you, the Ubuntu gods for my answers.

  3. #3
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: How to QEMU + Kqemu

    It is working on my system with a kubuntu cd. Is you Windows CD in working order ?
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  4. #4
    Join Date
    Jan 2009
    Beans
    5

    Re: How to QEMU + Kqemu

    I have trouble getting qemu running with kqemu.
    i followed your instructions, loaded the modules(kqemu) but when I run qemu, info kqemu returns "disabled".

    I noticed that there is no point in this howto describing how kqemu is connected to qemu. Does qemu use it automaticaly?

    I run 8.10.

    I red in the homepage of qemu that qemu must be compiled with kqemu support:http://bellard.org/qemu/kqemu-doc.html
    Is in ubuntu?

    I thank you

  5. #5
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: How to QEMU + Kqemu

    kqemu is a kernel module to accelerate qemu. In my experience it does not make qemu all *that* much faster and qemu + kqemu is slower then kvm, VirtualBox, or VMWare.

    Can you provide a little more detail ? Did you add your user to the kqemu group ? log out and back in ? If you re-booted, did you re-load teh kqemu module ? Are you running a 64 bit host / guest ?
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  6. #6
    Join Date
    Jan 2009
    Beans
    5

    Re: How to QEMU + Kqemu

    I'm running Intrepid guest on Intrepid host
    I'm running at 32 bit using linux-source-2.6.27 I added and compiled myself.
    I added the user at the kqemu group by modifying /etc/group.
    I also added the kqemu module at the /etc/modules(lsmod reveals it) and I have rebooted.
    The /dev/kqemu seems correctly installed(this is done automatically in intrepid doesn't it?).
    I used both QTemu and Qemulator.
    I even added -kernel-kqemu parameter in Qtemu or at the command produced by Qemulator and I still dont get kqemu to be used.
    Last edited by pontifikas; January 12th, 2009 at 09:24 AM.

  7. #7
    Join Date
    May 2006
    Beans
    Hidden!

    Re: How to QEMU + Kqemu

    These instructions seem to be lacking quite a few steps. Here is how to get kqemu installed and working:

    sudo aptitude install -R module-assistant kqemu-common kqemu-source qemu linux-headers-server bridge-utils
    sudo module-assistant prepare

    sudo module-assistant auto-install kqemu



    create /etc/udev/rules.d/60-kqemu.rules and put this in it:

    KERNEL=="kqemu", NAME="%k", GROUP="kqemu", MODE="0660"



    Create the kqemu group and add my user to it:

    sudo addgroup --system kqemu

    sudo adduser $USER kqemu



    add 'kqemu' to /etc/modules



    reboot, or "sudo /etc/init.d/udev reload" "sudo depmod -a" and "sudo modprobe kqemu"


    kqemu will now be working. If you want to manage it with libvirt, also do this:

    sudo aptitude install -R libvirt-bin virt-manager virt-viewer xauth

    virt-manager and virt-viewer are gui apps that I sometimes use over an ssh X11 tunnel since I don't install X on my server. You could leave them out and use any old vnc viewer though. I'll often use a vnc viewer and connect by port forwarding through ssh to the vnc display port for the virtual machine on the server.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •