Runing Linux on a Windows Home Server simuntaneously

I read a few weeks ago in some of the Windows Home Server forums that some enthusiasts are trying to install Linux on a HP MediaSmart server. While I do find it to be a quite interesting exercise, I fail to see the benefits of replacing Windows Home Server with a copy of Linux, particularly since HP has their own Linux-based home servers, plus it would be probably cheaper to build a custom one.

On a personal note, I rather like the idea of having a Windows-based server at home. But I do miss having the ability to play with Linux hacks. So I was thinking what I could do to have Linux as an option at home when I came with a solution where I could have both Windows Home Server and Linux on my MediaSmart server running at the same time: Virtual Server.

This post is extremely outdated
Please be advised that Windows Home Server, as well as Microsoft Virtual Server, are retired software which is no longer supported by Microsoft. I decided to keep this post for historical/archival reasons, but nowadays users can run most Linux console applications by installing a Linux distribution on top of Windows 10 or Windows Server 2016 using the Windows subsystem for Linux. If a virtual machine is required, Microsoft Virtual Server has been replaced by Hyper-V.

After upgrading the amount of RAM on my MediaSmart served from 512MB to 2GB, I felt this would be a great opportunity to have a Linux system without compromising the features of Windows Home Server. So I have prepared this guide to explain what I have done to run a Linux virtual machine under my Windows Home Server. I part from the principle that you know what you are doing and you have some idea of what virtualisation all about.

Here is what you need:

  • Upgrade your server’s RAM. 512MB is unrealistic if you want to do anything with Windows Home Server besides its out-of-the-box features. If you have a HP MediaSmart server, you can find instructions on how to upgrade the server memory here.
  • A copy of Microsoft Virtual Server. At the time of writing this post, the last version was 2005 R2 SP1. Virtual Server is free and can be downloaded from here.
  • A distribution of Linux. I am a big Ubuntu fan. However I opted to use openSUSE because of the benefits it has from the interoperability agreement Novell has with Microsoft (e.g.: virtual machine additions). You can get openSUSE from here, and Ubuntu from here.

Setup Instructions

  1. First and foremost, you must do a remote access to your HomeServer using UltraVNC or Remote Desktop and log in as administrator.
  2. Once on the servers desktop, install Microsoft Virtual Server. Reboot the server is necessary and remote desktop into the server again as administrator.
  3. On the Servers Start Menu under Microsoft Virtual Server, click on Virtual Server Administration Website.
  4. Under Virtual Machines on the left-side menu of the Admin Site, choose click on Create.
  5. You must now provide the initial settings of your virtual machine. Here are some of my recommended settings for a simple Unix Server:
    1. Name. The name of the Virtual PC (e.g.: Linux, openSUSE, Ubuntu).
    2. Memory. The amount of RAM you want to provide for the virtual machine, bearing in mind you should leave enough for your server to run smoothly. It really depends of the amount of RAM you have and what you want to do with your Linux server. For example if I only want to use some console (text) applications I would go from a minimum of 256MB to 512MB (if I want to run services for a development environment). If using a graphical desktop and/or some more intensive applications, I might go to 1GB. As I have 2GB for my home server, I prefer to never leave the Home Server operating system with less than 1GB.
    3. Virtual hard disk. You can create the disk to use with your Linux virtual machine now or specify one later.
      NOTE: If you already have or plan to have Linux on an external disk or flash drive, you could create a linked virtual hard disk that points to the Linux you partition you want to use (see point 8 below for further instructions).
    4. Virtual network adapter. Make sure you configure your virtual machine to connect to the external network. This will ensure that the virtual machine can be seen and accessed on your network.
  6. Once the machine is created, you will be presented with its configuration page.
  7. If you need to install Linux, you need to ensure the virtual machine will be able to initiate the Linux installation process:
    1. If you have a CD/DVD drive on your home server, simply put the disk on the drive and ensure your virtual machine CD/DVD drive properties is configure to use your physical CD/DVD drive.
      NOTE: If you want to use your CD/DVD drive within your Linux virtual machine, you should do this procedure regardless if you need to install Linux or not.
    2. If your home server doesn’t have a CD/DVD drive, you must configure the virtual machines CD/DVD driver properties to capture the ISO image of your Linux install disk.
  8. OPTIONAL: If you already have an external disk with Linux installed, or if you want to install Linux on a dedicated disk, you must create a linked virtual disk that points to your existing Linux install:
    1. Plug the external disk with Linux on your home server.
    2. On the Virtual Server Admin Site under Virtual Disks, choose Create then Linked Virtual Hard Disk.
    3. Specify the location name of the file to be saved and the physical drive that will be used for the virtual disk.
    4. Go back to the configuration page of your Linux virtual machine and under hard disks, provide the filename of the file created for your linked virtual hard disk.
  9. OPTIONAL: Still on the virtual machine configuration page, you can click on General properties in order to specify a username and password to run the virtual machine upon system start-up. Recommended if you want your Linux virtual machine to be always on (i.e.: starts when the home server start).
  10. On the Virtual Server Admin Site under Virtual Server, choose Server Properties.
  11. On the bottom of the page under your server Properties, click on Virtual Machine Remote Control(VMRC).
  12. On the Virtual Machine Remote Control (CMRC) Server Properties page, ensure you enable VMRC server and specify a TCP/IP port that is not already in use on the server. Then click OK to reflect the changes.
  13. OPTIONAL: Back on the left-side menu of the Virtual Server Admin Site, under Virtual Server you could click on Resource Allocation to specify the maximum amount of resources your virtual machines can use in order to ensure resilience to your home server.
  14. Once again on the left-side menu of the Virtual Server Admin Site, under Navigation click on Master Status in order to see your recently created virtual machine. Hove the mouse over its title to show its context menu that would allow it to start and stop the virtual machine, as well to Remote Control it.

All done! Once I got my Linux box installed, I was running things like shell scripting, mySQL, Apache, PHP and other nifty tools. I hope you found this little guide useful!

As a next step, you could look into Microsoft Services for Unix for good interoperability between your Linux virtual machine and your Windows hosts. You can find more about Windows Services for Unix here.

If you want to discuss this implementation with other Windows Home Server enthusiasts, there is a forum thread at wegotserved.co.uk (registration required) here. Thanks to Bodog from wegotserved.co.uk for the support!

7 Comments

  • Where do you put the virtual hard disk so it doesn't trigger the corruption bug?

  • JR,

    Good point. The way I did, I put the virtual Hard Disk in the C: drive itself.

    The reason I did it this way is that for the virtual machine drive, I don't think I need to have tombstones or any other kind of gimmicks used to handle the DATA partition.

    Alternatively, I *THINK* a user would be safe in simply adding the virtual hard disk drive into a directory in the D: drive which is outside of the shared folders structure. For example, I use uTorrent on my home server and the temporary directory of incomplete downloads is at “D:incomplete downloadsutorrent” — and I never had data corruption issues.

  • JR, Pedro,

    Someone else mentioned that there might be a problem if you use D: disk. Not sure if this is true, but it does sounds reasonable, since this disk may be a “compilation” of several physical disks.
    C: is simply too small – I have 3 virtual machines installed and there will be no room to hold all their data.

    I personally made a virtual folder, without duplication, in hope that WHS will NOT try to do “smart” things on it. So far its running fine. I encountered once error saying “Cannot start virtual machine because its disk is being used by another process”. Not sure what this was, but its gone before I logged into server to check which process uses it, so waiting for this to occur again

Leave a comment