Shawn Burke's Blog

Pushing the new stuff

Setting up a Windows Home Server

Setting up a Windows Home Server

  • Comments 29

I've been on a Windows Home Server kick for a while. 

I originally set it up on an old laptop I got - which wasn't doing what I wanted so I started from scratch and ordered a dual-core Dell notebook (Vostro 1400) it showed up last week.  This kind of turned into a saga, hopefully I've documented some of the issues here.  Originally I bought a low-end Toshiba from BestBuy to do this.  Bad move - it actually wouldn't run XP or WHS.  Back it went.

Here's what I want a single machine to do in my house:

1) Be on all the time

2) Back up all the other machines when they're on (I want them sleeping most of the time)

3) Host a Internet-facing web site

4) Host a bunch of shares for my photos, music, data, etc.

5) Be a print server

6) Be able to run the Zune client so that I can use the Zune wireless sync to pick up podcasts, etc.

7) Have low power consumption.

8) Run Windows Media Connect so I can stream DRM'd music to my ROKU SoundBridge's over the wireless.

So that's my requirements list, in no particular order. 

In fact, power consumption is a biggie for me.   The key to this is to use a laptop instead of a desktop machine for this.  It's ideal for a home server machine.  Built in UPS - and a very long life one at that.  Built in keyboard, monitor, and mouse.  Lots of USB ports.  Most desktop machines, when sitting idle, pull about 125w.  The Dell laptop I just got, with the shut, pulls 19w.  Huge difference. 

When did my first run at this, I got most of the way there.  WHS but itself does everything but except (6) above more on this later.  And I don't really like the same system doing (3) and (4) together.  That's just asking for trouble.  Having the website running in its own machine is a nice extra layer of security.

(8) Means that the same system has to be running the client that downloads any DRM'd music (e.g. subscriptions, which is number 6), which is an added wrinkle.  I can't download it somewhere else then copy it to the server.

Also, the Zune client doesn't run on WHS.  I want this thing running all the time so my Zune4 can sync with it. 

What I realized is that I could install Virtual Server 2005 R2 on the machine and then mount a Windows Vista image on there to handle some of this other stuff.  This was a cool idea because it so nicely handled a bunch of scenarios.  For example,  if I have the VPC running off it's own USB drive (which is a good idea for performance reasons), if I need to move my web site onto another machine, I can do so in minutes.  Virtual Server and Virtual PC speak the same language, so any machine will work provided I take the 2 minutes to install Virtual PC on it.  By giving the VPC a static IP address, the router will take care of the rest.

I got the laptop ordered and set about building up the VPC image on my laptop.  This is also nice to be able to do - rather than needing the server, I could chip away at setting up the VPC image to my hearts content and then just copying it over when I'm ready.  In case you haven't noticed I'm getting pretty hot on Virtualization in general and have been finding all kinds of ways to use it in my day-to-day life.  But that's another story.

So last week I get the machine delivered.  I've got the VPC ready, so I think it'll be an easy four step process:

1) Install WHS

2) Setup backups

3) Mount VPC

4) Celebrate the glory

Well, it's not going to be that easy.

First problem: Upon setup reboot (after it copies the files), WHS install Blue Screens

Good times:

STOP: 0x 0000007B (0x F789EA94, 0x C0000034, 0x 00000000, 0x 00000000)

I look everywhere trying to figure this out, with no luck.  I learned this was "INACCESSIBLE_BOOT_DEVICE" but the blue screen didn't say that.  But I gleaned from that that there wasn't a driver for the machine's drive built into WHS setup.  I tried locating a driver and then finally was looking in the BIOS when I discovered the issue: by default, the hard disk access is set to AHCI, which setup doesn't understand.  In the BIOS I tried changing this to ATA, and presto, it worked.   I haven't tried changing it back, and probably won't.

The rest of setup went pretty smoothly.  I got WHS installed and running, copied the data from the old server, and installed Virtual Server 2005 R2 SP1...so far so good.

I got the VPC image copied over and loaded up on the laptop.  I gave it 1100 MB of RAM to work with.  At this point, I pointed Windows Media Player at the music share on the server box and let it catalog all that music for sharing.

Just to recap, now I've got a VPC image running IIS7 and a website, and also serving music that resides on a different machine.  So this VPC is pretty low investment, its just a broker.  It's also running SQL Server Express to manage the website.   This all works when running off my laptop.  I think I'm good to go.

