Great tool for resizing virtual hard disks

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Over the weekend, I wanted to build a guest VM quickly to show the effects of having the Integration Components installed (cf. one without) so I downloaded a Windows Vista Evaluation virtual machines from the Microsoft VHD Test Drive programme.

Unfortunately the supplied VHD only had 3GB of free disk space, so I couldn’t apply SP1 in order to install the Hyper-V integration components and, even though it was a dynamically expanding VHD, it had a maximum size set of 16GB.

VHD ResizerThat’s when I stumbled across a great tool for resizing virtual hard disk files – VHD Resizer (formerly VHD Expander). After telling it the source and destination file names, then leaving it to work it’s magic for a while, I attached the new (larger) VHD to my VM, expanded the volume in Disk Manager and was greeted with extra hard disk space.

This tool is definitely one to remember.

Cooliris

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

As I put more and more of my portfolio onto Flickr, I’ve been looking for a decent Flickr application for my iPhone and my friend Karen recommended one last week.

Cooliris iPhone application browsing FlickrCalled Cooliris, the application is available both as a browser plugin and as an iPhone application and is actually far more capable than just a front-end application for a single website as it can be used to create a “3D wall” for searching and viewing media from a variety of sites.

I’m not so convinced about the full application (it looks nice, but a couple of quick searches failed to come up with content that I know exists); however it’s a pretty impressive as an iPhone application to browse my Flickr photostream!

Another Microsoft internal tool makes its escape: RichCopy

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

My colleague Keith Robertson sent out an e-mail this morning which highlighted the release of a Microsoft tool that was formerly for internal use only – RichCopy. There’s more information in Joshua Hoffman’s article in the April 2009 edition of TechNet magazine but think of it as RoboCopy on steroids:

“RichCopy is a multi-threaded robust utility to copy files between locations. Importantly, it is multi-threaded and can recover from broken links and file locks etc. It also supports file masks – making it great for copying a users directories – but not their MP3 and movie collection…”

I can see that this could work well on a LAN but, for those looking to move large files across a WAN (or even t’Internet… where the tubes may be a little blocked at times), it may be worth taking a look at using BITS for scheduled transfers, together with Mads Klinkby’s BITSync tool.

Archive Google Mail to a Mac using getmail

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Late last year I questioned the wisdom of trusting critical data to the cloud and cited Google Mail as an example. Whilst the Google Mail service is generally reliable, there have been some well-publicised instances of failure (including data loss). I shouldn’t be too alarmed by that – for many things in life you get what you pay for and I pay Google precisely nothing (although they do get to build up a pretty good profile of my interests against which to target advertising…). So, dusting off the motto from my Scouting days (“Be Prepared”), I set about creating a regular backup of my Google Apps mail – just in case it ever ceased to exist!

I already use the Apple Mail application (mail.app) for IMAP access but I have some concerns about mail.app – it’s failed to send messages (and not stored a draft either) on at least two occasions and basically I don’t trust it! But using Mac OS X (derived from BSD Unix) means that I also have access to various Unix tools (e.g. getmail) and that means I can take a copy of my Google Mail and store it in maildir or mbox format for later retrieval, on a schedule that I set.

The first step is to install some Unix tools on the Mac. I chose DarwinPorts (also known as MacPorts). After running the 1.7.0 installer, I fired up a terminal and entered the following commands:

su - Administrator
cd /opt/local/bin
sudo ./port -d selfupdate

This told me that my installation of MacPorts was already current, so set about installing the getmail port:

sudo ./port install getmail

The beauty of this process is that it also installed all the prerequisite packages (expat, gperf, libiconv, ncursesw, ncurses, gettext and python25). Having installed getmail, I followed George Donnelly’s advice to create a hidden folder for getmail scripts and a maildir folder for my GmailArchive – both inside my home directory:

mkdir ~/.getmail
mkdir ~/GmailArchive/ ~/GmailArchive/new ~/GmailArchive/tmp ~/GmailArchive/cur

I then created and edited a getmail configuration file at ~/.getmail/getmailrc.mygmailaccount) and entering the following settings:

