Does the T in T-Mobile stand for “Trouble staying connected”?

It’s getting on for midnight and I’m here in a hotel room in Prague, after fighting to get my Internet connection working (again). There’s a T-Mobile hotspot here but I’ve been having problems with it all week. A few nights back I couldn’t successfully login after buying a 24-hour pass from the hotel, so I returned the pass for a refund. Then, later in the day it seemed to be working again, so I paid 595Kč (about £15, or $30) for another 24-hour pass and was able to browse the ‘net and connect to work over the VPN. Sorted. Or at least I was until I went out for the evening and returned to my room to do some more work only to find that the connection was so slow as to be unusable.

The Google homepage took about 90 seconds to load and everything else timed out – either as unreachable, or coming back as a google search on the domain name.

As Google seemed to be the only site responding (pinging the gateway came back with Reply from gatewayipaddress: Destination net unreachable), I ran a ping test using ping www.google.com -t and after a while I could see that I was losing about half the packets on the wire:

Ping statistics for ipaddress:
Packets: Sent = 157, Received = 74, Lost = 83 (52% loss),
Approximate round trip times in milli-seconds:
Minimum = 45ms, Maximum = 69ms, Average = 49ms

Restarting the computer didn’t seem to help. Neither did disconnecting and and reconnecting the wireless network connection. So I called (T-Mobile’s English helpline for the Czech Republic) but after 35 minutes on hold at international mobile rates (goodness knows how much that cost), I gave up.

Thanks for nothing T-Mobile.

After a week of fighting with this (and a successful call to T-Mobile, during which they admitted that I could have held on all night because there were no English-speaking staff working…), I’ve discovered that logging out manually (from the link on the page displayed after a successful login, or by typing logout. in the browser address bar) works fine; however if T-Mobile log me out for inactivity, and occasionally when the connection suddenly drops of its own accord, the only remedy is to shut down the computer, wait a while (the shortest I’ve tried was about half an hour) and then start up again, after which everything seems to work as expected.

According to the receptionist at the hotel where the hotspot is, only the people in my group (all attending Microsoft training) have reported any problems. Hopefully this information is useful to some other poor soul who’s trying to get their T-Mobile Wi-Fi connection to work.

(For reference, I’m using Windows Vista Enterprise Edition, 32-bit, with an Intel Centrino 2200BG chipset and Internet Explorer 7.0.6000.16546.)

Gadgets for audio-visual interaction with Microsoft’s unified communications products

18 months ago, I attended one the Exchange “12” Ignite training courses – basically Exchange Server 2007 training for early technology adopters. This week I’m refreshing my Exchange knowledge for the release version product but in train-the-trainer style with the intention that I will be training a number of colleagues across the UK and Europe in the coming months to bring them up to speed. I’m also doing the same for Office Communications Server (OCS) 2007.

One of the nice things about this training is that it’s being held in Prague. Our hotel is a few miles out to the east of the city centre but it’s a great place to visit in the evening (and I get to do very little international travel in my job and even less sightseeing, so I’m making the most of it).

The other great thing is that we have each been given a webcam and headset for use with Exchange unified messaging (using the Exchange UM test phone and headset for voice access to Exchange) and Office Communicator (with audio and video from the headset and webcam). I already have a desktop webcam at home (the Microsoft LifeCam VX-6000), as well as the iSight on the Mac, but this is a great portable setup – a Microsoft LifeCam NX-6000 webcam and the geeky but surprisingly comfortable Microsoft LifeChat ZX-6000 wireless headset (which includes the XBox 360 wireless gaming receiver for wireless communications).

Later in the week we should be playing with one of the Microsoft RoundTable conference phones/webcams too.

Oh, I do love my toys!

Checking which version of Java is installed

I just came across a handy way of checking the version of Java that’s installed on a computer. Try typing:

java -version

This seems to work for me on Windows, MacOS and Linux, regardless of the Java vendor (i.e. my RHEL5 box has a GNU version of Java rather than Sun Java, although I’m not sure what happens for the Microsoft Java VM). Of course, if the command is not found, that probably means that you don’t have Java installed (or at least not on your path).

Canon Digital Ixus 70

I’ve just got home to find that Amazon has delivered my new toy – a Canon Digital Ixus 70. Whilst I still take the majority of my photos on my Nikon D70, carrying a body and a couple of lenses (as well as the paraphernalia that going anywhere with two small children involves) is sometimes a bit of a bind – it would be nice to have a good camera that I can slip in a pocket and take anywhere. Perhaps a mobile phone camera would fit the bill, but most of them have pretty poor lenses (necessarily so in a device that size) and when Vodafone
wanted over £300 for me to upgrade to the Nokia N95, I decided that I’d be better off buying a separate camera.

I’ve always liked Canon’s Ixus range of compact cameras – even when they used film – and the Digital Ixus 70 looks great to me. Basically it’s a 7.1MP camera with a nice large screen (and a viewfinder for when the sun makes using the screen impractical) for just over £120. I’ll probably struggle a bit at first with camera shake (as I’m used to holding a nice weighty body and lens) but I have a couple of overseas trips coming up and it will save me a lot of space in my suitcase.

One thing that’s good to see is that Windows Vista recognised and supported the camera without any intervention from me. Less helpful was the fact that Canon only includes a 32MB SD card in the box so I’ve ordered a 2GB Sandisk Extreme III which will provide fast (133x or 20MB/sec) read and write times. That’s coming from play.com 100x30Play.com and is unlikely to be with me before I fly out to Prague on Sunday so, until that arrives, I picked up a cheap SD card from Tesco (1GB for just under a tenner) which can then be used as a spare.

Backing up and restoring a WordPress database

Last year, Alex and I redeveloped the website for a campaign group close to the town where I live. Even though the design was pretty plain (neither of us are designers), from a web development standpoint the site was pretty good – written in semantically correct XHTML and CSS, using PHP for server-side scripting. Alex even wrote a neat navigation bar system and all in all it was a pretty good site.

Unfortunately, I ran out of time for updating the site content and handing it over to a non-technical person to produce new content was never going to be straightforward. I needed something with a user-friendly content management system and so I rewrote the site to use WordPress with pages for the static content and blog posts for the front page news.

Moving all of the content to WordPress didn’t take too long – I still need to sort out a few dead links and develop a decent template, but one of the beauty of WordPress is the ability to customise a site on-the-fly so I can keep on working on those after making the site live – the important thing for me was to let other people create new content without needing any code.

Even so, when the time came to launch the new site, I did need to move my WordPress database from the /dev subdirectory to the root (it is possible to install WordPress in a subdirectory and still let it be accessed from the site root; however I chose not to take that path).

Although WordPress includes an export/import function that would let me export all of the posts via an XML file, then import them to a new WordPress installation, it doesn’t handle all of the database changes (new users, configuration, etc.) and it seems that the best way is to back up the database and then restore it to a new location. Whilst the WordPress Codex provides various methods for backing up a database, the clearest instructions are actually found in a link at the bottom of the Codex article to the Clearpoint Systems blog post on how to backup and restore a WordPress database (using phpMyAdmin). Then, because the database tables will refer to the old location, it is necessary to update the siteurl and home entries in the wp_options table.

It took just a few seconds to backup the database, restore it to a new WordPress installation, and make the changes necessary to make the site accessible again. Finally, all that was required then was to upload any edited theme files and plugins to the appropriate locations in the WordPress folder structure.

Windows service pack roadmap

Those of us whose history goes back to Windows NT remember when a service pack was exactly what its name suggests – no new features, just bug fixes, thoroughly tested (usually) – and when application of the latest service pack was no big deal (application of any other updates was not normally required, unless addressing a specific issues). Today the landscape is different, with irregular service packs often bringing major operating system changes and requiring extensive testing, and frequent updates issued on the second Tuesday of almost every month.

A couple of weeks ago I was at a Microsoft event where one of the presenters (Microsoft UK’s James O’Neill) suggested that service packs are irrelevant and that they actually serve to put some people off deploying new operating system releases. To be fair to James, he was specifically talking about the “don’t deploy until the first service pack has shipped” doubters and to some extent he is right – the many updates that are applied to a Windows Vista installation today have provided numerous incremental improvements to the operating system since the original RTM last year. Even so, I can’t help thinking that Microsoft has muddied the water to some extent – I always understood that service packs had a higher level of integration testing than individual updates but it seems the current Microsoft advice is to apply all applicable “patch Tuesday” updates but only to apply other hotfixes (those updates produced to patch a specific customer scenario) where they are absolutely necessary.

Regardless of this confusion around the different forms of update, service packs are not dead – far from it – with both Windows Vista SP1 and Windows XP SP3 in beta at the time of writing. Although largely update rollups, these service packs do introduce some new features (new networking features for XP, and a kernel change for Vista to bring it in line with Windows Server 2008) but I’ve been of the opinion for some time now that XP SP3 is long overdue.

Going forward, it’s interesting to note that Windows Server 2008 is expected to launch with SP1 included. If that sounds odd, remember that both Windows Vista and Windows Server 2008 were originally both codenamed Longhorn and that they are very closely related – it’s anticipated that the next Windows service pack (let’s call it SP2 for the sake of argument) will be equally applicable to both the client and server operating system releases.

