Taking the plunge with QEMU; couple of questions...
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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.
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.
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.
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.
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?
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.
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.
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.
I installed QEMU, QEMU-KVM, and KVM from Slackbuilds.org.
Quote:
Originally Posted by Lufbery
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:
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:~#
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.