Bob's Notepad

Notes on projects I have done and things I have learned saved for my reference and for the world to share

Sunday, January 10, 2010

Apple Time Machine backups to Ubuntu network drive

Apple's Time Machine is an awesome utility but gets frustrating when you have to use an external drive. An easier was to do these back ups is using a network drive. Fortunately, the netatalk package installed on an Ubuntu server can provide the functionality you want.

I am using Ubuntu 9.10 on my server. As a note, this is actually a MythBuntu server but functionality should be the same on any other Ubuntu 9.10 server/workstation.

First, as of this writing, the netatalk 2.0.5 packages are not available in karmic's repositories so let's add a debian repository by adding the following to /etc/apt/sources.list:
deb http://ftp.de.debian.org/debian sid main

Now let's install the netatalk package:
sudo apt-get install netatalk

Create a directory for time machine backups:
mkdir /home/user/timemachine

Now we need to edit the /etc/netatalk/AppleVolumes.default file and add the following line:
/home/user/timemachine timemachine options:tm

And restart netatalk:
sudo /etc/init.d/netatalk restart

Now on your mac, open finder, select the Go menu and "Connect to Server". Fill in your server's ip address prefixed by afp:// (for example, afp://192.168.1.100) and you should be prompted for a volume to mount. Select "timemachine", of course. Once that volume is mounted, go to time machine preferences and select that disk and you're all set. If you don't see your network drive as an option then open up terminal and issue the following command:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

As a note, you may want to now go and remove the extra line from your /etc/apt/sources.list file so that future apt-get commands don't rely on debian's repository and not it's own

Labels: , , , , , , , ,

Reference Link


Thursday, March 12, 2009

Using USB devices on Windows under VMware ESXi (Aladdin Hardlock)

VMware is quickly becoming the best way to run servers of all kinds and now that ESXi is free we're going to continue to see more and more functions moved onto a virtualized platform. Recently I've been working on a project for one of my customers which involves installing software for their Trumpf metal working equipment and ran into a small issue that I was able to overcome.

In short, this hardware requires the use of a USB dongle or "Hardware key" in order to run (this is an anti-piracy feature). The problem with ESXi is that you are not able to pass a USB device through to a virtual machine. Thankfully, a handful of companies have created Networked USB Hubs such as the Belkin F5L009. Everything immediately worked by plugging this in.... well, sort of :)

The issue that occurs inside of a VMware server is when you install Windows there is no USB root devices found so Windows does not install the proper USB support files. In this case, it's only a single file, USBD.SYS, that is missing.

1- Connect your USB hub to your network
2- Install the Belkin client software as the instructions explain
3- Ignore any new hardware wizards that occur.
4- Locate a USBD.SYS file. Often times you can find this on the same machine but, if needed, look on another Windows machine or in the i386 folder on your Windows installation CD. Copy this file to C:\windows\system32\drivers\
5- Reboot the virtual machine
6- Once the machine reboots, complete installation of your software, hardlock drivers, or any other USB device that you connect. Everything should function as intended and you have a little box that holds physical USB ports for your virtual machine.

Some notes on my installation.

* If you are using an Aladdin Hardlock USB key, you can most likely find new drivers on Aladdin's Hardlock Page.

* My Belkin Network USB Hub is running firmware version 1.2.0

* I found it's extremely handy to dedicate the USB hub to a single machine and to tell it to auto connect new devices. This literally makes the box just like real USB ports on the virtual machine. There are lots of options to play with as far as sharing devices to other specific machines but I did not play with any of that.

* Auto-connecting Hardlock keys is essential if you are running some type of server. If you tell your key to only connect manually your software may start before you mount the USB device and a pissed off program would likely ensue :)

* There are a few vendors that make an identical product but, from my research, I found that the Belkin is about 1/3 of the cost of most of them and also has some additional features. Digi makes a product that many people are using with VMware since it's marketed as being compatible with VMware but you will spend lots of money for that sentence -- and that's really all it is because this type of a device really has NO interaction with VMware at all since its a physical device communicating directly with your virtual machine on the network.

Labels: , , , , , ,

Reference Link