Wednesday, October 31st, 2007

Running Windows Server 2008 with KVM on Linux


See my prior post on KVM if you want to get started with KVM setup. Assuming you have KVM working on your system, it takes just 3 easy steps to get started using Windows Server 2008 on Linux in KVM. Before starting, you must have a copy of Windows Server 2008 of course. If you don’t have one handy, you can download and burn an eval DVD ISO from here.

Once you have your DVD ready, just execute the following in a terminal:

  1. # qemu-img create win2008EE.img -f qcow 10G
  2. # kvm -m 750 -cdrom /dev/cdrom -boot d win2008EE.img
  3. # kvm -m 500 win2008EE.img

That’s it. Windows Server 2008 seems to require ACPI so the -no-acpi option gave me an error. I will also note that I could not get the 64-bit Enterprise version working and instead opted for the 32-bit Standard (I suspect the issue is the 64-bits and has nothing to do with the edition).

First impression: Windows Server 2008 will feel just like Server 2003 and in some ways feel different. It does seem to startup/shutdown faster than before but there are so many variables it’s hard to tell. 2008 is actually quite visually appealing… can’t point to one thing, but the polish is nice for a server version (I’d call it a Vista minimalist look). Server 2008 of course has all the Microsoft GUI config screens newbie Linux admins dream to find… you have to give Microsoft credit for making it very simple to access and setup server services out of the box.

Microsoft has made quite a few changes (I haven’t explored them all) and I have not used the Core version yet. One noticeable change is (sit down for this)… IIS 7.0 has gone modular – yes, it’s true. Setting up IIS 7.0 will actually look like you’re installing packages using a Yum or Apt-Get GUI. You will be asked to confirm “features” which are akin to dependencies. Whoever redesigned IIS used Apache and Linux – the influence is notable.

I’m barely scratching (or seeing) the surface here so I’ll end with a promise to post more as I play around with the eval over the next few weeks.

Oh, I guess I did also skip the fourth step:

4. Install Windows Server anti-virus, anti-everything security software :-)

And here are some screenshots for those who are interested or require visual confirmation:

windows server 2008 install screen kvm
(Initial install screen)

windows server 2008 install screen kvm
(Installing …)

windows server 2008 kvm login screen
(Login screen)

windows server 2008 kvm configuration screen
(Initial configuration screen)

kvm IIS 7.0 server role
(IIS 7.0 Install with dependency confirmation)

iis 7.0 setup
IIS 7.0 setup – I dare anyone to create an informative intro for newbies to Apache like this)

iis 7.0 components
(IIS 7.0 add features/modules)

iis 7.0 manager
(IIS 7.0 management GUI)

 

Posted by md on October 31st, 2007 | Filed in Linux, Microsoft, Planet-LTC, Technology, Ubuntu, Virtualization, Windows | 16 Comments »


16 Responses to “Running Windows Server 2008 with KVM on Linux”

  1. November 5th, 2007 at 9:27 pm

    Using Linux KVM Virtualization on Ubuntu Gutsy Gibbon 7.10 said:

    [...] See my post here for setting up Windows Server 2008 in KVM [...]

  2. November 20th, 2007 at 10:37 am

    Rich said:

    Which version of KVM do you use?

  3. November 20th, 2007 at 2:02 pm

    md said:

    I use Ubuntu 7.10 “Gutsy” which currently is on version “1:28-4ubuntu2″ — I’m not sure how that maps to upstream… I’m going to guess it maps to release 28 in KVM based on the numbering.

  4. November 29th, 2007 at 7:03 pm

    sledge said:

    I use Kubuntu 7.10 Gutsy (AMD64) and has used kvm for VISTA ULTIMATE 64 and can only run it in qemu not kvm. if I use kvm with the -no-acpi options Vista refuses to install and without the option it crashes as soon as it starts with blue screen. It does that if I try to install it as plain OS on disk and not as kvm machine as well. Possibly some hardware incompabilities. Have not have the chance to check it out yet.

    PS: Excellent Howto !!

  5. December 5th, 2007 at 2:48 am

    tecosystems » Fedora 8: Close, But No Cigar said:

    [...] I’d try to virtualize Windows Server 2008, as I knew Senor Dolan had successfully done just this. Forgoing his instructions, which were command line based, I thought I’d try to use [...]

  6. March 23rd, 2008 at 1:57 pm

    anton said:

    I can confirm that it’s all good for win2008 with (k)ubuntu 8.04 beta as well. I did have to add my username to both the kvm and libvirtd groups but after that plain sailing!

  7. March 24th, 2008 at 10:00 am

    md said:

    Cool! Thanks for the update Anton

  8. April 30th, 2008 at 1:05 pm

    davide said:

    cool blog…
    just a comment… I already have a dual boot PC, with Vista pre-installed on my 500GB SATA disk, and I’d like to boot kvm from the NTFS partition, not from a disk image. is it possible ???

  9. April 30th, 2008 at 2:04 pm

    md said:

    It should be possible – just make sure the NTFS partition is mounted… then create the image on the ntfs partition…

  10. November 13th, 2008 at 9:14 pm

    Rob said:

    Were you able to find a driver for the sound card? I’m running kvm-78, and it looks like it’s an es1370, but I can’t find sound drivers for Windows Server 2008 or Vista.

  11. December 16th, 2008 at 10:52 pm

    budiw said:

    Does anyone know how to insert a cdrom into windows that run in KVM? I mean, the windows is already running and I need to insert software in my cdrom. But I don’t want to use networking at all.

    Thank you

  12. March 11th, 2009 at 4:59 pm

    Dave Miller said:

    I can get Server 2008 up and running with custoom builds of kvm, qemu and SDL since I’;m on CentOS. The only problem is that WinSrv2K8 doesn’t detect the virtual NIC. You don’t mentyion having a problem with this. Did you have to use any of the “guest drivers” that are available with the KVM download?

    Thanks,
    Dave

  13. March 11th, 2009 at 5:13 pm

    md said:

    I actually don’t have this setup anymore (my W2K8 license expired), but I had the virtual NIC working just fine when I did it. I don’t recall doing anything special to get it working. It probably depends on what mode your setup on (bridged, etc)…

  14. March 12th, 2009 at 12:00 am

    Dave Miller said:

    OK. Thanks. The bridge hint worked although I have to specify using the rtl8139 instead of the default ne2k. I had to build kvm locally so it’s possible that it’s a build option or something (I just used the defaults).

    Thanks again,
    Dave

  15. September 19th, 2009 at 12:31 pm

    Rene Jochum said:

    Hi,

    @Dave: Use the driver from here:
    http://www.linux-kvm.com/content/redhat-54-windows-virtio-drivers-part-2-block-drivers#comment-617

  16. February 6th, 2010 at 11:58 am

    bk said:

    good write up. any chance you are also able to enable hyper-v in your config?
    In my testing even if i use the ‘-cpu host’ args where my cpu is a phenomii i still get errors from msft about no hw virtualization support….



Please leave a Comment