restore XP mode files using DiskPart


  1. Posts : 6
    Windows 7 Professional 32 bit
       #1

    restore XP mode files using DiskPart


    My pc recently crashed. I was able to recover my .vhd file. I the tried to reinstall VM using this file but I got an error message that the file was too big...After reserching I discovered that you can use the DISKPART utility to resize this VHD file
    wisefaq.com » How to fix the “Cannot attach the virtual hard disk …”


    I keep getting this error message

    "diskpart has encountered an error: The chain of virtual hard disks is corrupted. There is a mismatch in the identifiers of the parent virtual hard disk and differencing disk."

    what does this mean?
      My Computer


  2. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #2

    Hi ggyg30, welcome to the Seven Forums.

    XP Mode, when installed and used with default settings, consists of two different vhd files, the parent vhd in ]C:\Windows\XP Mode (default location) and the user specific part of XP vhd in C:\Users\Your_Username\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines (default location). Read this post for more information on this so called differencing disk system.

    To "rescue" the XP Mode, you only need the user specific vhd, the one I assume you could find and save. You then need to install Virtual PC and XP Mode again, to create a virtual environment to run virtual machines, and the XP Mode base vhd. Next step is to create a new virtual machine using an existing virtual disk (your rescued XP Mode vhd), as told in this excellent tutorial of our own Brink: Windows Virtual PC - Create Virtual Machine, step 9 and onwards.

    That's it. If the XP Mode vhd you rescued is OK, contains no faults, your XP Mode should run just fine, with all apps and files intact.

    Kari
    Last edited by Kari; 16 Aug 2011 at 14:32.
      My Computer


  3. Posts : 6
    Windows 7 Professional 32 bit
    Thread Starter
       #3

    I'm installing this on a new machine, does this make a difference? Also, when the pc crashed XP mode was on hibernate.
      My Computer


  4. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #4

    No difference, as long as the vhd is undamaged. Install Virtual PC and XP Mode to your new computer, then follow the instructions in tutorial I linked to in my previous post, choosing the option to use an existing vhd as told in step 9 of that tutorial.

    When a Virtual PC virtual machine (XP Mode or any other vm) is hibernated, it creates a virtual saved state file with .vsv extension in C:\Users\Your_Username\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines (default location). This file contains information on all open applications and files and their window position etc in hibernated machine.

    When a Virtual PC vm is then started, it checks if the .vsv file exists. If yes, the vm is opened as it was when last time closed (hibernated). If the .vsv file does not exist, vm is booted freshly.

    In the beginning of this tutorial you can find more information on all Virtual PC vm file types: Virtual XP Machine - Copy

    In other words, the only damage that the missing hibernation file can cause is that non-saved data when vm was hibernated is lost, for instance if you had a word processor open when hibernated and you lose hibernation data (.vsv file), all modifications of your document since last saved are lost. Other than that, no harm done.

    Kari
      My Computer


  5. Posts : 6
    Windows 7 Professional 32 bit
    Thread Starter
       #5

    Ok, I followed the instructions and created a VM using an existing file but I got the following error "Cannot attach the virtual hard disk to the virtual machine. Check the values and try again".
      My Computer


  6. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #6

    Did you start the newly installed XP Mode first? You need to install and run XP Mode once, to create the parent vhd. When you have XP Mode up and running, you can close it and create a new XP vm using your existing vhd.

    Kari
      My Computer


  7. Posts : 6
    Windows 7 Professional 32 bit
    Thread Starter
       #7

    Yes. I did it exactly as stated.
      My Computer


  8. Posts : 6
    Windows 7 Professional 32 bit
    Thread Starter
       #8

    My vhd file might be corrupted. I found a third party app that might be able to recover the files. I think it's called media heal...not holding my breath though.
      My Computer


  9. Posts : 6
    Windows 7 Professional 32 bit
    Thread Starter
       #9

    Just to follow up. I was able to extract my files using MediaHeal. I initially tried WinImage but to no avail...so for future reference, if reattaching the vhd file fails try WinImage or MediaHeal.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:44.
Find Us