How to fix the “Cannot attach the virtual hard disk …”

… to the virtual machine.  Check the values provided and try again.” error
Windows Virtual PC: Cannot attach the virtual hard disk to the virtual machine.  Check the values provided and try again.

It sucks as an error message.  Would it take too much programming effort to make it more meaningful Virtual PC team?

What does it mean?

It means you have a Virtual Hard Disk file larger than 127.5GB.  Which Virtual PC does not support.
You might have created this with the Microsoft Disk2VHD tool.
To confirm the “disk is too big” problem, open the Settings on an existing Virtual PC, and try to attach the drive:
The virtual hard disk image ... is too large for the IDE bus.  Make sure that all virtual had disk images connected to the IDE bus are not greater than 127.5GB

In other words, we’ve captured a 160GB hard disk, and Virtual PC won’t let us use it.

But we can fix it, it’s a two step process

First we use DiskPart, and then we use VHD Resizer.

Continue reading