Cannot recover .vhd from virtualbox RRS feed

  • Question

  • Hi. I used to have 'Windows XP mode' on my windows7 long time ago. I backed up the all .vhd related files but I think I missed some configuration file.

    Today, I tried to restore the .vhd using by the tool virtualbox and I got this error.

    Sorry for the language. What it basically says is 'Cannot connect IDE primary master'.

    Is there any possible way to recover this .vhd? There are many important files to me.

    Please help.


    Thursday, July 18, 2019 2:01 AM

All replies

  • Hi,

    Thanks for posting in our forum!

    1. There could be many possible reasons for corruption of VHD files, like:

    • Virus infection: It is a very common reason behind corruption of VHD file. Once a system is attacked, it ruins files on the system including the VHD files.

    • Failure of storage media: Due to corruption or failure of storage media, the files become inaccessible, and with that VHD file also gets corrupted.

    • Abrupt system shutdown: Accidental or sudden closure of your computer can cause severe damage to software and hardware of your PC. Also, if the Virtual Machine is active at that moment, then it may lead to the corruption or damage of VHD file.

    • Paused state of Virtual Machines: If we do not notice the early signs of VM (Virtual Machines) failure or paused state of Virtual Machines, it leads to VHD file damage.

    • Due to human errors: Intentional/accidental deletion or removal of stored files, registry modification errors, force shutdown of the system, and improper disk management are some of the human errors that can damage VHD files.

    Many VHD repair methods can be performed to restore your virtual hard disks after corruption issues. Here, the commands used to scan and restore the VHD file are explained one by one.

    • Command to scan an image for corruption

    Command: Dism /Online /Clean-Image /CheckHealth

    Description: This command scans the file completely to check for corruption.

    • Command for checking an image for corruption

    Command: Dism /Online /Cleanup-Image /ScanHealth

    Description: This command will check whether the image file is corrupted or not and will specify whether it can be repaired or not.

    • Command for repairing and restoring from corruption

    Command: Dism /Online /Clean-Image /RestoreHealth

    Description: This command will automatically perform the repair if it finds corruption.

    2. You could try mounting it in the parent partition and repairing it with chkdsk command.

    3. You can also discuss with virtualbox experts over their forum in the meanwhile:


    In addition, please allow me explain that from our professional support level, we could only give you many suggestions as possible as we can, but we didn’t support repair disk and data recovery, you can contact the third-party storage vendor to seek their help, as far as I know, there are many disk repairing tools in the market.

    Hope this can help you. Please let me know if you have any other question.

    Best Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, July 19, 2019 2:30 AM
  • If the VHD isn't corrupted you should be able to use "open archive" with a program like 7zip on the "Windows XP Mode.vhd"   Make sure the base VHD is in the same folder.

    If your folders were stored in "My Documents" you should be able to find them in 

    E:\xpmode\Windows XP Mode.vhd\Documents and Settings\XPMUser\My Documents\

    Where E: is the drive the VHD is located on.

    If you want to set up a VM in VBox, make sure you add both VHDs to your Medium.  Add the base first, then you should be able to add the child disk.  It should appear under the base.  Attach the base to your VM.

    Friday, July 19, 2019 5:27 PM
  • Thanks for the info.

    First option using 7zip, when can I find open archive menu? I right click the vhd and couldn't find it.

    For the second option, I now added base first and attached actual file. it seems I can create new VM. 
    Once I load, it is saying 'could not read from the boot medium! system halted..'

    You mentioned, both VHDs to your medium. can you tell me more indetail? 


    Friday, July 26, 2019 9:15 AM
  • If you right-click the .VHD, you should get a context menu:

    For adding VHDs, you need to add both to the media manager.  

    Friday, July 26, 2019 5:56 PM
  • Its possible that your VHD is corrupted, which would explain why there's no data to be found.

    Is the base file, the original VHD that was used to create XPMode?  The dates on your first screen shot seem off as the base has a newer timestamp.  If it's not the original base file, you're likely out of luck since any change to the base file will break the parent-child relationship of the differencing disks.

    Friday, July 26, 2019 5:59 PM