LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-19-2010, 06:27 PM   #1
integrale16
Member
 
Registered: Sep 2009
Posts: 56

Rep: Reputation: 15
qemu/kvm, virt-manager (poor performance) and aqemu (many segmentation faults)


Hi,

Until now I used VirtualBox to virtualize Windows and other systems on my Slackware64 box. After upgrading to 13.1 I decided to give kvm a try.

I have a few questions regarding virtualization with qemu-kvm.

1)
In this thread, http://www.linuxquestions.org/questi...1-64-a-814431/, I read that the virtio module is used by the guest.
Does this mean that I don't have to load this module on the host system, but only in a Linux guest?

2)
Is the kqemu acceleration module only for use with the "normal" qemu or is it also useful for virtualization with qemu-kvm?
Should I build and load this too?

3)
Actually I have installed qemu-kvm and virt-manager with all it's dependencies from slackbuilds.org. I created the kvm and libvirt group and added my user to the groups. Then I loaded the modules kvm, kvm-intel, virtio and started libvirtd.
When I started virt-manager I got this warning "warning : qemudStartup:1099 : Unable to create cgroup for driver: No such device or address".
Is it a problem or can I ignore it?

4)
Then I created my first virtual machine, in which I just bootet slax from a local iso file.
But the performance was very poor. It took really long to boot and even when the system was up it was very slow.
Any idea what's going wrong here?

5)
I also gave aqemu a try.
It's a good GUI for kvm in my eyes (similar to VirtualBox) and would perfectly fit my needs, because I don't need to have remote access to a virtual machine like it's possible with virt-manager.
I built the version 0.7.3 with a self written build-script, without any problems.
And if I get to the point where I can start a virtual machine without getting a segmentation fault before (which kills aqemu), the performance of booting slax again was really good, also if compared with VirtualBox.
Does anyone know how to get rid of the many segmentation faults?
I also tried the binaries, which also were available at the projects sourceforge site, but also got segmentation faults.
Are they architecture dependent? Would it help to make my system multilib and try to compile and run it in 32 bit mode?

6)
I don't understand the different behaviour regarding the performance of aqemu and virt-manager, because I thought they are both just a GUI for qemu-kvm and the virtualization resources would be provided by qemu-kvm. Therefore I think that there is something wrong with the installation or configuration of virt-manager, but I have no idea what it could be.


In the end, I think, if I would get aqemu running smoothly, it would be the tool of my choice.
Therefore I think, I will give the development snapshot of aqemu 0.8 a try. Hopefully this will help to get rid of at least some of the segmentation faults :-)


integrale16
 
Old 06-19-2010, 08:11 PM   #2
integrale16
Member
 
Registered: Sep 2009
Posts: 56

Original Poster
Rep: Reputation: 15
I actually grabbed the source of the development version 0.8alpha from the git repository and built a package.
Now the segmentation faults are gone so far. There are still two error messages indeed, but you can at least get rid of these, with copying the needed data (icon set and templates) in place.
So, one will notice that it's still a development release, but now much more stable, at least for me :-)
 
Old 06-20-2010, 12:37 AM   #3
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 476

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Quote:
Originally Posted by integrale16 View Post
1)
In this thread, http://www.linuxquestions.org/questi...1-64-a-814431/, I read that the virtio module is used by the guest.
Does this mean that I don't have to load this module on the host system, but only in a Linux guest?
That's right. Host system doesn't need virtio modules.

Quote:
Originally Posted by integrale16 View Post
2)
Is the kqemu acceleration module only for use with the "normal" qemu or is it also useful for virtualization with qemu-kvm?
Should I build and load this too?
With kvm module you don't need kqemu. Kqemu is only used on computer without virtualization on processor.

Quote:
Originally Posted by integrale16 View Post
3)
Actually I have installed qemu-kvm and virt-manager with all it's dependencies from slackbuilds.org. I created the kvm and libvirt group and added my user to the groups. Then I loaded the modules kvm, kvm-intel, virtio and started libvirtd.
When I started virt-manager I got this warning "warning : qemudStartup:1099 : Unable to create cgroup for driver: No such device or address".
Is it a problem or can I ignore it?
I don't know because I use only qemu-kvm. Now you can disable virtio on your host system.

Quote:
Originally Posted by integrale16 View Post
4)
Then I created my first virtual machine, in which I just bootet slax from a local iso file.
But the performance was very poor. It took really long to boot and even when the system was up it was very slow.
Any idea what's going wrong here?
Are you sure virtualization is enable in your bios ?
 
Old 06-20-2010, 02:05 AM   #4
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Rep: Reputation: 9
Quote:
With kvm module you don't need kqemu. Kqemu is only used on computer without virtualization on processor.
Thank you, I didn't know that. I'll edit my other tread with this info.

Anyway, to check your processor...
$ cat /proc/cpuinfo

Under "Flags" either vmx (intel) or svm (AMD)
Code:
bash-4.1$ cat /prov/cpuinfo
cat: /prov/cpuinfo: No such file or directory
bash-4.1$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 37
model name	: Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
stepping	: 2
cpu MHz		: 1199.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe 
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good 
xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx
est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat 
tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4522.20
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

/Håkan
 
Old 06-20-2010, 04:37 AM   #5
integrale16
Member
 
Registered: Sep 2009
Posts: 56

Original Poster
Rep: Reputation: 15
I have a Core 2 Duo T7200 and procinfo shows me the vmx flag.

And the second thing is, that the performance with aqemu is okay, compared with Virtualbox.
Boot time of Slax with VirtualBox is something about 85 seconds and with aqemu about 55 seconds.

And as I wrote, I thought that virt-manager and aqemu are just GUIs and the virtualization is done by qemu-kvm, and therefore I wouldn't have expected a performance difference, especially not so extremely.
 
Old 06-20-2010, 05:12 AM   #6
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
I have found the same faults with points 3 and 4 that you made, they make the use of virt-manager unsustainable in my opinion. You are correct that it is qemu-kvm that does the work and it is relatively easy to run a virtual machine from the command line. However it is often easier just to point and click and personally I like the option to do both. So it would be nice if the GUI managers performance was a bit better.

samac
 
Old 06-20-2010, 08:50 AM   #7
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Rep: Reputation: 9
I have the same fault with point 3 as you have, but I installed "Linux Mint" as guest and it boots in 15s !!
I have never experienced anything that fast before...the only thing (without testing to much) is that the mouse is a little unresponsive.

No luck with Windows yet..but I'm still trying.

/Håkan
 
Old 06-20-2010, 10:11 AM   #8
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
OK just created an image and installation, from the command line, of SalixOS (32-bit) on my Slackware64-13.1 (multi-lib) system. I also ran it from the command line and it runs at near native speeds.

The version installed and run by Virtual Machine Manager doesn't even boot-up.

From this I would deduce that kvm-qemu has compiled and installed properly but virt-manager et al have either not compiled properly or are configured incorrectly.

As I am only going to use this on rare occasions I think I will have a look at aqemu.

samac
 
Old 06-20-2010, 10:51 AM   #9
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
OK had a look at aqemu, it works but it is still a bit sluggish. Guess It is CLI for me.

samac
 
Old 06-20-2010, 12:27 PM   #10
integrale16
Member
 
Registered: Sep 2009
Posts: 56

Original Poster
Rep: Reputation: 15
As I wrote above, the development branch of aqemu performs at least better than VirtualBox.
I think I will stick with aqemu for now to play around with it and follow the development branch as far as a release is stable enough for me.


But would still be interested, what could be wrong with virt-manager (on Slackware64 13.1), that it performs that bad (on my system).
 
Old 06-21-2010, 01:45 AM   #11
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Rep: Reputation: 9
I'm curious so I tried slax too, and have to agree with you, boot took 4m 10s and then it was v_e_r_y s_l_o_w...not usable at all.

Maybe it's a thing with "live-cd"

You could try Linux Mint (or something else) and see if you get better performance when you install it as a guest.

/Håkan
 
Old 06-21-2010, 12:54 PM   #12
integrale16
Member
 
Registered: Sep 2009
Posts: 56

Original Poster
Rep: Reputation: 15
Maybe you are right and it's a thing with live-cd in virt-manager, but in aqemu the performance is okay.
The next thing is, that aqemu has no additional dependencies in contrast to virt-manager. This is also a plus for aqemu in my eyes.
 
Old 06-23-2010, 01:07 AM   #13
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Rep: Reputation: 9
I tried Aqemo, cant get any "picture" in display-tab, but when slax has booted I can see it if I view "Full Screen"...and then it runs OK.

I need same help with the "command-line", the man-page is b_i_g and not so easy to understand. I found this...
http://www.askarali.org/qemu_howto.html
..but when I tried to start (I created salix.img)..
Code:
bash-4.1# qemu -hda salix.img -cdrom /home/spiken/Download/salix-13.1.iso -boot d
No protocol specified
No protocol specified
qemu: hardware error: register_ioport_write: invalid opaque
..any help is much appreciated.

From "samac"..
Quote:
virt-manager et al have either not compiled properly or are configured incorrectly.
I think so too, I installed Fedora Core and there "Slax" works OK in Fedoras's "Virt-manager"

At last, is it correct that I should only have "qemu-kvm" (and not "qemu") installed when I use kvm (kvm, kvm-intel modules)?

/Håkan
 
Old 06-23-2010, 01:46 AM   #14
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 476

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Quote:
Originally Posted by hakan56 View Post
At last, is it correct that I should only have "qemu-kvm" (and not "qemu") installed when I use kvm (kvm, kvm-intel modules)?
You should launch qemu-system-x86-64.
 
Old 06-23-2010, 01:49 AM   #15
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
qemu-system-x86_64 is for KVM, qemu is full virtualization, and is slow.

Double check the kvm modules are loaded. Should have kvm and kvm-$CPU. Also check that permissions are correct. If you set up qemu-kvm correctly with a udev rule, and added your self to the kvm group, everything should be good to go.
Code:
lsmod | grep kvm
ls -l /dev/kvm
Then launch qemu-system-x86_64. I've included some extra options. Spend some trial and error time with the man page, kvm wiki, and terminal. It's not that hard once you've used it a few times
Code:
qemu-system-x86_64 -cpu host -m 1024 -hda salix.img \
-cdrom /home/spiken/Download/salix-13.1.iso \
-net user -net nic,model=e1000 -vga vmware -sdl \
-usb -usbdevice tablet -soundhw sb16 \
-boot d
The -usbdevice tablet helps with mouse syncing on some systems.
Instead of using -sdl, which launches in it's own application window, I like to use vnc. Replace -sdl with -vnc :1. Then you can launch vncviewer in another terminal tab.
If you have an AMD CPU, using -cpu host,phenom,qemu64, or kvm64 will cause a kernel oops in some cases. You'll have to use -cpu core2duo.

I see that you defined -hda as salix.img. Make sure the image actually exists and is correct. If you wanted to create a 20G raw image named salix.img, here's the command for that.
Code:
qemu-img create -f raw salix.img 20G
Using qemu-kvm directly from the command line means you only have to manually track, update, build, use, troubleshoot and install a single package. Tightvnc is in extra/. The KVM modules have been included in the kernel for some time now.

Personally I find qemu-kvm slightly faster than VMware when it comes to hard drive throughput. It's what I run my build boxes on. I need to build packages for P3's, AMD x86_64, and Intel Core2Duo's. KVM allows me to specify cpuinfo, and optimize packages for each system.

VMware on the other hand, has a fancy easy to use GUI, better graphics support, and simple to configure advanced networking options.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] winxp in qemu+kvm on ubuntu 10.04: extremely poor performance [GOD]Anck Linux - Virtualization and Cloud 2 12-02-2010 09:58 PM
QEMU/KVM GUI = AQEMU segmentation fault on slackware64 13.0! agentdcooper Slackware 3 09-16-2009 05:59 AM
LXer: KVM Guest Management With Virt-Manager On Ubuntu 8.10 LXer Syndicated Linux News 0 02-10-2009 02:50 PM
KVM + qemu + virt-manager issues cyanide_will Linux - Software 4 04-15-2008 01:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration