Duplicating virtual machines using SysPrep

One of the joys of virtualisation is the flexibility afforded by the ability to copy virtual machine files around the network for backup purposes or just to create a new machine (especially with Microsoft’s new Virtual Server licensing arrangements). Unfortunately, just as for “real” computers, simple file copies of Windows-based virtual machines can cause problems and are not supported (see Microsoft knowledge base article 162001).

All is not lost though, as Microsoft does support the duplication of virtual hard disks using the system preparation tool (SysPrep) and Megan Davis has written about sysprepping virtual machines on her blog. I tested it today and it works really well – basically a 3 step process of:

  1. Install and configure a source virtual machine as required (i.e. operating system installed, virtual machine additions installed, service packs and other updates applied), making sure it is in a workgroup (i.e. not a domain member).
  2. Locate the appropriate version of the Windows deployment tools (I used the ones from the \support\tools\deploy.cab file on a Windows Server 2003 CD) and create an answer file (C:\sysprep\sysprep.inf). Then copy the sysprep.exe and setupcl.exe deployment tools to C:\sysprep.
  3. Run SysPrep to reseal and shut down the guest operating system, then copy the virtualmachinename.vhd file to a secure location (make it read-only to prevent accidental overwrites, but also apply appropriate NTFS permissions). This file can then be duplicated at will to quickly create new virtual machines with a fully-configured operating system.

For anyone who is unfamiliar with SysPrep, check out Killan’s guide to SysPrep (which, despite claiming not to be written for corporate administrators or OEM system builders, seems like a pretty good reference to me).

Toshiba PX1223E-1G32 320GB External Hard DiskIncidentally, there are major performance gains to be had by moving virtual machines onto another disk (spindle – not just partition). Unfortunately my repurposed laptop hard disks were too slow (especially on a USB 1.1 connection), so I had to go out this afternoon and buy a USB 2.0 PCI adapter along with a decent external hard disk (a Toshiba 320GB 7200 RPM external USB 2.0 hard drive with 8MB data buffer) – that speeded things up nicely.

Problem adding a virtual machine to Virtual Server 2005 R2

I’ve just been struggling to add a virtual machine back into the Virtual Server administration website (after I changed the search path). Each time I tried, Virtual Server highlighted the .VMC file as a known configuration file but then reported that:

The virtual machine configuration could not be added. A configuration with this name already exists.

Luckily enough, I found Mohammed Adenwala’s problem adding a virtual machine in Virtual Server 2005 blog post which described my problem exactly. After deleting C:\Documents and Settings\All Users\Application Data\Microsoft\Virtual Server\Virtual Machines\virtualmachinename.lnk I was able to add the virtual machine to the administration website and run it.

Today is National Work from Home Day

Recently, with the introduction of new flexible working legislation, there has been more and more attention paid to the subject of home-based working and on the way home this evening I heard that today has been designated National Work from Home Day by Work Wise UK.

As someone who frequently works from home, I don’t need to be convinced of the benefits for me personally (less time commuting; less money spent commuting; less money spent on snacks at work; potential reduction in waistline measurements by not buying up large sections of the Marks and Spencer food hall each lunch time; and actually getting to see my family for a short time each day) but there are also benefits for employers (I’m more productive when I work from home; they don’t need to provide as much office space – just some “hot desks” for the days I am in the office; and my travel expenses are reduced) as well as for the nation as a whole (fewer commuters means less congestion).

Working from home is not for everybody though and some people may find it difficult (particularly if away from the office for long periods, or even on a full-time basis). When my wife left a busy public relations consultancy, to set up her own business working from home, she missed the office “buzz” at first (although now she finds the flexibility to be a major advantage). Personally, I find a quiet environment more conducive to work. What can be difficult though is remaining highly motivated and disciplined to keep up the work momentum when you are on your own all day. Some days I find that I can’t get going – more often I find myself putting in extended hours because I’m “on a roll”. Indeed, whilst the break from distractions is initially welcomed, without the movement of others around it is all too easy for the hours to slip by and it can become hard to separate work and private lives. This can be hard enough in a demanding job, but can be even more difficult when home is also the work place so its still important to plan breaks away from work.

One way to compensate for a lack of human contact whilst spending all day working at home can be making a conscious effort to get out after work (using all that commuting time that has been regained, perhaps taking up a hobby or sport).

It’s also possible to keep in touch with colleagues or clients by phone and email on a regular daily basis but this contact cannot replace face to face contact – a lot of information gets passed on informally when people bump into each other in the office and so it’s important to make an effort to keep in contact with the right people.

Of course, some jobs just cannot be done from home, but as the UK moves from a manufacturing-led economy to a service-led economy there are more and more opportunities for home-working – especially with the expansion of in broadband Internet connectivity and consequential growth in associated technologies like voice over IP.

Unfortunately (for those who have dinosaur managers who insist in staff being present at their desk for a fixed number of hours and at certain times each day) and fortunately (for those who could finish work at the end of the day without spending hours in traffic), we had a mini-heat wave in the UK today and I’m sure not everyone would have heeded the message from Work Wise UK that:

“National Work from Home Day is not intended as a holiday, or an extension of the weekend. Its aim is to let staff, and employers, see just how it could work – how productive we all can be.”