[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = googleaccountname
password = googleaccountpassword

[destination]
type = Maildir
path = ~/GmailArchive/

[options]
verbose = 2
received = false
delivered_to = false
message_log = ~/.getmail/gmail.log

I tested this by running:

/opt/local/bin/getmail -ln --rcfile getmailrc.gmailarchive

but was presented with an error message:

Configuration error: SSL not supported by this installation of Python

That was solved by running:

sudo ./port install py25-socket-ssl

(which installed zlib, openssl and py25-socket-ssl), after which I could re-run the getmail command and watch as my terminal session was filled with messages being downloaded (and the folder at ~/GmailArchive/new started to fill up). Then I saw a problem – even though I have a few thousand messages, I noticed that getmail was only ever downloading the contents of my Inbox.

Eventually, I solved this by adding the following line to the [retriever] section of the getmail configuration file:

mailboxes = ("[Google Mail]/All Mail",)

This took a while to work out because many blog posts on the subject suggest that the mailbox name will include [GMail] but I found I needed to use [Google Mail] (I guess that could be the difference between GMail and the Google Mail service provided as part of Google Apps). After making the change I was able to download a few thousand messages, although it took a few tries (the good news is that getmail will skip messages it has already retrieved). Strangely, although the Google Mail web interface says that there are 3268 items in my All Mail folder, getmail finds 5320 (and, thankfully, doesn’t seem to include the spam, which would only account for 1012 of the difference anyway).

In addition, the getmail help text explains that multiple mailboxes may be selected by adding to the tuple of quoted strings but, if there is just a single value, a trailing comma is required.

Having tested manual mail retrieval, I set up a cron job to retrieve mail on a schedule. Daily would have been fine for backup purposes but I could also schedule a more frequent job to pull updates every few minutes:

crontab -e

launched vim to edit the cron table and I added the following line:

4,14,24,34,44,54 * * * * /opt/local/bin/getmail -ln --rcfile getmailrc.gmailarchive

I then opened up a terminal window and (because running lots of terminal windows makes me feel like a real geek) ran:

tail -f ~/.getmail/gmail.log

to watch as messages were automatically downloaded every 10 minutes at 4, 14, 24, 34, 44, and 54 minutes past the hour.

This also means that I get 6 messages an hour in my the local system mailbox (/var/mail/username) to tell me how the cron job ran so I chose to disable e-mail alerting for the cron job by appending >/dev/null 2>&1 to the crontab entry.

Many of the posts on this subject suggest using POP to download the mail, but Google limits POP transfers so it will require multiple downloads. Peng.u.i.n writes that IMAP should help to alleviate this (although that wasn’t my experience). He also suggests using several mbox files (instead of a single mbox file or a maildir) to backup mail (e.g. one file per calendar quarter) and Matt Cutts suggests backing up to mbox and maildir formats simultaneously:

[destination]
type = MultiDestination
destinations = (’[mboxrd-destination]‘, ‘[maildir-destination]‘)

[mboxrd-destination]
type = Mboxrd
path = ~/GmailArchive.mbox

[maildir-destination]
type = Maildir
path = ~/GmailArchive/

If you do decide to use a mbox file, then it will need to be created first using:

touch ~/GmailArchive.mbox

In Chris Latko’s post on pulling mail out of Gmail and retaining the labels, he describes some extra steps, noteably that the timestamps on mail are replaced with the time it was archived, so he has a PHP script to read each message and restore the original modification time.

Aside from the MacPorts installation, the process is the same on a Unix/Linux machine and, for Windows users, Gina Trapani has written about backing up GMail using fetchmail with Cygwin as the platform.

A source of great icons for presentation materials

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

My colleague Alan Dodd (who works as the technology lead for Unix/Linux at the same company where I look after the Microsoft infrastructure) let me in on the source for his super-cool presentation graphics this week… Gnome/KDE icon sets! Sites like GNOME Look and KDE Look are full of fantastic artwork (some of it scalable), much of which is available under various copyleft licensing agreements and is great for illustrating otherwise dull PowerPoint slides that try to explain IT infrastructure concepts.

Hyper-V Q&A

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Windows Server 2008 Hyper-VMicrosoft’s hypervisor-based virtualisation platform (Hyper-V) has been around for a few months now and, even though there is a whole host of information out there on the web, it’s still a source of confusion for many.

This post is a list of questions and answers for those trying to get started with the Microsoft hypervisor. It is based, in part, on information provided during the Hyper-V technology adoption programme and has been used with the kind permission of Microsoft Windows Virtualization product team, supplemented with additional information where appropriate.

Installation

Q. What are my options for installing Hyper-V?
A. Hyper-V is available as a role for x64 Editions of Windows Server 2008 Standard, Enterprise or Datacentre editions (i.e. not for 32-bit x86 or Itanium architectures, nor for web edition). The Hyper-V role is supported on either a server core or a full installation; however server core is recommended, due to its increased security. In addition, there is a standalone version of Hyper-V – Microsoft Hyper-V Server 2008 – designed for organisations who would like the benefits of Hyper-V but who do not run Windows (a comparison of features in the various Hyper-V products is available).

Q. I installed Hyper-V from the Windows Server 2008 media but it seems to be a pre-release version. Is that right?
A. Windows Server 2008 shipped with a beta version of Hyper-V. It is necessary to install an update to bring the Hyper-V components up to their RTM level, as well as to update the integration components in the virtual machines. John Howard has blogged extensively on obtaining Hyper-V, changes at RTM, upgrade considerations and more.

Q. How can I tell which version of Hyper-V I have installed?
A. Sander Berkouwer has provided some excellent advice for determining the installed version of Hyper-V on his blog (I also linked to some useful resources for those looking to upgrade a pre-release copy of Hyper-V).

Q. I’m not entirely comfortable with server core – how can I install the Hyper-V role?
A. John Howard has created step by step guidance on installing Hyper-V on Server Core. The basic steps are:

  1. After installation, logon to Windows and set a password.
  2. Configure the computername, firewall exceptions, remote desktop connection and then restart using the following commands (for more information on administering server core, see a few commands to get started with Server Core and there are also some alternative utilities available – including the HVconfig utility from Hyper-V Server):
    netdom renamecomputer %computername% /NewName:newcomputername
    netsh advfirewall firewall set rule group="Remote Administration" new enable=yes
    cscript \windows\system32\scregedit.wsf /ar 0
    cscript \windows\system32\scregedit.wsf /cs 0
    shutdown /t 0 /r
  3. Update Hyper-V to the RTM version (see Microsoft knowledge base article 950050)
  4. Enable the Hyper-V role using ocsetup Microsoft-Hyper-V
  5. Restart the computer using shutdown /t 0 /r

Q. Hyper-V relies on hardware assisted virtualisation. How can I tell if my hardware supports this?
A. Michael Pietroforte has written about the free tools that AMD and Intel provide to indicate whether a processor has the necessary virtualisation functionality and John Howard has also written about enabling hardware assisted virtualization in the BIOS. If your machine does not have the option (and some do not!), try a BIOS update.

Performance

Q. How does Hyper-V’s disk input/output (IO) compare with a non-virtualised solution?
A. In order to ensure that IO will never be reported complete until it has been written to the physical disk, Hyper-V does not employ any additional disk caching other than that provided by the guest operating system. In certain circumstances, a Hyper-V VM can appear to provide faster disk access than a physical computer because Hyper-V batches up multiple requests and coalesces interrupts for greater efficiency and performance. In Microsft’s internal testing they also found that:

  • Pass-through disks can sustain physical device throughput.
  • Fixed VHDs can also sustain physical device throughput at the cost of slightly higher CPU usage.
  • Dynamically expanding and differencing VHDs do not usually hit physical throughput numbers due to the overhead of expansion and greater likelihood of disk fragmentation.

Q. How can I measure performance in Hyper-V?
A. The MSDN website features a section on measuring performance on Hyper-V (specifically relating to running BizTalk Server in a VM but equally applicable to many other workloads).

Q. Sometimes, my virtual machines are paused automatically – why does this happen?
A. Rather than let a virtual machine run out of disk space, Hyper-V will pause the VM if the server is running critically low on space. In addition, an event (ID 16050) is written to the Hyper-V VMMS log.

Synthetic device driver model

Q. I’m confused about the various versions of the integration components (ICs) for virtual machines. Why does each release of Hyper-V have it’s own ICs?
A. Integration Components (ICs) are version specific – i.e. the versions used within the child partitions must match the version of Hyper-V that is running in the parent partition (Windows Server 2008 RTM was shipped with the Hyper-V Beta ICs). The Hyper-V RTM upgrade package (see Microsoft knowledge base article 950050) includes the updates for both the parent and child partitions. In addition, there are Hyper-V ICs for Linux and Professional, Enterprise and Ultimate versions of the Windows 7 and Windows Server 2008 R2 betas already come with Hyper-V integration components installed.

Q. Is there a method to incorporate the Hyper-V synthetic devices with Windows Preinstallation Environment (WinPE) for servicing?
A. Performing maintenance on a Hyper-V host from within WinPE represents a challenge for systems administrators in that, without the integration components, virtual hard disks (.VHDs) must be connected to the IDE controller (limiting the number of VHD’s that can be used at any given point in time) and legacy network adapters might be required in order to provide network access. Mike Sterling has a great blog post on using the Hyper-V integration components with WinPE (using the Windows Automated Installation Kit to create a custom WinPE image including the appropriate files extracted from the Hyper-V integration services setup disk). Attaching the resulting .ISO image to a VM and powering it on should provide full access to all synthetic devices.

Management

Q. What tools does Microsoft provide to manage Hyper-V?
A. Out of the box, Microsoft provides a Microsoft Management Console (MMC) snap-in (Hyper-V Manager). This snap-in is also available for x86 (32-bit) versions of Windows Server 2008, as well as for Windows Vista SP1 (x86 or x64 – see also Microsoft knowledge base article 952627). If you have the management tools installed on a Windows Vista machine then you might also find Tore Lervik’s Hyper-V Monitor Gadget for the Windows Sidebar useful.

Whilst Hyper-V Manager is adequate for managing a single host (locally or remotely), remote management with System Center Virtual Machine Manager (SCVMM) 2008 provides a centralised management console, designed to manage thousands of VMs across hundreds of physical servers running Virtual Server 2005, Hyper-V or even VMware ESX via VMware Virtual Center.

Hyper-V can also be managed using Windows Management Instrumentation (WMI), for example in a Windows PowerShell script and there is an open source PowerShell Management Library for Hyper-V available on CodePlex.

Q. My version of Windows Server 2008 does not seem to have the Hyper-V Management tools available.
A. Windows Server 2008 SKUs without Hyper-V or for other architectures (i.e. 32-bit x86 and Itanium) do not include the Hyper-V management tools.

Q. What else can SCVMM offer that the standard management tools do not?
A. Information on SCVMM may be found on the Microsoft website but the main features include:

  • Physical to virtual (P2V) and limited virtual to virtual (V2V) conversion (V2V is from VMware to Hyper-V – for Virtual Server to Hyper-V there is a free tool available (Matthijs ten Seldam’s VMC to Hyper-V Import Tool) and, for conversions from other products or back to physical hardware, various third party tools are available).
  • Orchestration of migration activities (i.e. quick migration for Hyper-V, VMotion for ESX).
  • Intelligent placement of virtual machines.
  • Management of virtual machine templates, virtual hard disks, CD/DVD (.ISO) images, etc.
  • Full integration with Windows PowerShell (with supported PowerShell cmdlets) as well as other System Center products such as System Center Operations Manager and PRO packs.
  • Virtual machine self-service for users to provision their own VMs, based on a quota system.

Q. I have a fully-patched Hyper-V host and SCVMM 2008 installation but SCVMM says my host needs attention. Have I missed something?
A. VirtualBoy Matt McSpirit blogged about a couple of updates required for Hyper-V and BITS when using SCVMM 2008. After installing these and rebooting, everything should be fine.

Q. How can I patch the virtual machines that are held offline (templates, etc.)?
A. Offline VMs may be patched using the Microsoft Offline Virtual Machine Servicing Tool.

Q. I’m trying to configure remote management for Hyper-V and it seems very difficult.
A. It can be! Luckily, John Howard had a few days vacation to use up and the result was a tool called hvremote. You can read more and download the tool on MSDN – but don’t use it if you’re using SCVMM to manage your Hyper-V hosts.

Q. I’m using the Hyper-V Virtual Machine Connection to access the console of one of my Hyper-V virtual machines but every time I press Ctrl+Alt+left to release the mouse (I do not have integration components installed) my screen turns 90°. Have i been infected with a virus?
A. Probably not! Some Intel chipsets use that key combination to rotate the display. Either turn off that functionality in the display driver settings or press Alt+Tab to break out of the VM and change the hotkey in the Hyper-V settings.

Environmental benefits

Q. Virtualisation is often cited as an enabler for green IT – how can that be? Surely I’m just moving the same heat and power requirements into one place?
A. An underutilised server still uses a significant proportion of its maximum power and consolidation of many low-utilisation servers onto a shared infrastructure will normally result in power supplies running more efficiently and a net reduction in power consumption.

By consolidating many servers onto onto a smaller number of servers using virtualisation then many servers may be retired. These older servers are likely to be less efficient than a modern server and will all require cooling, resulting in further power cooling savings.

Whilst disposal of old servers is not very “green”, some servers may be redeployed in scenarios where a physical infrastructure is still required.

Q. Does Hyper-V work in conjunction with the Processor Power Management (PPM) power savings in Windows Server 2008?
A. When the Hyper-V server role is enabled system sleep states (standby and hibernate) are disabled. The major savings in power and cooling requirements are gained by switching servers off and, by viewing overall demand for the entire virtualised infrastructure rather than working at an individual sever level, it is possible to use management technologies to bring servers on and offline in order to meet demand.

Virtual machine settings

Q. With Microsoft Virtual Server, it’s really difficult to access the virtual machine BIOS. Is there still a virtual machine BIOS?
A. Hyper-V VMs do still have a virtual machine BIOS; however, all of the BIOS features (e.g. numlock setting, boot device order, etc.) may be set in the virtual machine configuration or using a script. As a conseqence of this, Microsoft has removed the ability to access the BIOS at boot time.

Q. Hyper-V can import and export its own XML-based VM configurations but not the legacy .VMC format. Is there a way to migrate my Virtual Server and VirtualPC settings to Hyper-V without recreating the configuration manually (I’m not using SCVMM)?
A. As mentioned when discussing V2V migrations above, Matthijs ten Seldam (The author of VMRCplus) was written a VMC to Hyper-V import tool (remove the VM Additions before importing to save effort later).

Storage

Q. Can a virtual machine boot from SAN (FC or iSCSI), NAS, USB disk or Firewire disks (the boot order in the BIOS settings only shows floppy, CD, IDE and network)?
A. Virtual hard disks (VHDs) can be used to boot or run a VM from:

  • Local storage (IDE or SCSI).
  • USB storage (USB key or disk).
  • Firewire storage.
  • SAN Storage Area Network (iSCSI or fibre channel).
  • NAS Network Attached Storage (file share, NAS device).

It’s also possible to assign a non-removable volume (direct attached storage or a SAN LUN) to an IDE channel in the VM settings and to boot from that device.

Q. Is it possible for Hyper-V virtual machines to access USB devices?
A. Not directly and, although many people would like to see this functionality, Microsoft is adamant that this is a client-side virtualisation feature and have no plans to include USB support in the product at this time. There is a workaround, using the Remote Desktop Connection client though (and this approach can also be used for audio).

Q. How can I move VM images to another physical disk?
A. With Hyper-V, the simplest approach I’ve found for moving virtual machines is to export the VM and import it to a new location. Alternatively, you could move the VHD and create a new virtual machine configuration.

Networking

Q. I’m confused by the various network interfaces on my Hyper-V host – what’s going on?
A. It’s not as confusing as it first looks! The parent partition is also virtualised and all communications run via a virtual switch (vswitch). In effect the physical network adapters (pNICs) are unbound from all clients, services and protocols, except the Microsoft Virtual Network Switch Protocol. The virtual network adapters (vNICs) in the parent and child partitions connect to the vswitch. Further vswitches may be created for internal communications, or bound to additional pNICs; however only one vswitch can be bound to a particular pNIC at any one time. Virtual machines can have multiple vNICs connected to multiple vswitches. Ben Armstrong has a good explanation of Hyper-V networking (with pictures) on his blog and I described more in an earlier post on Hyper-V and networking.

Q. Can I use Hyper-V over a wireless connection?
A. Not directly, but there is a workaround, as described in my blog post on Hyper-V and networking.

Q. Is NIC teaming supported?
A. Not by Microsoft, but certain OEMs provide support, and Patrick Lownds has blogged about new Broadcom support for NIC teaming that seems to work with Hyper-V.

Legacy operating system support

Q. The virtual machine settings include a processor option which limits processor functionality to run an older operating system such as Windows NT on the virtual machine. What does this feature actually do?
A. This feature is designed to allow backwards compatibility for older operating systems such as Windows NT 4.0 (which performs a CPUID check and, if CPUID returns more than three leaves, it will fail). By selecting the processor functionality check box Hyper-V will limit CPUID to only return three leaves and therefore allow Windows NT 4.0 to successfully install. It is possible that other legacy operating systems could have a similar issue.

Q. Does this mean that Windows NT 4.0 is supported on Hyper-V?
A. Absolutely not. Windows NT 4.0 is outside its mainstream and extended support lifecycle and is not supported on Hyper-V and no integration components will be released for Windows NT 4.0.

Q. But one of the stated advantages for virtualisation is running legacy operating systems where hardware support is becoming problematic. Does this mean I can’t virtualise my remaining Windows NT computers?
A. The difference here is between “possible” and “supported”. Many legacy (and current) operating systems will run on Hyper-V (with emulated drivers) but are not supported. Windows NT is no longer supported, whether it is running on physical or virtual hardware. Microsoft do highlight that Windows NT 4.0 has been tested and qualified on Virtual Server 2005 and that Virtual Server may be managed (along with Hyper-V and VMware ESX) using System Center Virtual Machine Manager 2008.

Copying files between virtual machines

Q. I want to copy files between Hyper-V virtual machines. Is there a way to do this?
A. Microsoft make a distinction between client-side and server-side virtualisation usage scenarios and note that virtualisation servers are typically managed by a group of administrators who want to deploy a secure, locked down server by default (and do not want additional attack vectors created through virtualisation). This is the reason that Hyper-V does not include shared folder or drag and drop functionality (nor are there any plans to do so at a later date). The options for transferring data from one virtual machine to another are:

  • Setup a virtual network just as you would for physical systems.
  • Use a virtual CD/DVD creation tool and insert a virtual CD/DVD; this can be done while the virtual machine is running.

Microsoft’s stated position is that, in the case of client-side virtualisation, a single user is running a virtualisation product (e.g. Virtual PC) locally ands expects the capability to move files from one virtual machine to another. For this reason, Virtual PC includes shared folder support (but are not set by default).

Q. How does this work if I move a Virtual PC VM with shared folders to a Virtual Server or Hyper-V system?
A. In this case the shared folders guest components won’t load because the required server-side components are not available in Virtual Server or Hyper-V.

Extracting individual files from setup executables

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A while back, I wrote about using a Windows Server 2003 resource kit utility called dvdburn.exe to write ISO images from the command line. I needed to do that on one of my systems today but couldn’t find dvdburn.exe on my software share. It turns out that’s because it is one of many utilities that are embedded within the installer package for the resource kit (rktools.exe). Because the machine in question is my main Hyper-V host, I didn’t want to install unnecessary software on it but I figured the executable file must contain all the necessary resources for setup, so I set about extracting its contents.

First up, I ran rktools.exe /? to see what command line options were available and it confirmed that rktools.exe /c: /t:path would allow me to extract the contents to a path of my choice but when I checked there was an .MSI and two small .CAB files there. The .CAB files can be opened with a zip utility but the .MSI is a little more difficult as msiexec.exe doesn’t appear to have an option to extract the contents of the installer to a folder.

Luckily there is a utility, based on WiX, which will do this for me – Scott Willeke’s Less MSIérables (lessmsi.exe). Using this I could successfully extract the contents of the .MSI without installing the software. Then I could run dvdburn.exe (as I needed) and delete the extracted files without leaving any trace of the Windows Server 2003 Resource Kit’s existence on my system.

Did SpinRite actually save my data?

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

This morning, I shut down the notebook PC that I use for work and set off to meet a colleague. Upon returning, I tried to boot the system but nothing happened. Technically, something happened – but not what I expected – basically Windows would not boot and sometimes it reached the startup screen, sometimes it didn’t. Once or twice I’m sure I saw the once-familiar blue screen of death flash up for a fraction of a second before the PC reset itself. I tried a normal startup as well as last known good configuration, before finally I gave up and tried to recover the system using the Windows Server 2008 DVD but this couldn’t locate an installed copy of Windows to recover. What it would let me do though was get to a command prompt, where attempting to access drive C: returned:

The request could not be performed because of an I/O device error.

That didn’t sound good but I managed to run diskpart.exe and list disk told me that disk 0 was online. Moving on to try list partition told me that the two partitions I expected to see were there but it was list volume that really helped shine a light on the problem – the DVD drive and WinRE volumes showed as healthy but drive C: was reported as being a 110GB Healthy partition of type raw (i.e. not NTFS). At this point, I began to panic. Something had happened to the NTFS and that could mean lost data. I have a reasonably recent backup but the last couple of weeks at work have been mayhem and there was some stuff that I know I don’t have a second copy of.

I could call my company’s IT support number but it normally takes at least a day for a callback; I’d have to take the laptop to a “local” office (a 100 mile round trip); if a system won’t boot, the standard approach is to spend a very limited amount of time trying to fix it (probably none at all for people like me who run a non-standard operating system) before simply wiping the system and installing a new corporate build. That means going back to Windows XP and Office 2003 (which is painful when you are used to Windows Vista/Server 2008/7 and Office 2007), the loss of an activated copy of Windows Server 2008 Enterprise Edition (which is not exactly inexpensive) and also losing my data (the standard build has separate system and data partitions and my build does not… although now I’m starting to reconsider that choice).

I’m pretty sure that the root of this problem is a failing hard disk (after all, it is a “Western Dodgital“) but, without the tools to prove it, I’ve got a snowball’s chance in hell of getting a new one) and, to cut a long story short, when it comes to supporting my non-standard build, I’m on my own (at least unless I can prove that the hardware is faulty).

