Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Based Virtualization (KVM)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
gertvs
n00b
n00b


Joined: 30 Dec 2006
Posts: 5

PostPosted: Sat Dec 30, 2006 10:30 am    Post subject: Kernel Based Virtualization (KVM) Reply with quote

Maybe this is not the right forum, but I imagine people here will know. I have searched the whole site but didn't find an answer.
I plan to start using Gentoo on new hardware I am currently buying (Intel Core 2 Duo Conroe E6300 based).
I want to install the system using a kernel with the KVM module. I didn't find any package though when I browsed through the package listing.
Is KVM currently available for Gentoo? Or should I wait until 2.6.20 is released?

Thanks
Back to top
View user's profile Send private message
anello
Guru
Guru


Joined: 17 Jul 2005
Posts: 557
Location: EU -> DE -> Stuttgart

PostPosted: Sat Dec 30, 2006 11:05 am    Post subject: Reply with quote

It is not added as yet, though there is a request for an ebuild maintainer ... see here
_________________
Antonino Catinello | http://catinello.eu
Back to top
View user's profile Send private message
gertvs
n00b
n00b


Joined: 30 Dec 2006
Posts: 5

PostPosted: Sat Dec 30, 2006 3:10 pm    Post subject: Reply with quote

anello wrote:
It is not added as yet, though there is a request for an ebuild maintainer ... see here

I could opt to build it outside the portage tree, right? Or would it be better to wait for it to be officially supported, either as a module or inside the 2.6.20 kernel?

Gert
Back to top
View user's profile Send private message
anello
Guru
Guru


Joined: 17 Jul 2005
Posts: 557
Location: EU -> DE -> Stuttgart

PostPosted: Sat Dec 30, 2006 6:23 pm    Post subject: Reply with quote

gertvs wrote:
I could opt to build it outside the portage tree, right?

Yes you can!

Quote:
Or would it be better to wait for it to be officially supported, either as a module or inside the 2.6.20 kernel?

You should wait if you expect help from gentoo developers to troubleshoot the bugs that you'll encounter. So you're pretty much on your own, but you can still post here on the forums and hope that some of the users/devs here have experience in that regard that may help you.
_________________
Antonino Catinello | http://catinello.eu
Back to top
View user's profile Send private message
JoeUser
n00b
n00b


Joined: 08 Apr 2006
Posts: 61

PostPosted: Wed Jan 03, 2007 10:54 pm    Post subject: Reply with quote

You could still build it outside portage. I'm running it. I was too impatient to wait for the next kernel :)

KVM-7 wouldn't build because I needed to use gcc4 but the QEmu part of KVM requires gcc3. As of KVM-8 you can specifiy an alternate compiler for QEmu so now it's running here fine.

For me, i used the following for configure:
Code:
./configure --prefix=/usr/local/kvm --qemu-cc="/usr/bin/gcc-3.4.6"


then make, make install, added kvm-amd (kvm-intel for you) to /etc/modules.autoload.d/kernel-2.6 and modprobe'd it so I could use it right away.
Back to top
View user's profile Send private message
stuorguk
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2003
Posts: 106
Location: UK

PostPosted: Thu Jan 04, 2007 12:46 pm    Post subject: Reply with quote

How well does KVM work? I have just installed 2.6.20-mm1, on a new Gentoo box that I am building and saw it as a kernel option.

Stuart.
Back to top
View user's profile Send private message
JoeUser
n00b
n00b


Joined: 08 Apr 2006
Posts: 61

PostPosted: Thu Jan 04, 2007 2:01 pm    Post subject: Reply with quote

stuorguk wrote:
How well does KVM work? I have just installed 2.6.20-mm1, on a new Gentoo box that I am building and saw it as a kernel option.


Currently not quite as smooth as VMWare but a little better then QEmu with KQemu. It's still a young project but it's coming along very quickly. I've been watching the kvm-devel mailing list on sourceforge and the new MMU Virtualization work for KVM appears to have some significant improvements but I've not tried that yet. The MMU branch I read was for Intel VT only at the moment and I use AMD. I'm looking forward to testing it though.

Someone else that had tested the KVM MMU branch showed quite a good speed up over the current KVM release. See the thread here:
http://sourceforge.net/mailarchive/forum.php?thread_id=31313271&forum_id=50582

Quote from the mailing list:
Quote:
Here are some quick numbers. Context-switch overhead with lmbench
lat_ctx -s 0 [zero memory footprint]:

-------------------------------------------------
#tasks native kvm-r4204 kvm-r4232(mmu)
-------------------------------------------------
2: 2.02 180.91 9.19
20: 4.04 183.21 10.01
50: 4.30 185.95 11.27

so here it's a /massive/, almost 20 times speedup!


I run Windows XP with KVM and it runs just fine for what I need now.
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Thu Jan 04, 2007 2:06 pm    Post subject: Reply with quote

JoeUser wrote:
stuorguk wrote:
How well does KVM work? I have just installed 2.6.20-mm1, on a new Gentoo box that I am building and saw it as a kernel option.


Currently not quite as smooth as VMWare but a little better then QEmu with KQemu.


Noticably better or measurably better? I run a windows server 2003 AD domain & some test VM's on one machine using gentoo/qemu, so if it's really noticable performance increase I might take a look.
Back to top
View user's profile Send private message
JoeUser
n00b
n00b


Joined: 08 Apr 2006
Posts: 61

PostPosted: Thu Jan 04, 2007 2:43 pm    Post subject: Reply with quote

drwook wrote:
Noticably better or measurably better? I run a windows server 2003 AD domain & some test VM's on one machine using gentoo/qemu, so if it's really noticable performance increase I might take a look.


Only slightly noticeably better than Qemu with KQemu after windows is booted but the boot up in KVM pauses a bit with a white screen. I'm not sure what that's all about but after windows is booted it's fine.

For running servers it might be better to wait for the official release of the 2.6.20 kernel if it includes the work from the optimized MMU virtualization branch.
Back to top
View user's profile Send private message
stuorguk
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2003
Posts: 106
Location: UK

PostPosted: Thu Jan 04, 2007 2:55 pm    Post subject: Reply with quote

Sounds great. I have a hard disk with a windows installation on it. What I want to do is either get KVM to boot straight from the HD partition, or copy it into a virtual HD. I assume thats possible.

Stuart.
Back to top
View user's profile Send private message
gertvs
n00b
n00b


Joined: 30 Dec 2006
Posts: 5

PostPosted: Fri Jan 05, 2007 8:59 am    Post subject: Reply with quote

Thanks, everybody here for the excellent information.
I am currently resolving hardware problems with my new system, but I deduct from the performance comparisons provided here, eventhough they're not hard bench marks, that using either the proprietary VMware Player or Qemu with KQemu would be a good temporary option until kernel 2.6.20 is released.
When is 2.6.20 projected to be released?

Many thanks,

Gert
Back to top
View user's profile Send private message
JoeUser
n00b
n00b


Joined: 08 Apr 2006
Posts: 61

PostPosted: Fri Jan 05, 2007 11:07 am    Post subject: Reply with quote

If you're going to use KVM eventually I'd recommend using QEmu while you wait rather then VMWare because KVM also uses QEmu as it's front and its disk images so you can reuse the same disk images you create now after you install KVM. QEmu/KVM will also read VMWare 3 and 4 disk images but i'm not sure if it'll read newer VMWare 5 files. Using QEmu now will save you from having to re-install everything in a new disk image later.

see here: qemu-img invocation
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Sat Jan 06, 2007 1:48 pm    Post subject: Reply with quote

gertvs wrote:
Thanks, everybody here for the excellent information.
I am currently resolving hardware problems with my new system, but I deduct from the performance comparisons provided here, eventhough they're not hard bench marks, that using either the proprietary VMware Player or Qemu with KQemu would be a good temporary option until kernel 2.6.20 is released.
When is 2.6.20 projected to be released?

Many thanks,

Gert

qemu/kqemu has worked out quite nicely for me up to now :)
Back to top
View user's profile Send private message
JoeUser
n00b
n00b


Joined: 08 Apr 2006
Posts: 61

PostPosted: Mon Jan 08, 2007 7:40 pm    Post subject: Reply with quote

gertvs wrote:
... I deduct from the performance comparisons provided here, even though they're not hard bench marks, that using either the proprietary VMware Player or Qemu with KQemu would be a good temporary option until kernel 2.6.20 is released...


There's some benchmarks here now.

http://www.phoronix.com/scan.php?page=article&item=623&num=1
and
http://linux.inet.hr/finally-user-friendly-virtualization-for-linux.html

Personally I think the comparison was done too early because the MMU Optimized branch wasn't used but the numbers are still good. Not quite as good as Xen but better than Qemu+KQemu.
Back to top
View user's profile Send private message
Maf
Guru
Guru


Joined: 15 May 2005
Posts: 310

PostPosted: Fri Jan 12, 2007 12:00 am    Post subject: Reply with quote

Any hope for KVM available for amd64 s939 cpu or just physicly impossible?
Back to top
View user's profile Send private message
JoeUser
n00b
n00b


Joined: 08 Apr 2006
Posts: 61

PostPosted: Fri Jan 12, 2007 2:38 am    Post subject: Reply with quote

Maf wrote:
Any hope for KVM available for amd64 s939 cpu or just physicly impossible?


Does it have SVM support listed under 'flags' in '/proc/cpuinfo'? I don't think it does but I'm not certain.

if it does you're in luck otherwise no. sorry.
Back to top
View user's profile Send private message
dpurcell
n00b
n00b


Joined: 06 Sep 2006
Posts: 4

PostPosted: Fri Jan 12, 2007 6:11 am    Post subject: kvm-11 on amd64 Reply with quote

I've been trying to get kvm-11 to work on my amd64 X2 5200+ but am having trouble compiling it. Perhaps any one of you may know what may be going on?

The first problem I run into is with the ./configure. It says I don't have sdl support, even though I emerged media-libs/libsdl and app-emulation/emul-linux-x86-sdl. I also did a gcc-config and switched my computer to x86_64-pc-linux-gnu-3.4.6 and sourced /etc/profile. When I type ./configure --prefix=/usr/local/kvm, this is what I get:

Install prefix /usr/local/kvm
BIOS directory /usr/local/kvm/share/qemu
binary directory /usr/local/kvm/bin
Manual directory /usr/local/kvm/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/dpurcell/dev/kvm-11/qemu
C compiler /usr/bin/gcc32
... cut out to not bore you with details....
SDL support no
... cut out to not bore you with details....
kvm support yes
Documentation yes
ERROR: QEMU requires SDL or Cocoa for graphical output
To build QEMU without graphical output configure with --disable-gfx-check
Note that this will disable all output from the virtual graphics card.

However, when I cd into the qemu subdir and type './configure' from that subdirectory, I see "SDL support yes" and SDL static support yes" in the output. So I edited the qemu/configure script and forced 'sdl' to 'yes'. After that, I see a 'yes' next to sdl when I run configure from the kvm-11 subdir.

The next issue happens a few moments after I type make (sorry for the tons of output):

/usr/bin/gcc32 -DQEMU_TOOL -I /home/dpurcell/dev/kvm-11/qemu/../user -Wall -O2 -g -fno-strict-aliasing -I. -g -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o qemu-img qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c -lz -luuid
block-vmdk.c: In function `vmdk_open':
block-vmdk.c:420: warning: passing arg 1 of `dirname' discards qualifiers from pointer target type
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libz.a when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[1]: *** [qemu-img] Error 1
make[1]: Leaving directory `/home/dpurcell/dev/kvm-11/qemu'
make: *** [qemu] Error 2

Why would qemu have trouble finding a compatible libz? I have made sure I have zlib installed.

-Confused
Back to top
View user's profile Send private message
dpurcell
n00b
n00b


Joined: 06 Sep 2006
Posts: 4

PostPosted: Fri Jan 12, 2007 6:14 am    Post subject: Reply with quote

Ha! Figured it out. All I needed to do was this:

Code:
/configure --prefix=/usr/local/kvm --qemu-cc="/usr/bin/gcc-3.4.6"


and all my sdl and zlib problems went away!
Back to top
View user's profile Send private message
Maf
Guru
Guru


Joined: 15 May 2005
Posts: 310

PostPosted: Fri Jan 12, 2007 7:25 am    Post subject: Reply with quote

JoeUser wrote:


Does it have SVM support listed under 'flags' in '/proc/cpuinfo'? I don't think it does but I'm not certain.

if it does you're in luck otherwise no. sorry.


Ok, then I have small OT question: Which other VM do you all suggest to use? Qemu, Xen? Or something else?
I'd like it to be fast and use free/libre license.
Back to top
View user's profile Send private message
whig
l33t
l33t


Joined: 27 Nov 2004
Posts: 973
Location: New Zealand

PostPosted: Fri Jan 12, 2007 8:14 am    Post subject: Reply with quote

If you want an X gui in a VM then KVM uses Qemu's. Xen is faster, but console only I understand.
Back to top
View user's profile Send private message
JoeUser
n00b
n00b


Joined: 08 Apr 2006
Posts: 61

PostPosted: Fri Jan 12, 2007 10:26 am    Post subject: Reply with quote

It depends on your needs. Do you plan on running Windows on it? Xen has the same limitation as KVM. It can't run Windows without an SVM or VT capable processor. Xen's paravirtualization can get near native performance using modifed Xen aware guests but MS isn't going to let anyone release modified Windows source. Windows will only run unmodified in Xen and KVM with hardware assisted full virtualization. You also need to VNC, TSClient, XDMCP or SSH with X forwarding to get a windowed interface to a Xen guest. The kvm-devel mailing list has some work being done to give KVM paravirtualization support but then like Xen it'll require modified guests to make them 'aware'. I might be wrong here but that's how I understand it all.

Also, I couldn't get Xen to work reliably. I don't think it likes my Acer because when I booted the Xen kernel built from the Xen modified kernel source in Portage everything just went BAD. I think Xen is overkill for most peoples needs unless you're consolidating a server farm into fewer machines. The average Linux user probably just wants it to run windows for their last few programs they don't have replacements for yet. That's my situation and KVM is fine for me.

Qemu with KQemu accelerator isn't bad if you don't have an SVM/VT processor. It'll run Windows for you unmodified but KQemu isn't open. There was an open source project to create a Qemu accelerator called QVM86 but I haven't tried it.


Last edited by JoeUser on Sat Jan 13, 2007 1:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
Maf
Guru
Guru


Joined: 15 May 2005
Posts: 310

PostPosted: Sat Jan 13, 2007 12:00 pm    Post subject: Reply with quote

I have Athlon 64 @ s939 cpu, so I probably have to stay with Qemu + KQemu, which works quiet ok.
Back to top
View user's profile Send private message
kraix
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2005
Posts: 93

PostPosted: Sat Jan 13, 2007 2:30 pm    Post subject: Reply with quote

there has been one thing I have been wanting to know but haven't really put any time into figuring it out, with virtualization hardware, AMD Turion Tl-50, is it possible to get good 3d rendering for games under Xen or KVM? pretty much for games...
Back to top
View user's profile Send private message
whig
l33t
l33t


Joined: 27 Nov 2004
Posts: 973
Location: New Zealand

PostPosted: Sat Jan 13, 2007 8:07 pm    Post subject: Reply with quote

Socket 754 here: Qemu gives me a Cirrus "card" so no hardware opengl. The programs do run, at about 4 fps :(
Back to top
View user's profile Send private message
kraix
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2005
Posts: 93

PostPosted: Sat Jan 13, 2007 11:20 pm    Post subject: Reply with quote

But I don't believe the 754 has virtualization support at all. The turion tl-50 does have virtualization support, which might increase opengl performance for some very strange reason.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum