Slashdot Mirror


Virtualization In Linux Kernel 2.6.20

mcalwell writes with an article about the Kernel-based Virtual Machine (or KVM for short) in the release candidate Linux 2.6.20 kernel. From the article: "[T]he Linux 2.6.20 kernel will include a full virtualization (not para-virtualization) solution. [KVM] is a GPL software project that has been developed and sponsored by Qumranet. In this article we are offering a brief overview of the KVM for Linux as well as offering up in-house performance numbers as we compare KVM to other virtualization solutions such as QEMU Accelerator and Xen."

46 of 178 comments (clear)

  1. Oddness in kernel release cycle by CRCulver · · Score: 2, Interesting

    For 2.6.19, there's only been a single patch so far (2.6.19.1). Usually there are more. Was 2.16.19 unusually unproblematic, or has attention been drawn away by the development of new features for 2.6.20?

    1. Re:Oddness in kernel release cycle by EzInKy · · Score: 2, Informative

      I've seen a lot of mentions of file corruption on their mailing list, even with ext3.

      --
      Time is what keeps everything from happening all at once.
    2. Re:Oddness in kernel release cycle by marol · · Score: 2, Informative

      Quoting Torvalds from the 2.6.19 release announcement:
      'So go get it. It's one of those rare "perfect" kernels.'

    3. Re:Oddness in kernel release cycle by arivanov · · Score: 5, Informative

      No, the attention has been drawn from people actually giving a fuck.

      Kernels from 2.6.9 onwards are a disaster.

      • PIO IDE causes a deadlock on Via chipsets under heavy IO from 2.6.11 onwards. Worst in 2.6.16, but still reproducible on others.
      • IDE TAPE no longer works from 2.6.10 onwards
      • IDE-SCSI no longer works from 2.6.10 onwards at least up to 2.6.16
      • LONGHAUL is broken to some extent since 2.6.9
      • There is a change in fundamental APIs - termIO (2.6.16), locking (2.6.15), scheduling(every second f*** kernel), etc every release so it is takes a fully blown porting effort and untangling unrelated changes to backport fixes to a driver.

      The original idea was that "distributions will fork off and maintain kernel for releases". This idea has degenerated into "only distributions can fork and maintain a kernel". Sole developers and hobbyists are being treated the same way Microsoft treats them - as a "one night stand". In fact, even distributions are unable to keep up with that. Fedora has half of these bugs in it. So does etch, so does mandriva and all other lesser distributions. Only RHELL and Suse ship something reasonably useable and it is 1 year behind on features.

      Reality is that anything past 2.6.9 should be called 2.7.x and that is it. And it may be seriously worth it to consider Gentoo/BSD or Debian/BSD. While the BSD crowd has its own failings, it does not change fundamental APIs for entertainment purposes every month on the stable branch.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    4. Re:Oddness in kernel release cycle by ArsonSmith · · Score: 2, Funny

      Way to go Linus. Tell them distros to Fork off!!!

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    5. Re:Oddness in kernel release cycle by Ryan+Mallon · · Score: 2, Informative

      Umm, what? According to http://www.kernel.org/ 2.6.19.1 is the latest stable version. Stable versions are denoted by having an even number for the major revision, odd numbers are for development versions.

    6. Re:Oddness in kernel release cycle by jnana · · Score: 3, Informative

      I'm not sure in general, but I've been happily using 2.6.19 for a while with no issues.

      As for kvm, I downloaded it about a week ago and manually built and installed it (on 2.6.19), and I've had no trouble with it at all. It was very easy to build and install following the instructions, and creating images and installing a new os on them is trivial. I set up a couple of images for experimenting with ubuntu and fedora (my main os is gentoo), and I set up another image on which I installed Plan 9, just to play around with that a little.

    7. Re:Oddness in kernel release cycle by Spoke · · Score: 2, Informative

      The file corruption talked about has been in the kernel for some time, but recent changes made it more visible and easier to trigger. It should be fixed in the latest 2.6.20rc kernel.

      If you search the kernel archives for ext3 corruption you'll find a couple long threads discussing the issue and the solution.

    8. Re:Oddness in kernel release cycle by Builder · · Score: 5, Insightful

      That information is outdated really. The main developers decided that we wouldn't have a development kernel anymore, and would instead just develop in the stable tree. Genius! Now we have all the benefits of an unstable API / ABI combined with the benefits of flaky support... Go team!

    9. Re:Oddness in kernel release cycle by advocate_one · · Score: 2
      yup.. I'm pig sick of hardware not working after kernel updates. Going to Ubuntu Dapper from Breezy lost me DVD burning... I daren't "upgrade" to Edgy for fear of something else more vital breaking... and I've pinned my current kernel as well, as I'm sick of having to re-install nvidia and VmWare every security update...

      I really, really wish they'd go back to the "proper" even stable, odd development cycle. Distros had a chance then and could backport what they wanted from the development tree.

      --
      Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
    10. Re:Oddness in kernel release cycle by gmack · · Score: 2, Informative

      IDE-SCSI no longer works from 2.6.10 onwards at least up to 2.6.16

      IDE-SCSI never worked properly. I've had constant problems with it since I started CD burning on Linux. Thankfully it is now obsoleted by the new ATA drivers since the ATA devices just shows up on the system as a SCSI device. If you really need to have SCSI support for IDE devices I highly suggest trying the new drivers.

    11. Re:Oddness in kernel release cycle by iabervon · · Score: 2, Informative

      IDE-SCSI no longer works from 2.6.10 onwards at least up to 2.6.16

      It's ironic that you mention IDE-SCSI as not working. The latest excitement is that devices that used to be treated as IDE are now being treated as SCSI if you build the appropriate drivers, so people are finding that the drives they thought were "IDE" are actually "ATA", and on /dev/sda now. Not only is the functionality of treating "IDE" devices as "SCSI" still available, it doesn't require a special module, and it's becoming default. They're eventually going to ditch "IDE" entirely, because it's crufty old code that nobody really likes. Of course, with any luck, PATA controllers will be enumerated and the information put in sysfs along with master/slave, so you'll still be able to get /dev/hda out of udev for your PATA hard drive.

      As far as stability is concerned, I've had exactly one kernel problem using a kernel that has ~9 patches that aren't from mainline. And that problem (it would break a device sharing a legacy IRQ with an nvidia ethernet card on a system with MSI support if you don't use msi=disable) was fixed in 2.6.18.y and 2.6.19.1.

      The idea in the 2.4 days was that distros (and only distros) would fork off and maintain a release with hundreds of backported patches from the development series that won't be available in a stable vanilla kernel for several years. The idea now is that the latest 2.6.x should work for everybody. Backporting anything is a bad idea in general, and regressions should be fixed before a 2.6.x comes out, or shortly thereafter.

  2. Simple Q: will this run Win XP as a guest? by Anonymous Coward · · Score: 2, Insightful

    Cutting right to the chase here, if I have this new kernel, and a CPU that supports it (only the latest generation from Intel and AMD do), I should be able to install Windows XP as a guest OS and run it in a window on my Linux machine? That would be very cool and could really help the adoption of Linux. I know I can do something like this with VMWare right now, but if it's built in to the kernel that would be even better. And yes I would have to buy a new machine with one of these current-generation CPUs to be able to do that, but it's worth it to get that anyway.

    At the same time, we have Wine making great progress and able to run a whole bunch of useful Windows apps without even needing any virtualization, so Linux is soon going to assimilate everything!

    1. Re:Simple Q: will this run Win XP as a guest? by eno2001 · · Score: 5, Informative

      My experience so far...

      After playing around with paravirtualization with Xen for the past two+ years, I finally got the cash in August to buy a cheapo AMD dual-core 64-bit system (~$800 at Best Buy: an HP system with a 4200 and 2 gigs of DDR2 RAM). I've run both Xen and QEMU on it under 64-bit Gentoo Linux. The performance of Windows XP on Xen vs. QEMU is fairly close. I would have to say that it seems to me that where Xen suffers is disk I/O. Anything that's disk intensive seems to eat up the CPU. I suspect this wouldn't be the case on better hardware with a high performance SCSI/RAID system. That should, at least, make things a bit better anyway. But for the time being I'm sticking with Xen since it's just too easy to use. And I am especially interested in the live migration features. As long as you have centralized disk storage, you can move live VMs between physical hosts with less than a second of interruption (ie. your users will never notice). Keep in mind, I'm doing this all at home as I'd really like to collapse many of my machines into one or two boxes and keep everything else as simple X displays where GUIs are needed. I've currently got four VMs running on the box with two of them being fully virtualized (Windows XP SP2 for access DRMed crap and Redhat Linux 7 which still hosts some services I don't want to part with) and the other two being paravirtualized (Domain0 which is just the VM management environment and my Gentoo Asterisk "PBX"). PAravirtualized performance is damn amazing. I think if I used strictly paravirtualized OSes I could probably squeeze out 20 VMs from this guy with decent performance. I actually just added two more gigs to the system tonight, and if I assume 128 megs per virtual machine (I've allocated 512M to the Windows XP VM) I can get up to 32 VMs running simultaneously.

      As far as KVM goes, I've had a good deal of experience with QEMU and it KVM is similar, there are some limitations I hope they will overcome. (For what it's worth, the hardware based virtualization in Xen is also a modified QEMU process called qemu-dm) The main one being PCI device allocation. Xen allows you to partition your PCI devices and assign individual cards to specific VMs. I don't think QEMU does this, and I expect that KVM doesn't either.

      --
      -"...bad old ideas look confusingly fresh when they are packaged as technology" - Jaron Lanier (Digital Maoism on Edge.o
  3. Acronym overload by phoebe · · Score: 4, Insightful

    Couldn't they just try to use a different acronym, how about KbVM?

    1. Re:Acronym overload by PacketShaper · · Score: 2, Funny

      Let me get this straight... your solution to "acronym overload" is to *add* a character.

      It's opposite day again, isn't it?

    2. Re:Acronym overload by X0563511 · · Score: 4, Informative

      It's not really a problem when you have lots of letters in an acronym. It's more of a problem when you have at least three different things in the same industry with the same acronym.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    3. Re:Acronym overload by dunstan · · Score: 2, Informative

      Strictly it's not an acronym unless it is commonly pronounced as a word.

      NATO is an acronym, KVM isn't.

      --
      The last scintilla of doubt just rode out of town
  4. Apples to Oranges by X0563511 · · Score: 3, Interesting

    So... we can compare Xen and KVM to Qemu now? The next time nVidia updates their drivers we should benchmark them against MESA OpenGL...

    Xen amd KVM utilize (require, if I remember correctly) support for virtualization-specific processor instructions. Qemu does not.

    --
    For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    1. Re:Apples to Oranges by repvik · · Score: 4, Informative

      Xen requires a P6 or better at this time (available for ~5 years). They hope to add support to ARM and PPC at a later time. KVM, OTOH, depends on brand-spanking new CPUs with virtualization instructions. QEmu just requires some CPU-thingy.

    2. Re:Apples to Oranges by overbored · · Score: 2, Informative

      rtfa. not qemu, but qemu accelerator.

      http://fabrice.bellard.free.fr/qemu/qemu-accel.htm l

  5. Mod me down! by EvanED · · Score: 2, Insightful

    Okay, I read the charts wrong because I'm apparently an idiot. Native times are the first bar in each graph.

    Though VMWare would still have been nice...

    1. Re:Mod me down! by Bert64 · · Score: 3, Interesting

      I heard that the vmware license specifically excludes rights to benchmark it, or at least to publish those benchmarks.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    2. Re:Mod me down! by WNight · · Score: 3, Informative

      There's no valid way to enforce post-sale contracts, EULAs aren't valid.

  6. from about a month back ... by Gopal.V · · Score: 3, Informative

    Does the dec 12th story make this one a dupe or was just early warning ?

  7. Call me when... by hondamankev · · Score: 2, Insightful

    they can virtualize XP under linux, can have hardware graphics acceleration, and full dx9+ support.

    1. Re:Call me when... by nacturation · · Score: 5, Funny

      Why was this modded as troll? He didn't provide a phone number.
      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
    2. Re:Call me when... by rbanffy · · Score: 2, Insightful

      He probably wants to run Linux for work and still be able to run GameOS in his/her spare time.

  8. VMWare performs better - heres why by Anonymous Coward · · Score: 3, Interesting

    VMWare will perform *much* better on any workload with heavy process thrashing, especially forking (such as the lame compilation or anything that does an autoconf configure and make). This is due to the Intel and AMD virtualization extensions not going far enough to handle unix style OS workloads well (hardware assisted MMU and/or TLB virtualization support is lacking). Context switching takes a heavy toll. Windows doesn't do it so much so it won't suffer as much.

    Also, only AMD's SVM supports full-virtualization of x86_64. Intel doesn't implement that.

    VMWare works by dynamically scanning/translating native x86 and x86_64 code for protected instructions before executing it so it does not need the hardware extensions to work. That also means vmware performs better by not using the new cpu features.

  9. Re:kqemu? by popeydotcom · · Score: 3, Informative

    A I understand it kvm makes use of the VT instructions present in modern CPUs to make QEMU nice and zippy. Older CPUs don't have those instructions so they would still "need" kqemu to make QEMU go full speed.

  10. paravirt KVM on the way by ens0niq · · Score: 5, Informative

    > [T]he Linux 2.6.20 kernel will include a full virtualization (not para-virtualization) solution. Yep. But Molnár Ingo (yes, the hungarian kernel hacker) Ingo Molnar announced a new patch introducing paravirtualization support for KVM.

  11. Re:KVM name is misleading by Jessta · · Score: 4, Interesting

    3 ? 00:00:00 ksoftirqd/0
            5 ? 00:00:00 khelper
            6 ? 00:00:00 kthread
            8 ? 00:00:00 kblockd/0
            9 ? 00:00:00 kacpid
        102 ? 00:00:00 kseriod
        105 ? 00:00:00 khubd
        176 ? 00:00:00 kswapd0
        784 ? 00:00:00 kpsmoused
        814 ? 00:00:00 khpsbpkt
        818 ? 00:00:00 knodemgrd_0

    seems to fit in with the naming convention of all the kernel related processes.

    --
    ...and that is all I have to say about that.
    http://jessta.id.au
  12. Comment removed by account_deleted · · Score: 3, Interesting

    Comment removed based on user account deletion

  13. KVM, QEMU, and Qemudo by this+great+guy · · Score: 3, Interesting

    This is likely to boost QEMU's popularity, the virtualizer accelerated by KVM. An interesting coïncidence is that I released the very first version of Qemudo on Jan 4th while being totally unaware of the existence of KVM. Then three days later the KVM project released their first version too, and I read about it on this kerneltrap article.

    I am thrilled at the idea of using KVM + QEMU + Qemudo together. To put it simply, and to quote my README, Qemudo is "a Web interface to QEMU offering a way for users to access and control multiple virtual machines running on one or more remote physical machines." Qemudo makes use of two important features in QEMU: native support of VNC, and copy-on-write disk images for instantaneous VM creation. If you are interested go check out the website (and download the tarball which contains more detailled doc). </shameless-plug>

  14. Mod... Parent... Up by Builder · · Score: 4, Insightful

    I feel your pain, deeply! A stable API / ABI is absolutely vital for ISV support and the new development model means that you can only get this if you're prepared to pay a large amount of money for your distribution. I don't want to have to pay $1500 for RHEL, but that's the only way I can run an Oracle dev server on a quad box with 16GB ram. The amusing thing is that RHEL is the ONLY piece of software I have to pay for on that machine - our site license gives us free licenses for dev and DR :)

    Anyone other than SLES or RHEL is a second class Linux citizen today. Without vendor support you can forget about trying to run a stable Linux kernel anymore. Bring back the old odd / even split!

    1. Re:Mod... Parent... Up by Anonymous Coward · · Score: 2, Interesting

      Just use Solaris. You get to run all the Lunix source and binaries and all the Solaris ones too, the ABI is stable over many years and it has many more useful feaures than Lunix. Also the virtualisation stuff has been in Solaris a lot longer. Oh, and it handles SMP and NUMA better, and it has ZFS.

    2. Re:Mod... Parent... Up by Kjella · · Score: 3, Informative

      Anyone other than SLES or RHEL is a second class Linux citizen today. Without vendor support you can forget about trying to run a stable Linux kernel anymore. Bring back the old odd / even split!

      Well, first off there's CentOS if you don't need the support. Secondly, while the kernel guys are happy hacking away at 2.6.x, there are other distributions like Debian and Ubuntu LTS which will support a stable API/ABI for several years.

      Yes, now 2.6 keeps breaking but does anyone remember the bad old days when distros were backporting hundreds of patches from 2.5 to 2.4? What the distros are shipping now is closer to a vanilla kernel, for better and for worse. They pick one version, stay with it and stabilize it. That'll what SLES, RHEL and all the other distros do.

      --
      Live today, because you never know what tomorrow brings
    3. Re:Mod... Parent... Up by thue · · Score: 2, Informative

      If people really wanted the old stable versions then they would be using 2.6.16.y, which is still being maintained using the same old stable policies as 2.4

      http://en.wikipedia.org/wiki/Linux_kernel#Versions

      The fact that most people don't seem to run 2.6.16 seems to indicate that people are happy to forgo some stability in exchange for having the new features in the latest 2.6.x kernel available now.

    4. Re:Mod... Parent... Up by TheLink · · Score: 2, Funny

      Shush. Let him keep paying for it.

      Then you keep getting free all that work he's paying for :).

      --
    5. Re:Mod... Parent... Up by gmack · · Score: 4, Insightful

      The patches that each comes up with the backport specific security features will be different, if only slightly. The patches that each comes up with to backport a highly requested feature will be slightly different. Over time these slight differences will add up to become real differences between the distros.

      Distros should NEVER backport features. That's the whole point of the new development system. If you want a stable kernel stay with the point release your on and just add the security/stabillity patches. If you want new features use a newer kernel.

      That right there was the exact problem with the old even/odd split. The time between the two ended up being so great that people/vendors would start backporting features and destabilizing the "stable series" kernel.

      Distros forking the kernel has always been an annoyance so it's nothing new either. I've been playing the "wich distro has the drivers I need" game since 2.0.x and it got to the point where I just never use distro kernels anymore I just compile my own and add that to the installer.

  15. benchmarks by Jacek+Poplawski · · Score: 2, Interesting

    Benchmarks in the article shows that it is slower than XEN.
    Do you know why?
    Xen requires some support from virtualized operating system, what about KVM?

  16. Re:kqemu? by popeydotcom · · Score: 2, Insightful

    On Linux it's easy to tell if you have VT..

    egrep '^flags.*(vmx|svm)' /proc/cpuinfo

    if that returns anything you have VT, if it doesn't, you don't.

    Here's what I get on my desktop (Intel Core 2 Duo).

    alan@wopr:~$ egrep '^flags.*(vmx|svm)' /proc/cpuinfo
    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 lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
    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 lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm

    There is a list on the Wikipedia page (http://en.wikipedia.org/wiki/X86_virtualization) of supported chips.

  17. Poor scientific practice by piranha(jpl) · · Score: 3, Informative

    Why do they document the model of CD-ROM drive they used, but not the configuration of each emulation/simulation environment? I was shocked by the LAME compile times--and forced to wonder and guess what the filesystem configuration was. Is the filesystem located in an image file on the "host" computer's filesystem? Wouldn't it be interesting to try using a comparible medium across all benchmarks (shared NFS server, or low-level access to the same block device)?

    Not enough data (CPU time vs. real time, etc.), not enough benchmarks (different filesystem media, etc.), poor documentation (configuration, anyone?), on what doesn't even amount to an official release. Correct me if I'm wrong.

  18. Yes, we drop support for obsolete crap. by r00t · · Score: 2, Informative

    Does anybody still have an IDE tape drive that hasn't died of old age? Is is actually big enough to do a backup?

    The IDE-SCSI abomination is a foul and evil hack that should have been removed many years ago. Back in the early days, it was needed for CD burning. Linux no longer requires IDE-SCSI. If the cdrecord author told you otherwise... well, he was lying because he damn well knows this isn't true.

    Your "fundamental APIs" are not APIs at all. They are kernel-internal details. Screwing around with unmaintained out-of-tree drivers is really not supported, and will never be supported. Go use Windows Vista if you want that... no, wait, Microsoft breaks stuff too! I guess you'll have to live in a fantasy world.

  19. quit your FUD, it's getting old by r00t · · Score: 4, Insightful

    See unistd.h for the stable API. Combined with the SVR4 ELF specification, that gives you a stable ABI. It's been a damn long time since Linux lost an old system call. Old a.out binaries from a dozen years ago still run fine. BTW, outside the kernel even glibc is doing well; the biggest problem has been the C++ library, mainly because the C++ committee kept adding features.

    I think your real complaint is that out-of-tree drivers are unsupported. Tough luck. This will never change. I suggest that you get your drivers into the tree, where other people can review them for bugs (afraid of that? embarrased?) and update them as the rest of the kernel changes.

  20. Re:Multicomputing by charlesnw · · Score: 2, Insightful
    If there was a nice piece of software that could let me run all of my nodes as VM servers and let users dynamically provision VMs and boot specified images as cluster nodes with different specs for development and production runs, that would be great. Anyone know of such software?
    Yes. Its called vmware server the paid version :)
    --
    Charles Wyble System Engineer