Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Virtualization
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Virtualization
For questions on VMWare, VirtualBox, Xen, QEMU and other virtualization software.

 
Thread Tools Display Modes
Old November 7th, 2008   #1
bodhi.zazen
Ubuntu Guru
 
bodhi.zazen's Avatar
 
Join Date: Apr 2006
Location: Montana
My beans are hidden!
Xubuntu Karmic Koala (testing)
Send a message via Yahoo to bodhi.zazen
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:
Quote:
(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
__________________
A person with ubuntu is open and available to others, affirming of others, does not feel threatened that others are able and good, for he or she has a proper self-assurance that comes from knowing that he or she belongs in a greater whole and is diminished when others are humiliated or diminished, when others are tortured or oppressed. ~ Archbishop Desmond Tutu, 1999

bodhi.zazen is offline   Reply With Quote
Old November 8th, 2008   #2
TitaniumXJ
First Cup of Ubuntu
 
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.
TitaniumXJ is offline   Reply With Quote
Old November 8th, 2008   #3
bodhi.zazen
Ubuntu Guru
 
bodhi.zazen's Avatar
 
Join Date: Apr 2006
Location: Montana
My beans are hidden!
Xubuntu Karmic Koala (testing)
Send a message via Yahoo to bodhi.zazen
Re: How to QEMU + Kqemu

It is working on my system with a kubuntu cd. Is you Windows CD in working order ?
__________________
A person with ubuntu is open and available to others, affirming of others, does not feel threatened that others are able and good, for he or she has a proper self-assurance that comes from knowing that he or she belongs in a greater whole and is diminished when others are humiliated or diminished, when others are tortured or oppressed. ~ Archbishop Desmond Tutu, 1999

bodhi.zazen is offline   Reply With Quote
Old January 11th, 2009   #4
pontifikas
First Cup of Ubuntu
 
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
pontifikas is offline   Reply With Quote
Old January 11th, 2009   #5
bodhi.zazen
Ubuntu Guru
 
bodhi.zazen's Avatar
 
Join Date: Apr 2006
Location: Montana
My beans are hidden!
Xubuntu Karmic Koala (testing)
Send a message via Yahoo to bodhi.zazen
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 ?
__________________
A person with ubuntu is open and available to others, affirming of others, does not feel threatened that others are able and good, for he or she has a proper self-assurance that comes from knowing that he or she belongs in a greater whole and is diminished when others are humiliated or diminished, when others are tortured or oppressed. ~ Archbishop Desmond Tutu, 1999

bodhi.zazen is offline   Reply With Quote
Old January 12th, 2009   #6
pontifikas
First Cup of Ubuntu
 
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 04:24 AM..
pontifikas is offline   Reply With Quote
Old March 3rd, 2009   #7
Brazen
Quad Shot of Ubuntu
 
Join Date: May 2006
My beans are 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.
Brazen is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:32 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry