LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-29-2010, 01:17 PM   #1
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Taking the plunge with QEMU; couple of questions...


Hi all,

I've recently reread Eric's wiki article on virtualization with QEMU. Using QEMU looks pretty straightforward and I'm going to give it a shot. I've got a pretty new dual-core 64-bit Athalon computer with 4 Gig of RAM and a middling-powerful Nvidia graphics card.

I still dual-boot with WindowsXP, but hardly ever go into Windows. The exceptions are when I want to play a game and, now, to use the software that came with my new Samsung cellular phone. Naturally, if I can get good performance from XP in a QEMU session, then I can ditch my WindowsXP partition and use it for something more useful. I'd also like to install Ubuntu, Debian, or OpenSUSE to test software and do research for the articles I write.

Anyway, I've got a couple of questions:

1) How is the graphics performance? Will the XP machine be able to use the Windows Nvidia drivers and give me good graphics performance for games?

2) Will the QEMU XP machine be able to read the CD-ROM/DVD and USB drives?

Thanks in advance for your answers and any tips.
 
Old 06-29-2010, 01:38 PM   #2
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Blog Entries: 1

Rep: Reputation: 44
As far as your first question (graphics performance) -- this depends on what you are trying to do, but from what I've read (I don't play games, so I have no first-hand experience here) the graphics performance for qemu guests is poor (see 1 and 2 for example, and try a google search for qemu graphics performance windows) ... basically, if you're looking for graphics-intensive 3D gaming, you'll probably want to check out something like Xen (assuming your processor has virtualization capabilities built in).

As far as your second question (ability to read USB/CD/DVD drives) -- yes, you should have no problem here with either Xen or Qemu.
 
Old 06-29-2010, 04:54 PM   #3
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by jrtayloriv View Post
As far as your first question (graphics performance) -- this depends on what you are trying to do, but from what I've read (I don't play games, so I have no first-hand experience here) the graphics performance for qemu guests is poor (see 1 and 2 for example,
Darn.

Okay, I'll look at VMware. I think I read that in full-screen mode, it directly uses the video card.
 
Old 06-29-2010, 05:20 PM   #4
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
It might even pay to look at wine for games. I had some good luck there with half life and some of the star trek games. I think more people use wine than a vm.
 
Old 06-29-2010, 05:29 PM   #5
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Originally Posted by Lufbery View Post
Darn.

Okay, I'll look at VMware. I think I read that in full-screen mode, it directly uses the video card.
It doesn't. VMware uses it's own driver regardless of resolution. VMware does have a decent enough graphics subsystem though for some games. Though these games would work far better in Wine.

On a core2duo e8400 (3.0 x 2) I could launch COD Modern Warfare 2 demo, and with all settings at low, it some what played. Works fine at 1680x1050 with most eye candy in Wine. If you're after Games For Windows, get a dedicated Games For Windows gaming machine, dual boot, or fickle with wine. You'll have to decide which path sucks less for you. Personally, I decided to only play and give our money to Games For Linux Granted the selection is pitiful compared to the other markets, but what's out there is great.

As jrtayloriv noted, qemu-kvm does not have the best graphics. Though it can use the -vga vmware option. qemu-kvm gets 110FPS with glxgears, vmware achieves ~400FPS.
 
Old 06-30-2010, 08:41 AM   #6
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Ah. Well.

Wine is out for me right now because I'm running a pure 64-bit Slackware and don't really want to go multi-lib. It sounds like my best strategy is to continue to dual boot with Windows XP for games, but look at QEMU for other programs I use in Windows that don't rely on heavy graphics.

Thanks for the advice, folks!
 
Old 07-01-2010, 08:40 AM   #7
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Update:

I'm up and running with QEMU with the KVM module stuff from Slackbuilds.org. Eric's instructions are fantastic and it didn't take very long to get everything installed and configured. I then installed Ubuntu 10.04 from a downloaded ISO and it's running well.

The performance is good, but I can see how the graphics would lag badly with 3D games in Windows.
 
Old 07-01-2010, 09:14 AM   #8
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Originally Posted by Lufbery View Post
Ah. Well.

Wine is out for me right now because I'm running a pure 64-bit Slackware and don't really want to go multi-lib. It sounds like my best strategy is to continue to dual boot with Windows XP for games, but look at QEMU for other programs I use in Windows that don't rely on heavy graphics.

Thanks for the advice, folks!
I finally decided to go multi-lib sometime after 13.0 was released - only to get my Torchlight fix . When I upgraded to 13.1, I stripped wine and multi-lib back out. Realized I honestly just did not need it that bad.

We still have an old Windows XP install hooked up to the network. It sits powered off most of the time. Though earlier this year I used it to play C&C. Picked up The First Decade for $10. It was fun for about an hour. Decided not to convert this one to Linux because my girl friend used to be a huge fan of The Sims. Not sure if it's a good thing most of Reflexive Arcade's games work in wine or not. Think I'd rather have her still playing The Sims.

We're not big gamers, but I can imagine the frustration Linux users must have over this situation. Every year we're promised more and more Linux games. Thankfully, recently this has been coming true. If you get the chance, and it's your type of game, check out Penumbra from Frictional Games. We bought the 3 part series, and pre-ordered thier next release a few months back. Reminded me of when I played Resident Evil on the playstation while in high school. When the funds become available, I'm going to purchase The Book of Eschalon. I'm eagerly awaiting Overgrowth from Wolfire, and wish LGP would get Bandits: Phoenix Rising out the door.

Independent game companies are starting to release fabulous products native to Linux. If we send them a message we're starving and willing to pay, maybe a big box or 2 outfit will hear the message. Don't forget about the many open source offerings out there as well. Two of my favorite games are Warzone and Spring. Not quite Total Annihilation, but Spring fills the void.

About qemu-kvm, try using -vga std -vnc :1, and connect to the vm with vncviewer :1 (part of TightVNC in extra/) I've found that to work best on my systems. Lately I've been getting freezes with -vga vmware. Haven't been bothered to investigate what I did

Last edited by disturbed1; 07-01-2010 at 09:17 AM.
 
Old 07-01-2010, 09:39 AM   #9
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by disturbed1 View Post
We're not big gamers, but I can imagine the frustration Linux users must have over this situation. Every year we're promised more and more Linux games. Thankfully, recently this has been coming true. If you get the chance, and it's your type of game, check out Penumbra from Frictional Games. We bought the 3 part series, and pre-ordered thier next release a few months back. Reminded me of when I played Resident Evil on the playstation while in high school. When the funds become available, I'm going to purchase The Book of Eschalon. I'm eagerly awaiting Overgrowth from Wolfire, and wish LGP would get Bandits: Phoenix Rising out the door.

Independent game companies are starting to release fabulous products native to Linux. If we send them a message we're starving and willing to pay, maybe a big box or 2 outfit will hear the message. Don't forget about the many open source offerings out there as well. Two of my favorite games are Warzone and Spring. Not quite Total Annihilation, but Spring fills the void.
Thanks for the game recommendations. I'll have to check them out!

Right now, the two titles that I really play are MS's Combat Flight Simulator II and Red Baron 3D -- both pretty old titles, but they run fantastically smoothly on my (relatively) powerful AMD machine with Nvidia graphics card. To date, I haven't seen a Linux combat flight simulator at all.

Quote:
About qemu-kvm, try using -vga std -vnc :1, and connect to the vm with vncviewer :1 (part of TightVNC in extra/) I've found that to work best on my systems. Lately I've been getting freezes with -vga vmware. Haven't been bothered to investigate what I did
Okay, now here I'm really confused.

I installed QEMU, QEMU-KVM, and KVM from Slackbuilds.org.

I followed Alien Bob's wiki instructions, plus the readmes on the packages I installed, and got QEMU working well. I started QEMU from the command line and it used the KVM module.

I thought I had to load all three packages to get QEMU to use the KVM module.

Are you saying I can run QEMU-KVM as a program the same way I do QEMU?

Thanks,
 
Old 07-01-2010, 10:26 AM   #10
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
qemu is a full emulation application. If you have an Intel PIII 1000, you can emulate a PPC, amd64, mips, arm, .... cpu. Does not need VT CPU extensions to run. Any platform can emulate any other platform. And it's extremely slow. kqemu, an accelerator does speed up same platform emulation.

qemu-kvm is qemu with patches to allow qemu to interface with KVM. This requires the CPU to have VT extensions. x86 platforms can only virtualize other x86 platforms.

I've read that qemu does have support for KVM since version 10 something. Reading anything on qemu's page directs you to qemu-kvm.

KVM is the kernel modules. These are included with the kernel for quite a while now. No real reason to build that package with recent Slackware releases. That package was needed in the past to update the kernel modules to a more recent version of KVM. The kernel developement and inclusion was slow in the past, but not recently.

You really only need to install/run qemu-kvm, and load the kvm-$CPU module. Loading kvm-amd auto loads kvm, I'm sure you added your self to the correct group, if not, qemu-system-x86_64 prints a nice warning for you.
Here's an example command line I use for a VM.
Code:
qemu-system-x86_64 -cpu core2duo \
-smp 2 -hda slack64 -m 4096 \
-net user -net nic,model=e1000 -usb -usbdevice tablet \
-vga std -vnc :1 -boot c
It's simple and works
You can get into more complcated configuration with the virtio modules for networking and hard drives. These claim to have added performance. I personally did not notice much a difference between virtio on a raw formatted image. Didn't feel like messing with TAP/TUN, so never tried the virtio networking. The benchmarks do show a vast improvement on the networking though.
http://en.wikipedia.org/wiki/QEMU
http://en.wikipedia.org/wiki/Paravirtualization
http://en.wikipedia.org/wiki/Kernel-...irtual_Machine
http://www.linux-kvm.org/page/Main_Page
 
Old 07-01-2010, 10:48 AM   #11
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
If you can use it use qemu-kvm.

The older qemu (qemu-legacy on SBO) + kqemu is ok but qemu-kvm ought to be faster. I am only maintaining qemu-legacy for people on older hardware that need kqemu still, and don't have paravirtualisation support in their CPU.
 
Old 07-01-2010, 12:31 PM   #12
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by disturbed1 View Post
qemu is a full emulation application. If you have an Intel PIII 1000, you can emulate a PPC, amd64, mips, arm, .... cpu. Does not need VT CPU extensions to run. Any platform can emulate any other platform. And it's extremely slow. kqemu, an accelerator does speed up same platform emulation.

qemu-kvm is qemu with patches to allow qemu to interface with KVM. This requires the CPU to have VT extensions. x86 platforms can only virtualize other x86 platforms.
Thanks disturbed1 and dive!

It looks like I grabbed and installed the correct packages, now I just need to tune QEMU's starting parameters a bit.

Thanks for the help!
 
Old 07-02-2010, 09:02 AM   #13
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Last night, something finally clicked:

Code:
qemu-system-x86_64
is the command to start QEMU-KVM as indicated in disturbed1's script.

I had been using QEMU, which was picking up KVM support, but it wasn't as fast as QEMU-KMV.

Thanks again!
 
Old 07-02-2010, 10:59 AM   #14
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by Lufbery View Post
I installed QEMU, QEMU-KVM, and KVM from Slackbuilds.org.
Quote:
Originally Posted by Lufbery View Post
I had been using QEMU, which was picking up KVM support, but it wasn't as fast as QEMU-KVM.
You may run into version issues if you install QEMU, QEMU_KVM and KVM on the same host. Depending on the order of installation you may be running older versions of qemu-kvm and the kvm-kmod modules.

To run with the most recent versions of qemu-kvm and the supporting kvm-kmod modules you should only install QEMU_KVM and uninstall both the QEMU and KVM packages. If you don't do that then you might be running versions that date back 9 months or more.

NOTE: After uninstalling the KVM package you might need to run "depmod -a" to remap and make available the original Slackware 13.1 kvm, kvm-amd and kvm-intel modules.

You can check the kvm-kmod modules you are running using:

Code:
root@host:~# modinfo kvm
filename:       /lib/modules/2.6.33.4/kernel/arch/x86/kvm/kvm.ko
license:        GPL
author:         Qumranet
depends:        
vermagic:       2.6.33.4 SMP mod_unload 
parm:           oos_shadow:bool
parm:           ignore_msrs:bool
root@host:~#
Over time as newer KVM-KMOD modules are released there may be a need to update to a more current version. The versions that come with Slackware 13.1 are current up to 2.6.33.4 which for most cases is good enough. If you need the additional KVM-KMOD fixes or features then you would install the KVM-KMOD package which is available at SlackBuilds to upgrade the kvm, kvm-amd and kvm-intel modules.

You can check the qemu-system-x86_64 you are running using:

Code:
root@host:~# qemu-system-x86_64 -version
QEMU PC emulator version 0.12.4 (qemu-kvm-0.12.4), Copyright (c) 2003-2008 Fabrice Bellard
root@host:~#
Hope that helps. YMMV!
 
Old 07-02-2010, 11:46 AM   #15
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Chuck,

Great info, thanks!

Quote:
You may run into version issues if you install QEMU, QEMU_KVM and KVM on the same host. Depending on the order of installation you may be running older versions of qemu-kvm and the kvm-kmod modules.

To run with the most recent versions of qemu-kvm and the supporting kvm-kmod modules you should only install QEMU_KVM and uninstall both the QEMU and KVM packages. If you don't do that then you might be running versions that date back 9 months or more.
Quick question: My understanding is that, to build QEMU-KVM, I need QEMU installed too -- at least the versions from Slackbuilds.org. Is that no longer the case?

Regards,
 
  


Reply



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
Taking the plunge to Linux, finally! lmkwak LinuxQuestions.org Member Intro 1 07-16-2008 09:58 AM
Why I'm taking the plunge tanstaafl4y LinuxQuestions.org Member Intro 2 10-30-2006 12:33 PM
Taking the plunge...RH4...32bit or 64? devinnull Linux - Newbie 9 02-02-2006 11:04 PM
taking the plunge into linux with ubuntu binkgle Linux - Newbie 32 03-07-2005 08:09 AM
Linux Newb - Taking the plunge janderson Linux - Newbie 26 08-06-2004 12:33 PM

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

All times are GMT -5. The time now is 12:07 PM.

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