Sunday, 17 May 2009

Enabling USB devices in VMWare Server 2.0

This morning I went on Animal Crossing. Unfortunately Nook's was remodelling, so I couldn't buy/sell any stuff. So I just got a red turnip seed from Sow Joan, played hide & seek with Derwin and 2 female pigs, and got my bell rock.

Before and after church I watched Mociac play on Zelda. Then after dinner I went on my comp, and checked Andy Rouse's blog, Moose Peterson's blog, and The Luminous Landscape. It was interesting to see that Andy Rouse had posted some shots very similar to Alan Briot's 'Landscape Blurs'. Unfortunately I can't link to Andy Rouse's shots as his blog doesn't feature permalinks, but here's a link to his Australian collection, which includes the blurred tree abstracts. And after checking Andy Rouse's blog, I checked the Luminous Landscape and saw that part two of Alan Briot's Landscape Blurs tutorial had recently been posted.

After checking all those (getting through the large number of posts and videos that Moose Peterson makes each week takes quite a while), I added my lenses to my list of available lenses in my custom XMP File Info panel. I wanted to keep my lens names to some sort of standard so if possible my files would have the same lens name (for a specific lens model) that other users of that lens would have encoded in their files. So rather than just writing the names of my lenses myself, I used the lens names from the Exiftool canon.pm and nikon.pm perl modules and also this excellent list of lenses that Phil had put in the comments in the canon.pm file.

Then I decided to try and set up my Ubuntu virtual machine as a SVN Server. The reason for doing this comes from a few days ago when VMWare Server randomly decided that I couldn't use NAT as a networking option any more. This has meant (no idea why) that Ubuntu can't connect to the host machine, which in turn means that I can't use rsync for backing up files from Ubuntu to the host.

But I can connect from the host to Ubuntu, so with subversion I should just be able to checkout the files in Ubuntu from the host. I downloaded Tortoise SVN for my host, and started following the guide to setting up Subversion on Ubuntu. Then I thought that I should probably backup my existing files before setting up subversion in case it trashes my files or something goes wrong.

However, I couldn't see how I backup anything from the Ubuntu virtual machine. On the VMWare Remote Console, my USB devices were listed, but when I clicked on any of them, all the options, including the connect option were greyed out. In the VMWare Server config webpage, the settings all looked okay, and USB was set to connect devices automatically.

So doing a bit of googling, I first found the suggestion to add
usb.present = "TRUE"
usb.generic.autoconnect = "TRUE"

to the .vmx file for the Virtual Machine. My vmx file already had usb.present = "TRUE", so I added the other line, but the USB device options were still greyed out.

The next suggestion I read said that in the virtual machine settings on the VMware Server configuration web page there was a USB icon above the Tasks and Events tabs. Then click the icon and the drop down will display the USB devices with a check box next to them. Check the box and the device will disconnect from the host and appear in the VM. Now this did do something in that Vista said it was installing VMWare USB drivers, but the USB mass storage device did not appear in the Ubuntu Virtual Machine, and the USB device options in the VMWare Remote Console were still greyed out.

Next I read that in Vista the VMWare USB drivers aren't installed automatically, and you need to install them by right clicking the vmusb.inf file in the VMWare Server program folder, and choosing 'install'. But when I tried this, I got a message
The INF file you selected does not support this method of installation


Lastly, I tried the suggestion of installing a program called 'Windows Enabler' that enables greyed out options. Amazingly, this worked.

Backing up my home folder to a Sandisk Extreme III CompactFlash card took quite a long time, and I got quite a lot of errors despite executing cp as a super user. Anyway, eventually it finished, and it looked like it had backed up all the important files okay. The main things it complained about was symbolic links and nautilus files.

When it was finished I disconnected the USB device, and then tried to use the /home folder as my svn repository so I could easily backup the /home folder. But I got the following error:
svnadmin: Repository creation failed
svnadmin: Could not create top-level directory
svnadmin: '/home' exists and is non-empty


So it looks like I'll have to create a seperate svn folder, then whenever I want to do a backup, copy all my files I want backed up to it. Annoying!

Setting up subversion took me quite a while. I created a new domain for accessing the subversion repository, and then when connecting to it through TortoiseSVN, I was getting an error like
svn: http://ubuntusvn.com/svn/ moved permanently/ to 'http://ubuntusvn.com/svn/' ; please relocate

After some googling I found that the svn root must be outside your site root. For setting up subversion on ubuntu, I used the Ubuntu subversion help page and Install Subversion with Web Access on Ubuntu. I found that when trying to access the site via SSL though, I was getting a 404 page from my pog website.

Googling found the answer to that pretty quickly though: Wildcard SSL multiple sites under same IP. All I needed to do was to add the line NameVirtualHost *:443 to /etc/apache2/ports.conf as described on that page.

So now I can connect via https to my Ubuntu virtual machine subversion repository from my Vista host using TortoiseSVN. Only thing is, I'm not sure how to actually add files to the repository so that TortoiseSVN can download them to Vista. The readme file in the svn repository folder says
Do not add, delete, or modify files here unless you know how to avoid corrupting the repository.

So I guess it's not as simple as just copying the folders I want to the repository folder. I'll have to look at that tomorrow.

I'm just listening to World Wide Message Tribe at the moment, pretty good really. It sounds weird how their english accents really stick out, I guess I'm just so used to listening to and watching U.S. stuff almost exclusively.

In the evening I had a break from trying to setup subversion, I went in the garden for about an hour and took a few photos. Unfortunately I don't think I really got any good photos again. Although it's been pretty cool today, and it was quite dark/no sun this evening, the flies were still pretty active or in positions where it was hard to get a decent shot.

The weather today was a mixture of cloud, sun and rain. It rained quite a few times again.

Food
Breakfast: Lime marmalade toast sandwich; cup o' tea.
Dinner: Chicken Fajita; rice; iceberg lettuce. Pudding was lemon Sorbet. Coffee; Custard Cream; Dark chocolate digestive; easter egg ball thing; piece of Sainsbury's caramel chocolate; some easter egg.
Tea: Mature cheddar cheese with iceberg lettuce sandwich; grapes; home-made butterfly cake; fake caramel Rocky; cup o' tea.

No comments: