Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: restore XP mode files using DiskPart

16 Aug 2011   #1
qgyg30

Windows 7 Professional 32 bit
 
 
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 System SpecsSystem Spec
.
16 Aug 2011   #2
Kari

Microsoft Community Contributor Award Recipient

 

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
My System SpecsSystem Spec
16 Aug 2011   #3
qgyg30

Windows 7 Professional 32 bit
 
 

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

16 Aug 2011   #4
Kari

Microsoft Community Contributor Award Recipient

 

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 System SpecsSystem Spec
16 Aug 2011   #5
qgyg30

Windows 7 Professional 32 bit
 
 

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 System SpecsSystem Spec
16 Aug 2011   #6
Kari

Microsoft Community Contributor Award Recipient

 

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 System SpecsSystem Spec
16 Aug 2011   #7
qgyg30

Windows 7 Professional 32 bit
 
 

Yes. I did it exactly as stated.
My System SpecsSystem Spec
16 Aug 2011   #8
qgyg30

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 System SpecsSystem Spec
17 Aug 2011   #9
qgyg30

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 System SpecsSystem Spec
Reply

 restore XP mode files using DiskPart




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Deleted HDD files using diskpart command
Hello In an attempt to create a windows 7 bootable USB I've deleted my HDD (it was late and in a hurry :cry:). I have 2 drives connected: 1'st is an SSD drive - for main windows, 2'nd is a 1TB HDD drive western digital splitted in two partitions. The commands i've runned are: diskpart, list...
Backup and Restore
How to restore windows 7 image created in EFI to restore in UEFI mode
Hello, first let me introduce myself, I am new to Seven forums, I am an expert in Windows OSes...... Now lets get to the question, I want to change my hard disk's partition table to GPT (its currently in MBR partition table) for that i created a system image of my windows 7, its currently booting...
Backup and Restore
Black screen at boot with safe mode, system restore, or repair mode
Hello all First time poster with problem after peforming sys restore on win7 pro 64bit. Was troubleshooting a problem w/taskbar not staying hidden, tried to restore back 24hrs to when a java update occured. Restore seemed to proceed normally, but upon restart, it boots normally to just before the...
Backup and Restore
Backup and Restore: restore files in Recycler (Win7 Enterprise x64)
Hi: I have a Win 7 Enterprise Pro x64 laptop. Most of the files in my recycler/recycle bin mysteriously disappeared a few days back (I am guessing some OS quirk since desktop.ini also seems to have been modified then, though everything is still running smoothly). So I want to get those files...
Backup and Restore
Using diskpart to detect hidden files
Hi everyone.still attempting to manage my computer issues.previously posted about losing my firewall,and learnt some very useful stuff.reinstalling windows 7 got me back firewall but also the same probably hijacked,weird hybrid of XP and 7,with all the system files,and drivers frozen at 14th July...
System Security
How can I undo or recover lost files from System Restore in SAFE MODE?
I am familiar with System Restore, selecting earlier times, and the often-available option of undoing a System Restore. But I found out (too late) that according to Microsoft, System Restore done in Safe Mode is not able to be undone. I lost 1,000's of photos doing the system restore, now the...
Backup and Restore


Our Sites

Site Links

About Us

Find 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 13:42.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App