SmallNetBuilder

Follow SmallNetBuilder
Follow SmallNetBuilder on TwitterConnect On Facebook Google+Get the SmallNetBuilder RSS Feed
You are here: NAS NAS How To How To Make A Windows Time Machine Server: Part 1
 

How To Make A Windows Time Machine Server: Part 1

Print E-mail
Prev - Page 1 of 3 - Next >>

Introduction

Update 4/24/12: Added login user/password tip
Update 11/15/11: Corrected error in original appliance

Virtual Windows Time Capsule

Recently I came across a SmallNetBuilder reader on the forums who was planning to build a Windows-based home server. As a Macbook Pro user, one of his needs was to have his server act as a target for Time Machine backups. Not an unreasonable request, but apparently more difficult than you might think. I suggested using Linux instead, but he was keen to stick with what he knew.

Apple, of course, sells the Time Capsule, so backing up over the network is possible. Requirements for backing up over the network include the use of AFP (Apple Filing Protocol) 3.2 or above.

Other people have used the TMShowUnsupportedNetworkVolumes hack in MacOS X to use a Windows file share as a Time Machine. But this has since shown to result in data loss once you start to fill up your disk. So this option is not recommended!

Regular readers of SmallNetBuilder will be aware that many NASes now come with TimeMachine support built in. This is courtesy of Netatalk – the open source implementation of AFP.

But back to Windows. Netatalk is open source, so probably also works on Windows, right? Apparently not, although why this is so remains a mystery to me. Microsoft itself used to include AFP compatibility in Windows Server, but they have pulled it as of Server 2008. Besides, it was only version AFP 2.2, so of no use for Time Machine.

As far as commercial products go, GroupLogic's ExtremeZ IP supports Time Machine on Windows. But as this is SmallNetBuilder and not LargeCorporateNetBuilder, the $795 for 3 licenses pricetag is probably out of reach for most readers!

So what does that leave us with? Not a lot, unfortunately. So it got me thinking. There must be plenty of users out there who have a Windows-based server but have a few MacOS X users who would like to use said server to do their Time Machine backups over the network. What can SmallNetBuilder do to help them?

The solution I came up with was to use a virtual machine on Windows to host Linux running Netatalk. The idea would be to keep it as ‘appliance-like’ as possible, so that it could easily be downloaded installed and would be unlikely to go astray.

Now before the nay-sayers start, I agree this isn’t the most elegant solution. But it provides an alternative that is infinitely better than the current TMShowUnsupportedNetworkVolumes hack!

This article will first walk you through installing a virtualization solution on a Windows system. You'll then have the option of installing a preconfigured "appliance" to handle Time Machine backups. Or you can go through the gory details and create your own appliance for installation.

This Part 1 will give you the easy way to get up and running by first installing a virtualization solution on a Windows system and then a preconfigured virtual appliance. For those who want to understand the whole process so that they can create their own version, you'll get that all in Part 2.

Note that the result is not going to be a high performance solution. But that’s ok, since Time Machine backups are relatively low bandwidth once the initial backup is done. If you're looking for an enterprise-grade solution for handling an office full of Macs running Time Machine backups, you'd be better off using a full blown (non-virtualized) Linux server or talk to GroupLogic (and get your checkbook ready). So with the introduction out of the way, let’s begin.

Virtualization

As previously mentioned, we are going to be running virtualized Linux. So we must choose a free virtualization solution. Three candidates were considered for the article and, to be honest, there isn’t a lot to choose from. But there is no reason why the techniques I use here won’t work in another version. So my choices were VMware Server, Oracle's Virtualbox and Microsoft's Virtual PC. All three run on an existing Windows installation (i.e. they don't require a ‘bare metal’ install).

VMware Server is a great, mature product, but a bit of a beast (a 500 MB download!) and probably overkill for this project. I don’t have too much experience with MS Virtual PC, but it seems as good as any free VM solution.

This leaves VirtualBox, my preferred choice because I have used it the most. It is also (partially at least) available as open source (which we like). The download is only 1/6th of the size of VMware, too. The downside is that as a desktop package, it is not so easy to run the VM as an always-on service, but we’ll fix that later.

As I said, all products will work so use the one that you are most comfortable with.

The Easy Way

For those of you who just want to cut to the chase, there are two steps.

1) Go download and install Virtualbox from http:/www.virtualbox.org. I used version 4.1.2-7350 and run it on a Lenovo T420 laptop with Windows 7 Enterprise 64-bit with 8 GB RAM. Note that if you're installing on Windows XP, you may get a number of errors and warnings. Just click on through them to finish the install.

2) Download the Time Machine appliance file from here. Double-click to install it.

NOTE!Update 11/15/11 Note: There was an error in the original appliance that will throw a disk permissions error when you try to connect to the Time Machine appliance. If you downloaded the appliance before 11/15/2011, you need to download the updated version and install it.

Or you can use the original appliance, log into the VM with root/tmroot and type in
chmod 777 /mnt/MyTimeCapsuleData

That's pretty much it. Your virtual MyTimeCapsule device should be visible to your Macs and you should be able to use it to store Time Machine backups.

You will probably want to create a service for the virtual machine so that it starts when Windows starts and cleanly shuts down when Windows does. We are going to be using a free Windows application called VBoxVmService. Download it and then extract the vms folder to your C drive root directory (c:\). Easy to follow documentation can be found in c:\vms\doc\Howto.txt.

First, navigate to the vms folder and open up VBoxVmService.ini in notepad.

You need to modify the second line to add your user name. Mine became:

VBOX_USER_HOME=C:\Users\kevin.herring\.VirtualBox

Edit the section called [Vm0] and change it so that it looks like:

VmName=MyTimeCapsule
Autostart=yes

Then save and close the file.

Now you just follow the steps in the Howto.txt document:

Step 1. (for WINXP / SERVER2003) Launch CMD (Command Prompt) from your start menu.

Step 1. (for VISTA / SERVER2008 / WIN7) Right-click on CMD (Command Prompt) and choose "Run as Administrator" from the context menu.

Step 2. Install the service. Within the terminal window type:

cd C:\vms [ENTER]

VmServiceControl.exe -i [ENTER]

Step 3. Reboot your system.

That’s it! Just restart your Windows system and make sure that the virtual MyTimeCapsule device appears.

NOTE!Update 4/24/12 note: If you are asked for a login details at any time you will need to log in with tmuser as both username and password.



Related Items:

How To Make A Windows Time Machine Server: Part 2
Virtualization for the Small Network - Part 1
How To Set Up a Cloud Webserver on Amazon Web Services
Virtualization for the Small Network - Part 2
Monitor your Network for Free with Nagios