Second problem: Getting the VPC to show up as a Windows Media device

So I make sure I can connect to this thing and that the performance is good enough.  I just have it share out the default music that comes with Windows Vista.  But I can't get the device to be visible to the ROKUs or to the other PCs in the house.  I see the VPC as a normal machine, no problem.  And the web server is running fine (that was easy...), but no media sharing uPnP icon is showing up.

This one took a bunch of debugging and was pretty painful really.  I tried everything with permissions and firewalls and configuration I could find, without luck.

Once thing I did notice was that when I'd try to restart the "Windows Media Network Sharing Service" (Windows Media Connect), it would hang at "Stopping" and I'd have to kill the process.  Hmmm...

Finally after a lot of searching I came across this post which suggested deleting the DRM folder that holds the DRM keys.  Of course you'd need to reacquire any licenses, but at this point that was fine.  This folder is under your user profile (<profile>\AppData\Local\Microsoft\DRM), and you can rename it if you want to be able to put it back.  I just killed all the WMP*.exe processes, deleted the folder, then restarted the VPC.

Presto.

I'm not sure how this got so gummed up, and it really, really, sucks that there was NO clue for me (event log, etc) that this was the problem.  Not cool, I'll need to find someone to email on this one.  Even though it was in a VPC, this wasn't a freaky scenario.  I'm also not sure what I did to break this between setting the VPC up on my laptop and moving it over, but I think it had something to do with WMP setting up the library.  Just a guess.

Third Problem: Getting Media Sharing to Share Network Content

At this point sharing is working great for local content.  Not so much for the stuff that I'd put into the library from the server.  With some digging I came across this Windows Media Sharing FAQ, that says "You can use Windows Media Player 11 to share media files that are located on other computers on your home network. However, additional steps are required so that these remote files will play on the devices you are sharing them with.".  Okay, cool.

Unfortunately this FAQ is super confusing about exactly what you have to do.  It lists five steps.  But you need to do the FIRST ONE and just ONE of the next FOUR.  That's not clear.  And all of these steps should happen on the client (VPC in this case) machine.  That's also confusing in the FAQ.

First, set the registry key to enable slurping off a UNC share:

image

The next four options boil down to two things:

1) Set the Windows Media Sharing service to run under the account that has permissions to the share, or

2) Grant anonymous access to the share so rights aren't an issue.

I didn't want to do (2) since it's not secure and with the new security stuff in Windows, it seems to not work reliably to make a folder REALLY public anyway.  So I went with (1).  Basically you just tell the service to run under the context of a given account (in this case an account that WHS knows about), and then give that same account some special registry permissions.  I'm not sure what this is about, but it's local to the WMP nodes in HKLM, so whatever. 

So in the FAQ, do the first bullet and the second one in the steps list.

image

image

After setting all of this up, all the music started showing up for the ROKUs and streaming well.  Very nice, perf seems to be fine, etc.  I've gotten some occasional drop outs, so I'll need to debug that futher.   But usually it works fine.

Fourth Problem: Getting the VPC to Start Automatically

When the WHS boots or restarts (e.g. Windows Update causes this from time to time), I want the VPC to automatically start.  Since it's running a web site, that's kind of important, yeah?

There is an option under Virtual Machine / Edit Configuration in the Virtual PC. 

image

It's called "General Properties" and it has an option for starting the Virtual Machine on machine startup.  But it's disabled!

image

This took quite a bit of futzing to figure out.  Turns out it's lame - you need to shut down the virtual machine (not save state, actually select Turn Off) and then this option is enabled.  Sigh...after you know this the error message makes sense.  Maybe I'm just stupid.

Fifth Problem: Autologin to the VPC

Okay, this is an easy one.  But still.  Since I need to launch the Zune Client for wireless sync, which doesn't run as a service (hint, hint Zune team), I need the VPC to log into a session by default. This is easy via the Autologon tool.  This encrypts your password in the registry and automatically logs on the account.  Put the Zune Client in the Startup Programs group, presto, it's done.

image

Was all that worth it?

Now that it's all working, this is a great setup.  No real problems and everything is good from perf to reliability.  It's pretty much hands off now and I've accomplished all of the goals I've set above.   Definitely far too much work getting this set up, and I'm sure I'll keep tweaking on it but right now, everything is working great.

 

image

Leave a Comment
  • Please add 7 and 8 and type the answer here:
  • Post
  • PingBack from http://geeklectures.info/2007/12/26/setting-up-a-windows-home-server/

  • You didn't say what version of windows vista.  I'm going to assume you used Biz, Ent, or Ultimate.  Do to the fact you can't use Home Basic / Prem. in a VM image.

  • Hi Blake -

    Actually, no it's Home Premium.  I wanted the smallest footprint possible.  I originally tried Basic (because I had a Basic DVD laying around) but didn't realize it didn't support IIS7, so I went up to Premium which does the job.  I went through and disabled a bunch of services and other stuff I didn't need running - I don't want any of the MCE stuff or printer support running, for example.  But in both cases they worked fine - why do you say they shouldn't work in a VM image?

    Shawn

  • Shawn,

    It is not that those SKUs of Vista shouldn't work in a VM image, it is because the EULA does not allow those SKUs to be used in a VM image:

    USE WITH VIRTUALIZATION TECHNOLOGIES. You may not use the software installed on the licensed device within a virtual (or otherwise emulated) hardware system.

    -Jason

  • Uh oh.  Thanks for pointing that out.  Hmmmm, that's interesting.  I'll go get another license and see if I can't dig into what the story is there...

  • Hey Now Shawn,

    Nice Post very informative.

    Thx 4 the info,

    Catto

  • Nice, I was curious about getting Virtual Server 2005 running on WHS, seems you didn't run into any problems so now I'll take the plunge!

    I just finished installing subversion on my WHS so now all my lovely code is sitting on WHS and I've set my repository folder for duplication so not only is it centralized it's also backed up in case a drive goes.  My next task is to figure out the AddIn mechanism so I can create an .msi that automatically installs subversion without needing to remote into the machine.

  • @Simian -

    That sounds great and it's a great idea. Hmmm, I might just go do that...

  • Where are you hosting the Virtual Machine files (.vhd .vpc)?  

    I am assuming it is somewhere on the Data partitions as the system partition is only 20Gb by default.  But where in the Data partitions?

    If a folder is created manually (not using the WHS Console) then you loose the features of Folder Duplication and Folder Backup (using the new Power Pack 1 backup feature).  You may also open yourself up to risk of Drive Extender corruptions.

    If the folder is created using WHS Console should Folder Duplication be enabled?  This would create a lot of overhead for the processor and disks as the .vhd file would be changing almost continuously while in use.  It would also be unnecessary if the Virtual Machine host was being backed up by the WHS Connector.

    Am I correct in estimating that the best location for the Virtual Machine files would be in a new folder created by the WHS Console without Folder Duplication being turned on?

  • The Virtual Machine host is also an excellent place to run your data revision control backups or other backups.  This is especially relevant since many (most?) backup software vendors are insisting on enterprise-class Windows 2003 Server licenses for Windows Home Server.  (I tried explaining that Windows HOME Server was for HOME users but they would have none of it!)

  • Well, I've given it a shot on WHS, and VS R2 SP1, with Vista Business as the guest.. and the guest is dog slow.  Far too slow for practical use.  I'm still experimenting but may wind up trashing the whole VS approach (as much as I'd like to use it) and throw a dedicated box on line for the few things I need it for (IIS, etc).  Yes, I've added the machine additions.

  • Make sure you give the guest plenty of memory so it's not thrashing the disk.  I gave mine 1200M I think. Also, check if your machine has an IntelVT processor, and if so that the Hypervisor support is turned on.

    Note mine is pretty slow too - yes, too slow for me to use for anything -- but it seems to work fine as a web server and a zune server.

  • Thank you millions! I could not figure out the BIOs and HD issue. You saved me many more hours of searching!!!

  • Excellent - glad it helped!

  • Hi Shawn. Great tutorial. Has anything changed or broken since PP2 came out?

    I fully intend on doing something like this (I have Sonos instead of Roku), but also plan on using the Media Center features. I'll be gutting a quad-core system I currently have for such an intensive task.

    (*sigh* if only they would include media center and zune services in WHS natively...or storage pooling in Windows 7).

    To repeat an earlier poster's questions. Where did you store your virtual harddisks? And did you just turn duplication off and use the connector inside the VM for system backup?

Page 1 of 2 (29 items) 12