Solved restore XP mode files using DiskPart

qgyg30

New member
Local time
4:35 PM
Messages
6
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

OS
Windows 7 Professional 32 bit
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: http://www.sevenforums.com/tutorials/8254-windows-virtual-pc-create-virtual-machine.html, 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:

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
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

OS
Windows 7 Professional 32 bit
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: http://www.sevenforums.com/tutorials/21904-virtual-xp-machine-copy.html

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

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
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

OS
Windows 7 Professional 32 bit
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

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Yes. I did it exactly as stated.
 

My Computer

OS
Windows 7 Professional 32 bit
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

OS
Windows 7 Professional 32 bit
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

OS
Windows 7 Professional 32 bit
Back
Top