After creating the virtual machine and starting it, the D: drive was showing as Dynamic and Offline. So, it appears that the D: drive was a dynamic disk rather than a basic disk. I suspect that at some point it was configured to use mirroring functionality in Windows which requires dynamic disks.
Ok, fair enough. How do we properly import this disk? According to several searches, I should be able to reactivate the disk. However, this didn't work in my case.
At this point, I'm a bit annoyed. An obvious solution is to do a simple file copy from the old D: drive in the original server, but I'm doing this conversion remotely and have already shut down the original server. I would need to abort the conversion for the weekend if I can't figure this out.
While I was searching for potential ways to repair the disk, I ran into a few articles about converting a dynamic disk to a basic disk without data loss. When you convert a dynamic disk to a basic disk in Disk Management, or by using diskpart, you lose all of the data. What wizardry is this that they're trying to sell me?
I'm not into low level disk stuff and likely never will be, but here is my overall understanding. The disk configuration for dynamic disks vs basic disks is pretty close. Close enough that you can use a hex editor and edit the disk to make it a functional basic disk without losing your data. There are a few utilities that do this for you (for $$ of course), or you can do it yourself.
Here are the basic instructions:
- Download a hex editor for the disk. I used this one: http://mh-nexus.de/en/hxd/
- In the hex editor, rows are labeled as Offset and columns are labelled 0 to F. The first partition for a dynamic disk has a value of 42 for Offset 00000001C0 and column 2. Change this value to 07. The value 07 is used for basic disks with NTFS partitions.
- If your disk has multiple partitions, then you need to go down to the next row and make the same change. Note that basic disks can have a maximum of 4 partitions. Dynamic disks do not have this limitation.
- After modifying all the neccessary values, save the changes.
- At this point, I rescanned the drives and was able to see a basic disk, but not do anything with it. So, I restarted the VM.
- After the restart I was able to assign a drive letter to the modified disk, but it had no data. To recover the data I needed to repair the disk. You can use chkdsk /f, but I used the disk repair option available in Windows Explorer.
- The repair completed very quickly and I was able to see all of the data.
- After a final reboot the applications using the data on D: drive started properly and appear to be functional.