One of the podcasts that I listen to is “Security Now” and the hosts (Steve Gibson and Leo Laporte) spend far to much time plugging Steve’s SpinRite product. I’ve often wondered if it was any good but was not prepared to spend $89 for speculative purposes – this afternoon I decided that it was time to give it a try.

After paying up, downloading the software, extracting the ISO and creating a bootable CD, I ran SpinRite and performed what is referred to as a “level 2” scan. For the first 20 minutes, SpinRite ran through my disk finding nothing untoward but at the 50% mark it switched into “DynaStat” mode and started trying to identify lost data on one particular sector, slowly narrowing down the unrecoverable bits of the sector. Just this one sector took almost 5 hours and around 2000 samples but all of a sudden SpinRite took off again and finished up the rest of the drive in another 20 minutes. Even though the sector was marked as unrecoverable, a technical support conversation by e-mail confirms that this relates to the data, not the sector. With some trepidation, I restarted the computer, waited with baited breath and have never been so glad to see Windows start checking its disk(s). After a short while, chkdsk was complete and I was presented with a logon screen.

There’s nothing in the Windows event logs to indicate why my system failed to boot so many times this afternoon so it’s difficult to say what the problem was and whether it really was SpinRite that fixed it (although SpinRite did report the SMART data for the drive and there were a number of seek errors, backing up my theory that the hard disk is on its way out). What’s important though is that, as I write this post, Windows Server 2008 is 63% of its way through a backup and all seems to be well. I’m not quite ready to wholeheartedly endorse SpinRite – it does almost sound too good to be true – but, on the face of it, it seems to have recovered enough data on my disk to let Windows boot and for me to gain access to my system. That’s worth my $89 – although somehow I don’t see me getting that particular item through on my expenses…

