Linux apps run directly on Windows with virtualization!

Microsoft has done remarkable things with virtualization — unbelievable, some say.

One outstanding achievement is the way the Hyper-V architects managed to completely collapse the guest operating system layer directly into the hypervisor.  Take a look at this diagram from a Microsoft Virtualization competitive brochure:

[Yes, it’s that same brochure again.]

There are several key differences between Microsoft and VMware hypervisor architectures.  While the hardware and applications layers are pretty straightforward, applications don’t run directly on hardware.  As you are about to see, these two platforms take very different approaches when it comes to virtualizing workloads.

The VMware vSphere solution is to use a thin, high-performance virtualization layer that enables a single physical system to simultaneously host multiple virtual machines.  Each of these virtual machines executes isolated instances of traditional guest operating systems — Windows, Linux, Solaris, Netware, etc.

Due to apparent technological advancements in Hyper-V, it is now possible to run applications of all kinds directly on that integrated Windows OS/hypervisor layer without the need for a guest operating system at all.  This allows Microsoft to omit an entire layer from their virtualization architecture.

I’m sure you have seen various announcements about the exceptional support that Hyper-V has for Linux workloads.  Without a guest operating system layer, one must logically conclude that Linux applications are actually running on the Windows/Hyper-V hypervisor integration directly.  Spectacular!

I thought I’d test this technological breakthrough in the lab myself by running Postfix, a very popular Linux SMTP mail server, on Windows Server 2008 R2 with Hyper-V.  According to the diagram above, Postfix is classified as an application — the third layer.

Now, in order to install Postfix, I have to interact with the second layer in the stack, which is the “Microsoft Operating System w/Virtualization.”  Since I’m an RHCE, I decided to use a Red Hat Enterprise Linux package of Postfix, but we can all agree that SUSE Linux Enterprise Server 11 would work equally well.  However, I would not recommend using Ubuntu packages since that distribution is not supported by Hyper-V.  Another side benefit to this technique is the fact that Windows has great mouse support.

Just as one would do on a legacy Linux system, I opened a trusty command shell and installed the package like so:

This is the first step to getting Postfix installed and running.  I do have to admit that it took a few additional troubleshooting steps in my case — most certainly unique to my environment, so I will spare the details.

In order to complete the Postfix implementation, you’ll need to edit several configuration files.  Do not use Notepad for this, as it does not understand the peculiar format of these text files:

One would think that the virtualization layer could also dynamically accommodate for UNIX line formatting, but that evidently was not part of the design.  Fortunately, this is a very minor issue since WordPad can be used without problem:

Once you have the basic configuration in place, restart the service and validate — telnet to port 25 and send a test email.

There you have it, amazing Hyper-V virtualization — same capabilities as VMware vSphere with 25 percent fewer layers!

Tags: , , , ,

20 comments

  1. daniel’s avatar

    WOW! This is great, i’ve ranted on about abstraction in my recent blog post….this seems to be what VMware want to acheive with Spring so maybe they already know something about Hyper-V that we are just discovering. I also think this is maybe how the Microsoft Azure works.

    One other thing…is this feature within the current Hyper-V or a beta release? Also do you have MS’s equivilant for live migration?

    So cool i may need to play with this one….

    1. Eric Gray’s avatar

      Daniel, you might be right — I think this is how Windows Azure works.

      As far as I know this capability is not dependent on a particular version of Hyper-V, it became available when the anti-VMware competitive brochure was published on the Microsoft Virtualization website.

    2. omnimod’s avatar

      That’s sound great! I think that in next version of Hyper-V, they’ll combine OS and application level, to be a bit more lower.

      1. Eric Gray’s avatar

        You might be right. Imagine… two layers!

      2. Jason Boche’s avatar

        This is really funny and I love your sense of humor! Let’s get together and go bowling some night.

        1. Eric Gray’s avatar

          Thanks, Jason. Today would be a good day to go bowling since there is no power on the VMware Palo Alto campus. Lemme know.

        2. Sharninder’s avatar

          Wow .. this is really neat. I’m sure with the next release of Hyper-V, Microsoft would start selling a postfix based operating system. Take the DVD and install postfix directly on the hardware. How cool would that be 🙂

          1. Eric Gray’s avatar

            Awesome! One layer. Beat that, VMware!

          2. Collin C. MacMillan’s avatar

            I noticed that the Hyper-V version of Notepad is much improved over the one I have. Every time I try to edit my Linux configuration files in Notepad, I get a ton of crazy “square-looking” characters where the line breaks should be, but no line breaks 🙁 your version doesn’t have that problem. Why does Linux make it so hard to edit configuration scripts???

            In any case, I’m looking forward to dumping SLES in favour of Hyper-V now that you can run Postfix along side of Exchange! Can you imagine it? All the goodness of Exchange’s MDA with the flexibility of Postfix’s MTA! Now my sales teams can send-out beau-coup e-mail blasts without clogging-up the Exchange queue and otherwise making my life miserable…

            I only have one question: How did you deal with IPv6 for Postfix in Hyper-V? We market to higher-ed and I want to e-mail blast over the 6-bone…

            1. Eric Gray’s avatar

              IPv6 is not a problem, since Windows and Hyper-V are already RFC-compliant.

              The trick is to grab a recent 2.6 kernel module and load it as usual:

              # modprobe ipv6

              The rest is straightforward, but remember to use WordPad.

              1. Collin C. MacMillan’s avatar

                With Hyper-V, why not just double-down and use Kate instead of that WordPad cruft:

                rpm -Uvh kate-4.3.1-3.7.x86_64.rpm

                Mmmm! That’s good…

              2. Charlie’s avatar

                Funny Eric! But just in case some random googler comes across this and misses the subtle humour, maybe you should point out that it’s a joke 🙂

                1. Eric Gray’s avatar

                  Excuse me, but 25% fewer layers than VMware is no joke. This is serious!

                2. Daniel’s avatar

                  Maybe they wrote this from the southern hemisphere marketing department…it is summer after all which requires less layers….

                3. DougBaer’s avatar

                  I just about fell out of my chair this morning when I read this. I came across the MS marketing doc on Tuesday and sent this diagram to my team along with a Marketing vs. Reality rant. Thanks for the entertainment!

                4. Dave O.’s avatar

                  This is hiliarous. Thanks for the laugh, Eric!

                  I about fell out of my chair, as well, when I saw the Command Prompt window and you trying to run “rpm -Uvh”.

                  BTW, what about the lovely Palo Alto bowl right next to Dinah’s…did they have power? 🙂

                5. Joeg M.’s avatar

                  Nice post, but I think you missed the point of that brochure.

                  Look at some Microsoft market data:

                  server os market share: >60%
                  client os market share >90%
                  billions of profit year on year.

                  So what. If I were Microsoft, I would not need other OSs or application environments
                  to provide functionality to my customers, as VMware and others do.

                  Try to use ESX 4.0 completely without Windows. I think it’s not reasonable, if not impossible!

                  So in Microsoft’s view they have an OS with Hypervisor plus Applications and don’t need
                  more. They don’t need other OSs to make money. As nobody would in their position.

                  Greetings

                6. Jas’s avatar

                  I would prefer run Windows application on Linux OS.

Comments are now closed.