How to Migrate Windows XP to VirtualBox VM in 2016

First off, I feel sorry if you need to touch Windows XP, especially in 2016, but hopefully this will save you a few hours nonetheless.

In my case I had a beater Windows XP PC with XP-only software to connect to my car. It's proven itself very useful for car troubleshooting, primarily reading and resetting OBD (error) codes. I didn't want to keep a dedicated piece of hardware for this single purpose and don't want to re-install the specialized dealer software - so migration to a VM was commenced.

Moving that Windows XP installation to VirtualBox 5.0.14 has proven to be more difficult that I estimated, probably because nobody uses XP anymore.

Easy part - disk migration

My attempt to use Clonezilla was semi-successful, as I needed to move a large HDD to a smaller virtual drive and after a few attempts I bailed in favor of Acronis True Image, since I had previous experience using it.

I used Acronis bootable rescue media on a USB stick to backup Windows XP HDD to an external drive. I created a new Windows XP VM following instructions from VirtualBox and used Acronis rescue media ISO to boot the new VM and restore the backup.

Note: You can try to plug the external drive directly to VM (Acronis support of that drive pending), or you can use windows network share on VirtualBox host as I did. Search VirtualBox settings for it's DHCP range and use .1, ie \192.168.8.1\c$ in Acronis to search for backup that you copied to the VirtualBox host machine.

The wall - booting Windows XP in VM

Windows XP would not boot, throwing a BSOD and immediately rebooting. I've tried a lot of things, of which I will spare you, the fix was to change the type of IDE storage controller: ICH6 VM Settings Example

Summary on how to fix the Windows XP crash (BSOD) on boot after hardware has changed:

  1. Choose the same amount of CPUs for VM as you had on physical PC
  2. Try changing the type of IDE controller as shown, it's possible that your particular Windows would have better luck with PIIX3 or PIIX4
  3. Boot into Windows XP install CD, press R for recovery console and restore/fix your boot record. Read how to use: fixboot, fixmbr
  4. Pressing F8 during VM boot would show you the Windows XP boot menu, there you can choose safe mode and disable automatic reboot after BSOD to capture the exact error message for googling

Once booted, install VirtualBox Tools, remove unnecessary applications, drivers and try to enjoy your vintage Windows.

How to Disable Windows Taskbar Jump List per Application

Windows 7 comes with a nice feature called Jump Lists, which is unfortunately a global Windows setting: it cannot be enabled/disabled per application. I find it very useful to enable jump lists for a few applications like RDP Client, Putty and disable it for everything else.

Jump lists for applications that open a given file only once are not useful for me and are rather annoying and insecure, as the history of accessed files stays in yet another place in Windows. Not surprisingly there are methods and tools to extract jump lists history from a Windows system.

Here is how to selectively disable taskbar jump list per application:

  • Open the folder with jump list databases in Explorer (there is a file per application): %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations
  • Download a free program called strings from Windows Sysinternals into the folder from previous step
  • Launch cmd.exe and navigate to jump lists directory cd %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations
  • Strings.exe allows to extract readable words from any binary file, which allows to understand which application created a given jump lists binary database. Copy paste the below command to create a .txt file with strings for each jump lists database: for %i in (*Destinations-ms) do @strings -n 5 %i >%i.txt
  • Review .txt files to determine which application a jumplist belongs to. Use command line: findstr /I adobe *.txt or open .txt files in an editor - the application that created them would be obvious from application names and recently accessed file names
  • The fun part of disabling taskbar jump lists for an application is remarkably simple: create a directory with the same name as the jump list database file name. On my PC, to disable jump lists for Adobe Reader, I deleted ee462c3b81abb6f6.automaticDestinations-ms and created a new directory with the same name. If you ever decide to use disabled jump lists again - delete the directory and Windows will re-create the jump lists database file and the jump list history within it

Cloud Wars: Microsoft Azure vs Amazon AWS

This is an essay written as a part of a job interview process. Google App Engine doesn't exist for the purpose of this post

The war between AWS and Azure is happening on multiple fronts, including features, prices, capacity, end users, etc... I will review just a few aspects of this battle.

AWS has been very strong in attracting startups to its platform, Netflix and Instagram arguably the most well-known examples. AWS has become synonymous to "Cloud" for most entrepreneurs and startup developers. There are clear benefits for startups to use any cloud, but I’d argue that AWS cannot be widely successful by serving startup customers only. Success rate of startups is very low and most of them will die killing corresponding Amazon revenues. On the flip side, widely successful startups might not be paying Amazon (or any cloud) indefinitely, they will likely invest into their own datacenter(s).

