Slashdot Mirror


Linux 3.0 Will Have Full Xen Support

GPLHost-Thomas writes "The very last components that were needed to run Xen as a dom0 have finally reached kernel.org. The Xen block backend was one major feature missing from 2.6.39 dom0 support, and it's now included. Posts on the Xen blog, at Oracle and at Citrix celebrate this achievement."

35 of 171 comments (clear)

  1. Re:err.. by Tinctorius · · Score: 2

    Not now.

  2. Re:I hopefully speak for lots of people when I say by ustolemyname · · Score: 2

    +5 flamebait/informative.

  3. Re:err.. by GPLHost-Thomas · · Score: 2

    Correct, it's a typo, sorry. It is NOW included.

  4. Re:Vanilla kernel on EC2 by pasikarkkainen · · Score: 5, Informative

    Actually you have been able to run newer kernel on EC2 for a long time! Xen domU (guest VM) support has been in upstream Linux kernel since version 2.6.24. Now upcoming Linux kernel 3.0 adds Xen dom0 support, which is the *host* support, ie. Linux kernel 3.0 can run on Xen hypervisor (xen.gz) as the "management console", providing various backends (virtual networks, virtual disks) allowing you to launch Xen VMs.

  5. Now all I need... by Suiggy · · Score: 3, Funny

    ... is 16 cores and 32 GB of RAM, and I can recompile the Kernel on Linux, encode an H.264 video on OS X, serve files via Apache HTTPD from OpenBSD, and watch streaming porn videos on Windows all simultaneously on the same machine!

    1. Re:Now all I need... by glwtta · · Score: 3, Informative

      16 cores and 32 GB of RAM

      That's, uh, not exactly all that out there, these days.

      --
      sic transit gloria mundi
    2. Re:Now all I need... by Rockoon · · Score: 2

      CPU loadout prices and performance metrics for various setups

      The 12-core X56xx's solutions arent touching the 48-core solutions from AMD as of yet in parallel workloads. The Opteron 6168 solution is cheaper with more performance and the Opteron 6174 route is more expensive but significantly faster over-all, than a pair of X5690 priced at $3300+

      I am simply amazed that Intel has not taken its older designs for larger process sizes and simply packed on more cores during a process reduction in order to break AMD's knee's in this market. Instead they are only using even more transistors per core and not upping the core count. That strategy is OK for desktop chips but the virtualization crowd that is running dozens of servers on one box are better off with more cores.

      Not that AMD has produced anything stellar recently (tho Bobcat is certainly a formidable Atom competitor while Bulldozer is rumored to be postponed due to serious performance issues with the current stepping) but Intel still doesnt offer any competition in the big virtualization arena vs AMD's several-year-old solutions.

      --
      "His name was James Damore."
  6. Meanwhile by TheRaven64 · · Score: 4, Interesting

    Xen Dom0 support has been supported in released versions of NetBSD and Solaris for something like 4 years, while the VMWare lobby on the LKML was requiring the entire paravirtualisation subsystem to be rewritten before they'd accept patches, and Red Hat decided to push KVM as a Xen replacement, in spite of them having very different capabilities.

    --
    I am TheRaven on Soylent News
    1. Re:Meanwhile by zefrer · · Score: 5, Informative

      Just had to reply to this.. Sun forked Xen 3.1 something like 4 years ago, yes. That same fork, Xen version 3.1 is what is still being used today in Solaris and Sun had previously (pre-buyout) said they would not merge to any newer versions of xen.

      So while Solaris can claim Xen Dom0 support it is no where near the capabilities of current Xen 4.0 and with no plans to update you're stuck on 3.1 with support only coming from, now, Oracle. Yeah, awesome.

    2. Re:Meanwhile by diegocg · · Score: 4, Informative

      'VMWare lobby', WTF? The real problem were things like this and this:

      The fact is (and this is a _fact_): Xen is a total mess from a development
      standpoint. I talked about this in private with Jeremy. Xen pollutes the
      architecture code in ways that NO OTHER subsystem does. And I have never
      EVER seen the Xen developers really acknowledge that and try to fix it.

      Thomas pointed to patches that add _explicitly_ Xen-related special cases
      that aren't even trying to make sense. See the local apic thing.

      So quite frankly, I wish some of the Xen people looked themselves in the
      mirror, and then asked themselves "would _I_ merge something ugly like
      that, if it was filling my subsystem with totally unrelated hacks for some
      other crap"?

      Seriously.

      If it was just the local APIC, fine. But it may be just the local APIC
      code this time around, next time it will be something else. It's been TLB,
      it's been entry_*.S, it's been all over. Some of them are performance
      issues.

      I dunno. I just do know that I pointed out the statistics for how
      mindlessly incestuous the Xen patches have historically been to Jeremy. He
      admitted it. I've not seen _anybody_ say that things will improve.

      Xen has been painful. If you give maintainers pain, don't expect them to
      love you or respect you.

      So I would really suggest that Xen people should look at _why_ they are
      giving maintainers so much pain.

                      Linus

      BTW, I have absolutely no doubt that NetBSD and Solaris merged Xen faster than anyone else.

  7. Re:This is the reason why... by judhaz · · Score: 2

    No normal user would ever read /.

  8. FreeBSD Xen support by simoncpu+was+here · · Score: 2

    Dear FreeBSD,

    When will you ever have a Xen dom0 support?

    Thanks,

    Charlie Root
    FreeBSD Fanboi

    1. Re:FreeBSD Xen support by TheRaven64 · · Score: 2

      FreeBSD had dom0 support a few years ago, but it bit-rotted. If you want it, then I can point you at someone who is taking donations to finance the work. Or you can run NetBSD or Solaris in dom0 and FreeBSD in your domUs.

      --
      I am TheRaven on Soylent News
  9. Re:This is the reason why... by Anonymous Coward · · Score: 2, Interesting

    Nice try, except dom0 (Domain zero) is Xen terminology, not something linux specific.

    Products such as this aren't going to be used by mainstream mom&pop users, Xen will likely not be available in boxed set at your local computerstore or gameshop. The people using this will likely always come from an IT related background.

    And as for windows:
    - If you run Xen with Windows, the same terminology applies (except it would be run as dom1+ since Windows doesnt support dom0 to my knowledge)
    - If you open up a MCSE manual for windows you'll find a hundred other things that sound just as complicated to a layman as dom0

  10. Re:KVM vs XEN by GPLHost-Thomas · · Score: 2

    Well, the issue is that I couldn't see the submit buttons at the bottom when doing my submission. They were display too much at the bottom of the screen, and I could see only the few top pixels of them. I wanted to click on "Continue editing", but unlucky for me, it was posted without giving me a chance to rectify. So I don't think it's really my fault here... Maybe someone at /. wants to test the submission display so that it's better on Firef ^W Iceweasel 4.0.1 (my own backport running on Squeeze)...

  11. Re:KVM vs XEN by pasikarkkainen · · Score: 4, Informative

    Xen has features that KVM doesn't have (by design). For example Xen "stubdomains" and "driver domains", full memory address space separation between domains, etc.. and of course it's good to have multiple opensource virtualization platforms, competition is a good thing!

  12. Re:KVM vs XEN by GPLHost-Thomas · · Score: 3, Informative

    This why Xen PDF might explain it well. Under Xen, guests are running inside the host operating system. In Xen, the hypervisor starts a special Linux kernel (the dom0) that will only take care of drivers for the guests. The design is really different, and has different features. For example, in Xen, you can have your dom0 to run on 2 cores, leaving the rest for the guests (I'm not sure that is possible in KVM), and if you want to avoid any possible CPU starvation, you can even have the guests to not use the cores that the dom0 is using. The CPU scheduler is also very different (and there's not only one available...).

  13. Re:This is the reason why... by Superken7 · · Score: 3, Informative

    I'm not sure if you are trolling on purpose, or if you don't understand what this news is all about. But I'll bite.

    You see, linux runs on almost any kind of hardware: from embedded systems on toasters to phones, desktop computers, laptops, to big servers. Even most supercomputers to date are running Linux. There is a _lot_ of different users that would use Linux in many different ways.

    Xen is a technology that virtualizes machines, mainly intended for the data center and cloud computing environments.

    This is NOT intended for users in any way. Your mom does NOT have to know that Xen even exists, just like windows users don't need to know what IIS or Apache is in order to browse the web.

    Would you also say that windows and OSX is "is way too complicated for people" because you read slashdot news about some geeky kernel details about windows/OSX ?
    Surely "no user should need to know, or care about this sort of thing.".

    They don't. So do you about Xen. I'm not sure why someone like you is reading and posting on /., because this is usually "news for nerds", as the site indicates. :)

    As many slashdotters would say about your reasoning behind your post: "You are doing it wrong." ;)

  14. Re:KVM vs XEN by pasikarkkainen · · Score: 3, Informative

    Actually the design is pretty different. Take a look at these slides: http://www.slideshare.net/xen_com_mgr/why-xen-slides . That should explain the differences. Xen is also multi-OS, ie. you can use also BSD/Solaris in addition to Linux as a Xen host, while KVM is Linux-only as host.

  15. Re:Will it cook me dinner? by pasikarkkainen · · Score: 2

    Remember Xen hypervisor is opensource (GPL), just like Linux kernel, so all the Oracle and Citrix code in the hypervisor and in the kernel is opensource. Citrix uses XenServer as a platform to run their other products, and obviously Xen is the best platform to run those Citrix "windows products". Novell ships Xen in Suse Linux Enterprise (SLES) 10 and 11. Debian ships Xen in their current version. I heard Ubuntu is going to add Xen back now when the kernel components are included in upstream Linux. Fedora ships Xen aswell. Not to mention majority of the cloud (Amazon EC2, Rackspace, etc) are running Xen.

  16. Re:KVM vs XEN by pasikarkkainen · · Score: 5, Informative

    Xen is a secure baremetal hypervisor (xen.gz), around 2 MB in size, and it's the first thing that boots on your computer from GRUB. After Xen hypervisor has started it boots the "management console" VM, called "Xen dom0", which is most often Linux, but it could also be BSD or Solaris. Upstream Linux kernel v3.0 can run as Xen dom0 without additional patches. Xen dom0 has some special privileges, like direct access to hardware, so you can run device drivers in dom0 (=use native Linux kernel device drivers for disk/net etc), and dom0 then provides virtual networks and virtual disks for other VMs through Xen hypervisor. Xen also has the concept of "driver domains", where you can dedicate a piece of hardware to some VM (with Xen PCI passthru), and run the driver for the hardware in the VM, instead of dom0, adding further separation and security to the system. Xen "Driver domain" VMs can provide virtual network and virtual disk backends for other VMs. KVM on the other hand is a loadable module for Linux kernel, which turns Linux kernel into a hypervisor. The difference is that in KVM all the processes (sshd, apache, etc) running on the host Linux and the VMs share the same memory address space. So KVM has less separation between the host and the VMs, by design. VMs in KVM are processes on the host Linux, not "true" separated VMs.

  17. Largely irrelevant though by buchanmilne · · Score: 3, Insightful

    ... as most users don't use vanilla upstream kernels. And, most distributors / distros have a supported release which provides Xen Dom0 support (including Red Hat).

  18. Re:This is the reason why... by Lemming+Mark · · Score: 3, Informative

    It's partly historical and partly because Xen is structured differently to lots of other virtualisation systems.

    "Domain" is to "virtual machine" as "process" is to "program". i.e. it's a running instance of a virtual machine. If you kill a VM and restart it, it's the same VM but a different domain. In practice VM and domain are blurred a bit when people talk, though.

    Domain 0 is a bit like the host OS, but for technical reasons it's not exactly.

  19. Re:I hopefully speak for lots of people when I say by martyros · · Score: 5, Informative

    What is Xen? Xen is a virtualization project that is run by four of the top five major cloud providers (including Amazon, Rackspace, &c); a commercial version written by Citrix run by thousands of sites worldwide, including large companies like Tesco, SAP, &c. It's also the approved way of running Oracle databases in a virtual machine.

    What does that have to do with Linux? The Xen project is focused on virtualization. But Xen still needs to run on systems with all manner of devices. There are several ways they could have handled this. One is to try to put drivers for all of the devices in Xen. This would require a huge amount of work, mostly copying new device drivers and device fixes from Linux and porting them over to Xen. It would be a colossal waste of time: they would be duplicating effort of what Linux already does well, instead of doing what they want to do -- work on virtualization.

    So what they do instead is run Xen as the hypervisor, but leverage the device drivers in Linux. They do this by creating a special VM, called "domain 0" or "dom0", which is booted first after Xen boots, that has drivers to control all of the devices. This domain is a version of Linux that is designed to be able to work with Xen to control and drive devices, while allowing Xen to control memory, CPU, and interrupts (the key hardware required to do virtualization).

    Xen has been out for years. Why is this just being announced? The Xen project started out of a University research project. As is typical, they were trying to answer the question "what is possible?", and as a result, felt free to completely rip out and rewrite large sections of Linux code. This code was not upstream-able -- changes were made that were (rightly) not acceptable to the Kernel community.

    Since that time, the Xen community has maintained branches of Linux with these intrusive, non-upstreamable patches, and used these branches as domain 0. At the same time, they have worked to try to get support for Linux-as-domain-0 into the mainline tree. This has been a long process, and something that has been a sore point for users of Xen for some time.

    But as of Linux 3.0, all of the functionality required to use the mainline kernel tree as a basic dom0 with Xen is in. This means that if you install Xen, you'll be able to use the same kernel you booted with natively as the dom0 for Xen. It means that distributions won't have to maintain two separate kernels, one for booting bare metal, and one for booting on Xen. And it means not having to maintain the xen-linux fork, which has been a lot of painful work for the Xen community.

    --

    TCP: Why the Internet is full of SYN.

  20. Re:KVM vs XEN by martyros · · Score: 3, Informative

    There doesn't have to be a battle -- there's room in the OSS world for two technologies. Xen and KVM are different technologies. For most desktop users, KVM is probably the best option; but on big servers, linux running KVM has to mix scheduling between VMs and processes. Since Xen runs VMs exclusively, it can focus only on algorithms that work well for VMs.

    --

    TCP: Why the Internet is full of SYN.

  21. Re:I hopefully speak for lots of people when I say by Kjella · · Score: 3

    WTF does this not have +5 Informative?

    It does now, but slashdot seems really, really mod point starved as of late. Some discussions there looks like there's almost no one to mod, and when they do get mod points it's 5 now compared to 15 before.

    --
    Live today, because you never know what tomorrow brings
  22. Re:KVM vs XEN by TheRaven64 · · Score: 5, Informative

    Not sure which Xen book you read, but the grandparent makes a lot of errors and I'd be surprised if a book was that inaccurate. Mine is slightly out of date, but at least was accurate at the time of printing (technical review was done by the original Xen developer).

    Let's start at the end. KVM VMs and userspace Linux applications do not share the same address space. This isn't even true if you remove KVM - userspace processes have isolated address spaces. KVM requires the CPU have virtualisation extensions, which means (among other things) nested page tables. This means that there is hardware-enforced separation between the pages. The guest OS sees page tables that map from virtual to pseudophysical address space, but thinks that they map from virtual to physical. The host (Linux) sets the mapping from these pseudophysical pages to real memory pages and the CPU enforces this mapping. Xen uses exactly the same mechanism in HVM mode (it uses some other tricks in paravirtual mode).

    The driver domains are correct, but it's worth noting that Xen will use VT-d or equivalent to protect against malicious use. Linux can't give a userspace program direct access to the disk controller, because if it did then a rogue DMA command could compromise the kernel. Xen will use the IOMMU to ensure that each peripheral may only issue DMAs to memory owned by the driver domain. The Solaris VM that you have accessing your block device and exporting virtual disks from ZVOLs, for example, can trample its own address space with rogue DMAs, but it can't touch any memory in other VMs.

    This means that Xen (in theory) has a smaller attack profile than KVM. Xen is basically a microkernel, and it enforces low privilege on the services (OS instances) that provide drivers and the management console. With KVM, the entire kernel runs in privileged mode. It's fairly common these days for the management console domain to have either no network access, or highly-restricted access, and be separated from the driver domains. If there is a flaw in the network stack in Linux and an attacker compromises it, then with KVM they now have access to all of your VMs. With Xen, they control that driver domain, and they can inject packets into the other VMs, but they are no more able to compromise them than they would be if they controlled the router one hop away.

    KVM recently gained support or live migration (this has been stable in Xen for a long time - they were doing demos of live-migrating a Quake 2 server with clients connected since the early 2000s), but it doesn't have any of the high-availability stuff that Xen 4 includes. This allows you to do things like run two instances of the same VM on different machines and transparently fail-over when one dies.

    --
    I am TheRaven on Soylent News
  23. Re:KVM vs XEN by TheRaven64 · · Score: 3, Insightful

    A lot of the Xen developers use KVM. You can run Xen and PV kernels inside KVM, which (apparently) is great for debugging. They're very different tools though. The problem is companies like Red Hat that spread a lot of FUD about Xen and tell everyone to use KVM instead, which makes about as much sense as telling them to use bash instead of vim.

    --
    I am TheRaven on Soylent News
  24. Re:I hopefully speak for lots of people when I say by DarkVader · · Score: 2

    Strange...

    I seem to get mod points 15 at a time, about once a month.

  25. Why Citrix bought XenSource by martyros · · Score: 2

    Here's why Citrix bought XenSource.

    There's been a developing market for desktop virtualization (VDI) -- meaning not "running a VM inside my desktop", but for corporations to run "desktops" as VMs inside of servers and export them to think clients on people's desks.

    Citrix has a ton of capabilities in this area. They have decades of experience with handling remote display technologies, dealing with users, dealing with disk images, and so on. So they were in a perfect position to capitalize on this new trend with their existing technology and expertise.

    However, to really run desktop software, you need enterprise-grade virtual machine software. Citrix didn't have any. They could recommend people run Hyper-V, but it's a new technology and by most measures not really as good as other solutions. They could recommend that people buy VMWare. However, VMWare have their own VDI solution. If you were an IT exec, deciding what to deploy for your VDI solution, would you run Citrix's VDI controller on VMWare's hypervisor, or would you just run VMWare's VDI controller on VMWare's hypervisor? Odds are that you'd favor buying from one vendor; it's likely that the software will work better together, and in any case you'll never end up in a situation where Citrix says it's VMWare's problem and VMWare says it's Citrix's problem, and you're stuck in the middle.

    Not having their own virtualization solution would be a big limiting factor for Citrix's success in the desktop market. So, they bought XenSource. Now they can offer XenDesktop and XenServer together, offering a complete stack of software from top to bottom. That's the synergy they were looking for.

    But of course, that buying that stack as a whole only makes sense if XenServer is actually enterprise-grade virtualization -- so they're still keen for XenServer to be a viable product in its own right.

    --

    TCP: Why the Internet is full of SYN.

  26. Re:I hopefully speak for lots of people when I say by martyros · · Score: 3, Interesting

    But doesn't that just make Xen the OS with linux becoming an application? I mean, it is the OS's job to manage memory and devices, and to allocate CPU time.

    No, Xen is a hypervisor. A process expects a *lot* more from an operating system than an OS expects from a hypervisor. VMs expect raw hardware and know they have to manage most things (like setting up memory, doing filesystems, and so on) themselves. Processes expect an operating system set up memory mapping for them, give them filesystems (not just raw disks), IP addresses and sockets and TCP (not just raw packets), and so on.

    In the KVM case, Linux is an operating system to normal processes, but a hypervisor to VMs. Linux gives memory and time to the guest OS, and the guest OS gives memory and time (along with filesystems, TCP, &c) to guest processes. So in that way Xen and KVM (i.e., Linux-as-hypervisor) are the same.

    The main difference is that Xen is only a hypervisor, whereas with KVM, Linux tries to be both a hypervisor and an operating system. That has a number of practical implications. Xen has been widely deployed and tested as an enterprise-class hypervisor. I'm not aware of any large-scale enterprise deployments of KVM, so it remains to be seen whether Linux can successfully be both an enterprise-class hypervisor and an operating system at the same time.

    --

    TCP: Why the Internet is full of SYN.

  27. Re:I hopefully speak for lots of people when I say by drinkypoo · · Score: 2

    Does this get me any closer to the dream of simultaneously running multiple operating systems which can each output 3d graphics using my GPU if I just switch between them like VTs?

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  28. Re:I hopefully speak for lots of people when I say by digsbo · · Score: 2

    I noticed recently that some of my posts have been modded down immediately as "overrated". I'm not talking about posts which are potentially controversial, either. I don't know if it's widespread, but I get the feeling there are a number of kids with time on their hands downmodding anything they feel like. Time to spend more effort metamoderating, I suppose. But I'm busy, unlike 20-somethings living in mom's basement, so...tehy win the interwebs?

  29. Re:I hopefully speak for lots of people when I say by Enleth · · Score: 2

    AFAIK, on a desktop with two discrete graphics cards, you should be able to run Windows and Linux as guests at the same time, each using one card. I'm not sure about disk access, you might want to add a discrete PCI-E SATA controller for one of the systems to avoid any screwups caused by Windows doing something nasty, but other than that, this seems to be perfectly viable. A recent Sandy Bridge-based Core i7, with 8GB of memory on a good P67-based motherboard should run such a software stack with native performance of an SB i5 (roughly half the cache and threads of an i7 available most of the time for each guest) with 4GB of memory (if split evenly), which is more than adequate for everyday use.

    --
    This is Slashdot. Common sense is futile. You will be modded down.
  30. Re:I hopefully speak for lots of people when I say by martyros · · Score: 2

    The xen.org project has mainly been focusing on server-style virtualization, without desktop graphics (although graphics pass-through is obviously a priority for the Intel engineers).

    What you describe really needs not just a single piece of software, but the full configuration and integration with a distribution. If you're not opposed to using software that is partially closed-source but free-as-in-beer, you could try XenClient. It's designed to run on laptops, and specifically tweaked to pass the GPU through to one VM. But there's no reason it couldn't run on a desktop with the right hardware.

    --

    TCP: Why the Internet is full of SYN.