Today was not a fun day. Among the many tasks that I had to accomplish my primary development virtual machine decided to barf on me. The system would boot but then the moment I attempted to run VS and load a project it would 'blink' off and reboot. It did this twice and then decided to run a CHKDSK at the third boot. This found several invalid file chains and ended up 'restoring' several files.
At this point, the OS wouldn't even boot, saying that the C:\WINDOWS\SYSTEM32\CONFIG directory was missing. Great! My next step was to run a repair from the Windows XP boot disk. This ran fine (for a while) until it eventually crashed with an invalid memory address read.
The rest of my day was spent attempting to get my development files off of the VPC so I could move over (a.k.a., rebuild) another. That, in and of itself, isn't a big deal - I have several base images to work with so I'm not worried. Getting the files off of a VPC image turned out to be non-trivial. There may be better ways to do this (and I'm open to thoughts), but here's what I did:
- Create a secondary, blank VHD (virtual hard drive). I had to do this because VPC wouldn't let me mount a non-CD/DVD/ISO drive within the image and I couldn't share a folder between the VM and the host machine.
- Boot the VPC to the command prompt (I used an old Win98 disk cause it was laying around).
- FDISK to create a partition on the VHD.
- Boot to the XP Recovery Console (via the XP boot disk) - a step which we'll soon see was a waste of time.
- FORMAT D:\ /FS:NTFS
- At this point, I wanted to copy my ~\dev directory to the new VHD. Well, as it turns out the XP Recovery Console doesn't allow XCOPY (even when referenced directly in the c:\windows\system32 folder) !! Even then, COPY doesn't allow wildcards nor directory copying !! This completely, utterly baffles me.
- I then remembered my best friend in boot-time travails: Windows PE (Pre-installation Environment) Server Edition: boot to WinPE.
- Once I booted up to PE it was a cakewalk. It's a good thing too, because manually copying 2490 files manually (one by one due to lack of wildcards in NTRC) would have been a nightmare.
Well, now I'm back up and running, but what a nightmare.