Azure tries to engage the same startup demographic, offering free Microsoft products and free Azure resources to startups, but it’s an underdog when it comes to new products being exclusively built on Azure. On the flip side, Azure has better positioning in the enterprise market than AWS. Enterprises will not be as quick to adopt any new technologies, but eventually they will do it with enormous scale and longevity. Microsoft knows this market, has a lot of information on what it’s enterprise customers are buying and can capture a huge chunk of enterprise cloud spend in the next few years. Office 365 is a great example of how Microsoft leveraged its position in Enterprise Email and created a highly successful and growing cloud business based on this model.

To guess who will win the cloud war in mid and long term in the light of this essay is to guess whether there will be enough cloud business from successful startups compared to enterprises. I believe Microsoft has a better chance to win the cloud war against Amazon, especially with their recent focus on cloud and strong positioning in enterprise.

How do I Backup Windows Using Rsync

After an ugly laptop's HDD failure and all the hassles associated with reinstalling and recovering I decided that I need to do better backups to protect my mental wellbeing in the future. In this post I describe my personal storage and backup solution and introduce the backup script that I've created.

A Bit of History and Context

In 2005 I had a Windows XP laptop with HDD split into Windows C:\ and Data D:. I used Acronis to perform "online" backup of system C:\ while Windows was running and used rsync to backup non-system partition D:\ to home PC's backup drive.

In 2010 I got a new laptop with Windows 7 and split HDD into C:\ and D:\ to separate OS from the rest of the data. There are free tools like gparted that can resize Windows C:\ partition to ~100GB without OS reinstall. I stopped using Acronis due to instabilities on x64 Windows in favor of built-in Windows 7 Backup for system C:\ and kept using rsync for the rest of the data.

In 2011 I created 4x1TB RAID5 using a PCI-X raid card on home PC for archives and added 3TB drive for backups. This remains my primary storage and backup machine. Inside PC

Backup Motivations

I have multiple devices: a laptop, a home PC, a blackberry an android phone, tablets and kindles with a few terabytes (and counting) that I want to keep safe from hardware failure and loss.

I enjoy photography and have a lot of RAW photos and converted JPEG images. I store all JPEGs and recent RAWs (~150GB) on my laptop for quick access and editing in Lightroom. I store the archive of all RAW photos on home PC (~350GB). Unfortunately my laptop drive(s) are never large enough to accommodate everything at once and I have to use home PC for archives which complicates my backup a bit.

I prefer to store my "active" data, archives and backups under my control on a home PC. So far I don't use any cloud storage for backups, because of privacy concerns, high cost and inability to support all of my devices and scenarios.

Backup and Archive Scenarios

Over time I have defined a few backup scenarios that formed my backup habits:

  1. (weekly) Windows backup for "bare metal" recovery
    Content of System drive C:\ using Windows Backup for quick recovery after physical disk failure, as I don't want to reinstall Windows and applications from scratch. This is configured to run automatically using Windows Backup schedule. Backup Control Panel
  2. (daily and conditional) Active content backup
    All changed files from laptop, phone, other devices. I backup laptop every night and after significant changes in content, like import of the recent photo RAWs from SD card to laptop.
  3. (weekly and conditional) Handheld devices backup
    I use rsync for devices that can be mounted as USB disk drive in Windows (Blackberry, Kindle) and Bittorrent Sync for Android, iOS to copy all changed files to my laptop.
  4. (conditional) Archived content backup
    When I move files from laptop to home PC archive, I explicitly ensure that updated archive is backed up. This happens when I run out of disk space on my laptop and move RAW photos to home PC's RAID5.

I recommend everyone to adopt at least 1. and 2. and configure some sort of periodic backup of all data. You can use my approach with rsync, Acronis or Windows Backup.

How to Use Rsync for Backup in Windows

To take care of my backup scenarios and needs I created a script rsync_backup_win.sh that you're welcome to use. Once it's configured, all you need is to press enter to initiate the backup (or use task scheduler):

$ sh ~/rsync_backup_win.sh netshare
== Using Home Samba/Network profile
== Mount network share to use as backup destination: /cygdrive/y

== Start rsync full D:\
Thu, Mar 25, 2014 16:21:28
== Running cmd:
rsync -rltDHh /cygdrive/d/ /cygdrive/y/D --exclude /Windows/ --exclude pagefile.sys --exclude \*RECYCLE.BIN\* --exclude "System Volume Information" --exclude "Lightroom 5 Catalog Previews.lrdata" --exclude /VMs/

Details on how to use the backup script are provided in README and in the comments within rsync_backup_win.sh.