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
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.
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:
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.
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.
It’s called "General Properties" and it has an option for starting the Virtual Machine on machine startup. But it’s disabled!
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.
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.