ROI, TCO and other TLAs that the bean counters use

A few days ago I posted a blog entry about Microsoft infrastructure optimisation and I’ve since received confirmation of having been awarded ValueExpert certification as a result of the training I received on the Alinean toolset from Alinean’s CEO and recognised ROI expert Tom Pisello.

One of the things that I’ve always found challenging for IT infrastructure projects has been the ability to demonstrate a positive return on investment (ROI) – most notably when I was employed specifically to design and manage the implementation of a European infrastructure refresh for a major fashion design, marketing and retail organisation and then spent several months waiting for the go-ahead to actually do something as the CIO (based in the States) was unconvinced of the need to spend that sort of money in Europe. I have, on occasion, used a house-building analogy whereby a solid IT infrastructure can be compared to the plumbing, or the electrical system – no-one would consider building a house without these elements (at least not in the developed world) and similarly it is necessary to spend money on IT infrastructure from time to time. Sadly that analogy isn’t as convincing as I’d like, and for a long while the buzzword has been “total cost of ownership” (TCO). Unfortunately this has been misused (or oversold) by many vendors and those who control the finances are wary of TCO arguments. With even ROI sometimes regarded as a faulty measurement instrument, it’s interesting to look at some of the alternatives (although it should be noted that I’m not an economist).

Looking first at ROI:

ROI = (benefits – investments)/investments x 100%

Basically, ROI is looking to see that the project will return a greater financial benefit than is invested in order to carry it out. On the face of it, ROI clearly describes the return that can be expected from a project relative to the cost of investment. That’s all well and good but for IT projects the benefits may vary from year to year, may be intangible, or (more likely) will be realised by individual business units using the IT, rather than by the IT department itself – they may not even be attributed to the IT project. Furthermore, because all the benefits and costs are cumulative over the period of analysis, ROI fails to take into account the value of money (what would happen if the same amount was invested elsewhere) or reflect the size of the required investment.

To try and address the issue of the value of money, net present value (NPV) can be used – a figure used to determine what money spent today would be worth in future, given a defined interest rate. The NPV formula is a complex one as it takes into account the cost of money now, next year, the year after and so on for the entire period of analysis:

NPV = I0 + (I1/(1+r)) + (I2/(1+r)2) + … + (In/(1+r)n)

(where I is the net benefit for each year (cash flow) and r is the cost of capital – known as the discount rate).

The theory is that future benefits are worth less than they would be today (as the value of money will have fallen). Furthermore, the discount rate may be adjusted to reflect risk (risk-adjusted discount rate). NPV will give a true representation of savings over the period of analysis and will recognise (and penalise) projects with large up-front investments but it doesn’t highlight how long it will take to achieve a positive cash flow and is only concerned with the eventual savings, rather than the ratio of investment to savings.

That’s where risk-adjusted ROI comes in:

Risk-adjusted ROI = NPV (benefits – investments) / NPV (investments).

By adjusting the ROI to reflect the value of money, a much more realistic (if less impressive) figure is provided for the real return that a project can be expected to realise; however, just like ROI, it fails to highlight the size of the required investment. Risk-adjusted ROI does demonstrate that some thought has been put into the financial viability of a project and as a consequence it can aid with establishing credibility.

Internal rate of return (IRR) is the discount rate used in NPV calculations in order to drive the NPV formula to zero. If that sounds like financial gobbledegook to you (as it does me), then think of it as the value that an investment would need to generate in order to be equivalent to an alternative investment (e.g. keeping the money in the bank). Effectively, IRR is about opportunity cost and whilst it is not widely used, a CFO may use it as a means of comparing project returns although it neither indicates the level of up-front investment required nor the financial value of any return . Most critically (for me), it’s a fairly crude measure that fails to take into account strategic vision or any dependencies between projects (e.g. if the green light is given to a project that relies on the existence of some infrastructure with a less impressive IRR).

Finally, the payback period. This one’s simple – it’s a measure of the amount of time that is taken for the cumulative benefits in a project to outweigh the cumulative investments (i.e. to become cash flow positive) – and because it’s so simple, it’s often one of the first measures to be considered. Sadly it is flawed as it fails to recognise the situation where a project initially appears to be cash flow positive but then falls into the red due to later investments (such as an equipment refresh). It also focuses on fast payback rather than strategic investments.

As can be seen, none of these measures are perfect but each organisation will have it’s preferred method of measuring the success (or failure) of an IT project in financial terms. Indeed, each measure may be useful at a different level in an organisation – an IT manager focused on annual budgets may not be concerned with the cost of money but will want a fast payback and an impressive ROI whereas the CIO may be more concerned with the risk-adjusted ROI and the CFO may only consider IRR. It’s worth doing some homework on the hurdle rates that exist within an organisation and, whilst I may not be an expert in financial management, sometimes it doesn’t hurt to understand the language that the bean counters use.

Secure online backup from Mozy

Mozy logoA few weeks back I was discussing backups with a couple of my colleagues. I’ve commented before that, despite nearly losing all of my digital photos and my entire iTunes library, I’m really bad at backing up my data (it’s spread across a load of PCs and I almost never have it in a consistent enough state to back up). I had thought that Windows Home Server would be my saviour, but Microsoft rejected my feedback requests for Mac and Linux client support so that won’t work for me. Besides which, I should really keep an offsite copy of the really important stuff. One of my colleagues suggested that I joined in a scheme he was setting up with remote transfers between friends (effectively a peer-to-peer network backup) but then another recommended Mozy.

Mozy? What’s that?

For those who haven’t heard of it (I hadn’t, but it does seem to be pretty well known), Mozy is an offline backup service from Berkeley Data Systems (who were purchased by EMC last week). Available as a free service with 2GB of storage (and an extra 256MB per referral – for both the referrer and the new customer – my referral code is L8FPFL if anyone would like to help out…), as a paid service with unlimited storage for $4.95 a month (per computer), or as a professional service for $3.95 a month (per computer) plus $0.50 per GB of storage, it seems there’s an option for everyone – although it is worth understanding the differences between Mozy Home and Mozy Pro.

With clients support for most Windows versions (including Vista) and Mac OS X (still in beta), data is protected by the Mozy client application using 448-bit Blowfish encryption (with a user-supplied key or one from Mozy) and then transferred to the Mozy servers over an HTTPS connection using 128-bit SSL. Upload speeds are not fast on my ADSL connection and there is some impact on performance but I can still use the web whilst I’m uploading in the background (in fact I have a a backup taking place as I’m writing this post). Also, once the first backup has taken place, Mozy only copies changed blocks so subsequent backups should be faster. The only problem that I found (with the Mac client – I haven’t tried on Windows yet) was that it uses Spotlight searches when presenting backup sets so if you have recently had a big clearout (as I did before backing up), the size of each backup set may be out of date (Apple support document 301562 offers some advice to force Spotlight to re-index a folder).

I should highlight that backup is only half the story – the Mozy client has a simple interface for browsing files and selecting those that need to be restored. There’s also a web interface with browsing based either on files or on backup sets and the Mozy FAQ suggests that Mozy can ship data for restoration using DVDs if required (for a fee).

Whilst Mozy has received almost universal acclaim, not everyone likes it. For me it’s perfect – an offline copy of my data but it doesn’t do versioning and it will assume that if I delete a file then after 30 days I won’t want it back. I think that’s fair enough – if I have a catastrophic failure I generally know about it and can restore the files within that month. As for versioning, why not have a local backup with whatever controls are considered necessary and use Mozy as the next tier in the backup model? The final criticism is about Mozy’s potential to access files – that’s purely down to the choice of key. Personally, I’m happy with the idea that they can (in theory) see the pictures of my kids and browse the music/videos in my library – and if I wasn’t, then I could always use my own private key to encrypt the data.

I’m pretty sure that I’ll be moving to the paid MozyHome product soon but I wanted to try things out using MozyFree. Based on what I’ve seen so far, using Mozy will be money well spent.

Controlling Virtual Server 2005 R2 using Windows PowerShell

One of my jobs involves looking after a number of demonstration and line of business servers running (mostly) on Virtual Server 2005 R2. Because I’m physically located around 90 miles away from the servers and I have no time allocated to managing the infrastructure, I need to automate as much as possible – which means scripting. The problem is that my scripting abilities are best described as basic. I can write batch files and I can hack around with other people’s scripts – that’s about it – but I did attend a Windows PowerShell Fundamentals course a few weeks back and really enjoyed it, so I decided to write some PowerShell scripts to help out.

Virtual Server 2005 R2 has a Component Object Model (COM) API for programmatic control and monitoring of the environment (this is what the Virtual Server Administration web interface is built upon). For a quick introduction to this API, Microsoft has an on-demand webcast (recorded in December 2004), where Robert Larson explained using the Virtual Server COM API to create scripts to automate tasks like virtual machine (VM) creation, configuration, enumeration, and provisioning VMs.

The Virtual Server COM API has 42 interfaces and hundreds of calls; however the two key interfaces are for virtual machines (IVMVirtualMachine) and the Virtual Server service (IVMVirtualServer). Further details can be found in the Programmers Guide (which is supplied with Virtual Server) and there is a script repository for Virtual Server available on the Microsoft TechNet website.

Because the scripting model is based on COM, developers are not tied to a specific scripting language. This means that, theoretically, Windows PowerShell can be used to access the COM API (although in practice, my PowerShell scripts for Virtual Server are very similar to their VBScript equivalents).

Every script using the Virtual Server COM API needs to initiate the VirtualServer.Application object. For Visual Basic, this would mean calling:

Set objVS=CreateObject("VirtualServer.Application)

Because I want to use PowerShell, I have to do something similar; however there is a complication – as Ben Armstrong explains in his post on controlling Virtual Server through PowerShell, PowerShell is a Microsoft.NET application and as such does not have sufficient priviledges to communicate with the Virtual Server COM interfaces. There is a workaround though:

  1. Compile the C# code that Ben supplies on his blog to produce a dynamic link library (.DLL) that can be used to impersonate the COM security on the required object (I initially had some trouble with this but everything was fine once I located the compiler). I placed the resulting VSWrapperForPSH.dll file in %userprofile%\Documents\WindowsPowerShell\
  2. Load the DLL into PowerShell using [System.Reflection.Assembly]::loadfrom("%userprofile%\Documents\WindowsPowerShell\VSWrapperForPSH.dll") > $null (I do this in my %userprofile%\Documents\WindowsPowerShell\profile.ps1 file as Ben suggests in his follow-up post on PowerShell tweaks for controlling Virtual Server).
  3. After creating each object using the Virtual Server COM API (e.g. $vs=New-Object –com VirtualServer.Application –Strict), set the security on the object with [Microsoft.VirtualServer.Interop.PowerShell]::SetSecurity($vs). Again, following Ben Armstrong’s advice, I do this with a PowerShell script called Set-Security.ps1 which contains the following code:


    Param($object)
    [Microsoft.VirtualServer.Interop.PowerShell]::SetSecurity($object)

    Then, each time I create a new object I call set-security($objectname)

Having got the basics in place, it’s fairly straightforward to manipulate the COM objects in PowerShell and I followed Ben’s examples for listing registered VMs on a given host, querying guest operating system information and examining .VHD files. I then spent quite a lot of time writing a script which will output all the information on a given virtual machine but although it was an interesting exercise, I’m not convinced it has much value. What I did learn was that:

  • Piping objects through Get-Member is can be useful for understanding the available methods and properties.
  • Where a collection is returned (e.g. the NetworkAdapters property on a virtual machine object), individual items within the collection can be accessed with .item($item) and a count of the number of items within a collection can be obtained with .count, for example:

    Param([String]$vmname)

    $vs=New-Object -com VirtualServer.Application -strict
    $result=Set-Security($vs)

    $vm=$vs.FindVirtualMachine($vmname)
    $result=Set-Security($vm)

    $dvdromdrives=$vm.DVDROMDrives
    $result=Set-Security($dvdromdrives)
    Write-Host $vm.Name "has" $dvdromdrives.count "CD/DVD-ROM drives"

Of course, System Center Virtual Machine Manager (SCVMM) includes it’s own PowerShell extensions and therefore makes all of this work totally unnecessary but at least it’s an option for those who are unwilling or unable to spend extra money on SCVMM.

Compiling C# code without access to Visual Studio

I’m not a developer and as such I don’t have a copy of Visual Studio but this evening I needed to compile somebody else’s C# code to produce a dynamic link library (DLL) and call it from a Windows PowerShell script. Somewhere back in my distant past I recall using Turbo Pascal, Borland C++, early versions of Visual Basic and even Modula-2 to make/link/compile executables but I’ve never used a modern compiled language (even on Linux I avoid rolling my own code and opt for RPM-based installations). So I downloaded and installed Visual C# 2005 Express Edition (plus service pack 1, plus hotfix to make it run on Windows Vista).

Sadly that didn’t get me anywhere – I’m totally confused in the Visual Studio IDE and anyway, the instructions I had told me to access the Visual Studio command prompt and run csc /t:library filename.cs.

It turns out that the Visual Studio Express Editions don’t include the Visual Studio command prompt but in any case, the C# compiler (csc.exe) is not part of Visual Studio but comes with the Microsoft.NET framework (on my system it is available at %systemroot%\Microsoft.NET\Framework\v2.0.50727\). Once I discovered the whereabouts of the compiler, compiling the code was a straightforward operation.

As for what I did with the DLL and PowerShell, I’ll save that for another post.