Mounting ISO images in Windows 7

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

The Windows 7 beta includes the ability to burn CDs/DVDs from ISO images but it doesn’t seem to be able to mount them as volumes. As this beta is supposed to be feature complete, I don’t think it’s very likely that we’ll see this functionality added in future builds (even though rival operating systems can already do it…) but there are some third party alternatives available.

Last week, I (finally) got around to upgrading my netbook from Windows 7 milestone 3 (build 6801) to the beta (build 7000) and, as I didn’t have access to a DVD drive, I used Slysoft Virtual CloneDrive to mount the ISO as a drive, after which I could select the Windows 7 setup.exe from the autorun menu. It did exactly what I needed it to and that, rather lengthy, upgrade process didn’t seem to hiccup at all. From a quick trawl of the ‘net, there is at least one alternative out there (which I haven’t tried) – PowerISO – although this is a chargeable product and Virtual CloneDrive is freeware.

Tracking down and removing unwanted software bundled with a new PC

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

I’ve heard many comments over the years about the volume of crapware installed on new PCs but had not experienced it first hand until yesterday, when I was setting up a new Dell Inspiron 1525.

Even Macs come with some bundled software (e.g. trial versions of Microsoft Office and Apple iWork applications) but I was amazed by the volume of unrequired software that I needed to remove from this machine.

In fact, I think that now I understand why people think Windows Vista is so bad. It’s not Vista at all – its all the various add-ons that the OEMs bundle that confuse the user experience with bizarre interfaces and which generally gunk up the operating system by loading additional applications into memory (Dell even has an application to present a poor imitation of the MacOS X dock to Windows Vista users).  I don’t mind Microsoft Works (it’s useful if you don’t have a copy of Microsoft Office – although it should also be noted that alternative office suites are available); I don’t even mind a 30-day trial of a security suite (even though I think that McAfee, Symantec, et al are preying on the insecurities of vulnerable consumers); but, by way of an example, this is a list of all the items that I removed from the computer I was setting up:

  • Dell Dock
  • PCMService
  • Adobe Reader Speed Launcher
  • Google Toolbar Notifier
  • Tiscali Internet
  • Sonic Update Manager
  • Roxio Express Labeler
  • Remove Empty Program Folders
  • Google Desktop
  • McAfee Security Center
  • Google Toolbar for Internet Explorer
  • NetWaiting
  • QuickSet
  • Browser Address Error Redirector
  • Live! Cam Avatar Creator
  • Internet from BT
  • OutlookAddinSetup
  • MediaDirect
  • Dell-eBay
  • Dell Best of Web
  • Digital Line Detect
  • Roxio Creator DE
  • Microsoft Works
  • Microsoft Office Compatibility Pack
  • Microsoft Office PowerPoint 2007 Viewer
  • GoToAssist

