HyperV is Microsoft’s offering for handling the virtual disk environment. As with all new technologies there are times when even the best laid plans of mice and men go awry. This segment offers some answers into the recovery of the most difficult of scenarios, the Dynamic VHD deletion. The following are a few steps that hopefully will allow you to mount your deleted VHD and in doing so bring you and or your client back online.
Find the VHD:
DTI Data has developed a tool for finding deleted VHDs on a mounted stream. The software is called, appropriately, the VHD Finder and can be found here for download. Make sure that the download and the ensuing install are not performed on the storage stream that has the deleted VHD. After the installation, using the simple drop down menu begin a scan of the stream where the VHD was deleted and watch for a VHD of the proper size of type ‘Dynamic’. This will be your starting point.
Building an Image:
For a Fixed VHD this part is easy since for all practical purposes a Fixed VHD is a partition in file form. It has the same attributes and characteristics as a standard partition and maintains the same file system components. There is a bit of metadata and the front of the file but all in all a very basic partition. A dynamic partition however is only as large as the amount of data necessary to maintain the embedded VHD block handler and the actual file system data. In order to recover a dynamic partition I suggest trying to create a VHD file the same size as the maximum size of the VHD if it were full. This value is found in the ‘Size’ column of the VHD Finder under ‘Found VHDs’. Even if the amount of data is less than the total size of the partition the VHD handler will ignore the overall size and just address the actual data.
Mounting the image through software:
There are several good pieces of software that will read a dynamic VHD file and recover the data. There are even pieces of software that will expand the dynamic VHD and make it a Fixed VHD in order to recover the data. Acquire one of those tools and use it to recover the data from the partition.