So, how does one go about working out what’s safe to remove and what should stay?  A bit of Googling helps – to try and find out what some of the more esoteric items on the list really are – but there were three tools I found useful whilst cleansing this PC:

  1. First of all – the comically named PC Decrapifier is an excellent piece of software for identifying items that you may wish to remove.
  2. Next up, Autoruns is a Sysinternals tool which may be used to identify any programs configured during Windows startup/logon and can help to identify any remnants of the previous uninstallations.  As all that happens is the delection/selection of a checkbox, the changes made in Autoruns are non-destructive.
  3. Whilst the first two tools are freestanding applications and do not require installation, the third one does – and somewhat ironically the default installation options include the Yahoo! Toolbar (another unnecessary addition).  Even so, CCleaner is useful for clearing away any unused files and registry items (and is easily uninstalled afterwards).

The final piece of the puzzle was removing the PowerPoint 2007 Viewer.  The Control Panel applet to uninstall or change a program didn’t display an uninstall button (just repair) and the source location was missing so even a repair didn’t work.  I downloaded and reinstalled a fresh copy but that still wouldn’t uninstall, so I dropped back to the command line:

powerpointviewer.exe /extract:./powerpointviewer

cd powerpointviewer

msiexec /x ppviewer.msi

Executing these commands extracts the contents of the PowerPoint Viewer installation package to a folder, changes directory into the folder and cleanly removes the application.  After having done that, I installed a full copy of Office on the computer (so I no longer required the viewer).

There is an argument that the payment to the OEMs to bundle this software helps us to pay less for our computers but it’s a lot of work just to strip a pre-installed OS back to the bare operating system, plus any OEM-specific support utilities (the reason for not just wiping the hard disk and starting over).  Thankfully, buying a new PC is not something I do too often – and the removal of the unnecessary items should help me when I’m faced with the inevitable task of supporting this computer following its presentation to a family member in a few days’ time…