Restoring damaged vhd. Microsoft Hyper-V virtual machine data recovery. Efficient VHD recovery

13.11.2019 external HDs

Hello friends! If your Windows 10 is unstable, periodically displaying some system errors, then it will be very useful to restore the integrity of system files, this is very simple to do, you need to run the command line as an administrator and enter the command: . The sfc /scannow command will scan all protected system files and if any violations are detected, the integrity of the OS will be restored (incorrect system files replaced with the original versions, and the missing ones were restored again). If you cannot restore the integrity of system files and the sfc /scannow utility starts generating errors, then you need to , but in some advanced cases this will also not be possible for the most trivial reason - due to violations of the integrity of the component store, your Windows 10 will stop loading! DFor many novice users, this situation may be a stalemate, butI hasten to inform you that there is a saving change in the plot in this case too -restore damaged storage Windows components 10 is possible on Wednesday before Windows installations(Windows PE)using the Win 10 distribution, as well as virtual disk VHD. Our article today talks about how to do this in detail.

Recovering a damaged Windows 10 component store in Windows Preinstallation Environment (Windows PE) using the Win 10 distribution and a virtual VHD

In the initial phase of installing Windows 10, press the keyboard shortcut Shift + F10 and a window will open command line.

Let's decide on the drive letters (in the preinstallation environment they may differ from those that we see in running Windows).

Enter the command:

notepad

Notepad opens, select:

File -->Open

File type: select the “All files” option and then Click on the “This PC” button.

In the window that opens we see, well The laptop hard drive is divided into two sections:Windows 10 is installed on (C:), and user files are located on (D:). BThe disk drive (F:) belongs to our bootable flash drive with installation Windows files 10.

Note: In your case the drive letter is installed Windows 10 may not be (C:), but another, go to the disk and look for the files of installed Win 10.

At the command line, enter a command that will check and restore the integrity of system files in Windows Preinstallation Environment (Windows PE):

offbootdir=C:\

offwindir=C:\Windows

and after a few minutes the error appears “ Windows Resource Protection has detected corrupted files, but is unable to repair some of them"or other" Windows Resource Protection cannot perform the requested operation».

These errors are a sign that the component store is damaged. In this case, create an empty folder on disk (D:) with the name 1 (for the location of temporary files)

and enter a command that will restore the component storage using the original Windows 10 files located on our bootable USB flash drive with Win 10:

Dism /image:C:\ /Cleanup-Image /RestoreHealth /Source:F:\sources\install.esd /ScratchDir:D:\1

where C: is the partition with Windows 10 installed (which we are restoring), and

F: is the letter of the flash drive, and \ sources\install.esd, is the address of the location on the flash drive of the install.esd archive with the original Windows 10 files.

/ScratchDir:

folder 1

A message appears:

But in some advanced cases you can fail here too, it will turn out error0x800f081f"The source files could not be found. Specify the location of the files needed to restore the component using the "Source" option. then friends Let's restore the component storage in a clever way using a VHD virtual disk!

Recovering a damaged Windows 10 Component Store in Windows Preinstallation Environment (Windows PE) using a virtual VHD

WITH We create a regular script file on our bootable flash drive (drive letter F:) with Windows 10 text file With name"vd" and extension.txt and content:

create vdisk file=D:\10.vhd type=expandable maximum=20000 attach vdis creat par prim format fs=ntfs quick assign letter M

This file script will create for us on disk ( D:) virtual disk named - 10.vhd,

drive letter - M,

Virtual disk size 20000 MB or 20 GB,

creat vdis file=d:\10.vhd maximum=1000 type=expandable- means that we need a dynamic virtual disk.

We enter a command on the command line that launches the “vd” script file located on our USB flash drive (F:)

diskpart /s F:\vd.txt

As a result, a virtual disk 10.vhd appears on disk (D:).

The script file also results in an empty virtual drive (M:) appearing in the This PC window. To this virtual disk (M:) we need to expand the contents of the install.esd file (Windows 10 operating system), the file install.esd is located on our bootable USB flash drive, drive letter ( F:).

The file - install.esd, located on our bootable flash drive at F:\sources\install.esd, can contain several images of operating systems,

enter the command:

DISM /Get-WimInfo /WimFile: F:\sources\install.esd

Where F: - drive letter of the flash drive,A \sources, this is the folder with the operating system image file - install.esd.

To install on a virtual disk, I need Windows 10 Home for one language (image index 3), since it is Windows 10 Home single language installed on my laptop and that’s what I’m restoring.

With the following command I deploy the install.esd file (Windows 10 Home for one language) to the 10.vhd virtual disk (M: partition)

Dism /apply-image /imagefile:F:\sources\install.esd /index:3 /ApplyDir:M:\

Where F:- the drive letter of the flash drive, and \sources is the folder with the operating system image file - install.esd,

index:3- to install on a virtual disk I need Windows 10 Home for one language (image index 3),

M:- virtual disk 10.vhd.

Windows 10 is deployed to virtual disk 10.vhd (partition M:) and we will use it to restore damaged component storage our operating system.

Enter the command:

Dism /image:C:\ /Cleanup-Image /RestoreHealth /Source:M:\Windows /ScratchDir:D:\1

Where C:, is the partition with Windows 10 installed (which we are restoring), and

M:- letter of the connected VHD virtual disk with deployed Windows 10 files.

/ScratchDir:- specifies a temporary directory used when retrieving files for temporary use during maintenance.

folder 1 - on partition D: created for temporary files.

A message appears:

“The restoration was successful. Operation completed successfully"

This is how we restored the damaged Windows 10 component store in Windows Preinstallation Environment (Windows PE) using the Win 10 distribution kit, as well as a VHD virtual disk!

All that remains is to restore the integrity of Windows 10 system components with the command:

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

offbootdir=C:\ a section containing a folder with a repository of original Windows components (folder C:Windows\WinSxS).

offwindir=C:\Windows- partition with the installed operating system.

A message appears:

“The resource protection program detected damaged files and successfully repaired them.”

After work, virtual disk 10.vhd on disk (D:) can be deleted directly in notepad

Read, how to restore a Hyper-V virtual machine that has been deleted or the contents of the virtual disk Hyper-V machines . What are the built-in tools? virtual machine or third party programs use it to restore it. Programs for creating virtual machines are designed to create on one computer, in addition to the main operating system, one or more virtual machines with their own independent operating systems and disks, space for which is allocated on the main disk of the computer.

There are many third-party virtualization programs, but the most popular among users are VMware Workstation and Oracle VirtualBox. To enable virtualization of its own operating systems, Microsoft has also developed a tool – Windows Virtual PC. But, Windows 10 already introduces a new generation virtualization application - Manager.

Content:
  • Hyper-V Manager is easy to use, but its only drawback is the ability to create virtual machines only with Windows operating systems.

    Support for virtual machines using the Hyper-V tool is available in Windows versions 10 Pro and Enterprise. By default, it is not activated and to use it, the tool must be activated and connected.

    For this:


    Hyper-V virtual machine system files

    Unlike other virtual machine managers, Hyper-V does not store all virtual machine files (system files and virtual disk file) in one folder. They are stored in different places:


    These folders are set by default by the tool, but you can change the location of these folders if desired.

    It should be noted that the main files responsible for the configuration and data of the virtual machine, and thus for its performance, are:

    • *.vhdx– virtual machine disk file. Has the name that was assigned to the virtual machine when it was created. Default location:
      C:\Users\Public\Documents\Hyper-V\Virtual hard disks
    • *.vmcx– file of virtual machine configuration parameters. Default location:
      C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines

    If these files are restored, it is possible to restore a working virtual machine, including all files from its disk.


    How to recover a Hyper-V virtual machine that has been deleted

    Virtual Machine Export/Import Function

    In case a user uses the Hyper-V virtual machine to work with important data or it is valuable to him for other reasons, Microsoft provides the ability to create a backup copy of the virtual machine. The Export and Import functions of a virtual machine using Hyper-V Manager are designed for this purpose.

    To export a virtual machine:


    Moreover:


    To import a virtual machine:


    Recovering a virtual machine with Hetman Partition Recovery

    If for some reason a virtual machine is deleted or lost from the user’s computer or other storage medium and needs to be returned, this can be done by restoring the disk and configuration files of the virtual machine, and then importing them into Hyper-V using the Import virtual machines function.

    For this:


    How to recover the contents of a Hyper-V virtual machine disk

    As we have already stated, all files that are saved on the disks of the virtual machine are located in .vhdx virtual disk files. Recovery program hard data disk Hetman Partition Recovery has a mount function virtual disks and recovering data from them.


    If for some reason your virtual machine has lost its functionality, and its disks contain important files– they can be restored. For this:


    How to recover a Hyper-V virtual machine disk file from the virtual machine itself

    As a result of the experiments, it was discovered that files that were deleted or lost inside the virtual machine cannot be restored.


  • Efficient VHD recovery

    Reducing agent software VHD quickly recovers your important data from damaged virtual hard drives or VHD files. It allows users to select a damaged VHD file from the system directory and scan the file for errors.

    Dual scanning mode

    This VHD recovery software has two scanning modes so that the damaged VHD file can be scanned in an intensive manner. The Standard mode scans the VHD file if the damage is minor, and the Advanced mode if the damage in the VHD file is severe.

    Add custom volume

    This feature is available in advanced scan mode to recover complete data from damaged VHD file. If any of the volumes is not in the list, you can add it manually by clicking the "Add Custom Volume" button to create a new volume.

    RAW recovery

    VHD recovery tools provide users with RAW recovery features. If users want to recover some types of files that cannot be recovered using other recovery methods, it is highly recommended to perform RAW recovery. Supported by default JPG formats, PNG GIF, BMP, ZIP, RAR and MP3.

    Adding new signatures

    Using the RAW recovery mode provided by VHD Recovery, users are allowed to add new signatures to a new or existing file before starting data analysis from the selected volume.

    Supported File Systems

    VHD Recovery Software supports all popular file systems created by various operating systems such as: FAT, FAT16, FAT32, FAT64 (exFAT) and NTFS Windows, HFS+ Mac and EXTX Unix.

    Multi-recovery mode

    Data recovery from a damaged VHD file is performed in three modes: standard mode, in case the problem level is minor, advanced mode, if the level is serious and cannot be fixed in standard mode, and Deep Mode, which works when both other modes fail to perform VHD File Recovery.

    Recovering a Formatted Disk

    If the selected volume is saved in any file FAT system and the drive is already formatted, you should select the advanced recovery mode as it supports formatted drive recovery. When recovering a VHD formatted disk, a different recovery algorithm is used than when recovering a regular disk.

    Tree Structure Preview

    Users can check the recovered data in the tree structure view given in the left pane, where users can expand it to view the files stored inside it. The right pane will show the selected file properties. Users can check/uncheck the files and folders they want.

    Comparison of trial version and full version

    Product Features Free version Full version
    Support damaged files VHDs saved to hard drives and dynamic disk types
    Setting options for the selected volume, i.e. FAT, NTFS, etc. enabled
    Supports all popular file systems of various operating systems
    Support recovery from formatted disk in case file system FAT
    Save recovered data Preview only
    24 * 7 Technical support and safety 100%
    Price FREE $99

    When you restore a system from an image, all existing data on the hard drive is erased and the data from the backup is written in its place. If you created or modified any files after archiving, then all changes are lost forever, so resort to full restoration system is recommended only in case of serious failure hard drive. If operating system starts, then before restoring data from the system image, do one more backup copy your data on another medium. There are two ways to restore a system image. The first is used when replacing a hard drive or when it is impossible to start Windows, and the section “Restoring a system after a failure” is devoted to it. The second method - which requires a little trick to implement in Windows - is discussed below.
    Recovery separate files from the system image
    The most disappointing limitation of the system image tool is that Microsoft has not provided an easy, straightforward way to restore individual files from an image file. It is wrong when, for complete protection and ease of recovery of individual files, you have to resort to both methods of system archiving.
    The system image is virtual image hard drive, file with extension .vhd. The same files store data from Microsoft Virtual PC and Virtual Server virtual machines. This means that the image Windows systems 7 allows you not only to completely restore the contents of your hard drive, but to literally open a window to the past - start a virtual machine session based on the backup copy. In addition, it also makes it possible to recover individual files... if you know where to look for them.
    The easiest way to connect a .vhd file is to open the Disk Management utility. From the Action menu, select Attach virtual hard drive, then click Browse and select required file with extension .vhd. Open the backup disk and go to the \WindowsImageBackup\\Vaskir folder, where this is the name of your computer, and - the date of the last backup. Don't forget to check the Read-Only checkbox in the Attach virtual window HDD to avoid unintentionally changing archive data. If you plan to modify backup copies of documents, then you do not need to select this checkbox. Click OK, and in a few moments the .vhd file will appear on the system as a new volume with its own drive letter. The new volume will also be listed in the main window of the Disk Management utility, distinguished from physical disks only by a blue icon.
    Connected new disk appears in the Computer branch in Explorer in the same way as other drives. Drag and drop any file from the backup to restore it to your live system.
    If you frequently need to mount and unmount .vhd files, use the VHDMount command-line utility included with Virtual Server 2005. It is a free download from http:wvw.microsoft.com/virtualserver/. Next, download the registry patch file vhdmount.reg and double-click it to embed the new command in Explorer. Now right click on the .vhd file and select in context menu Mount command. Once you've finished working with the backup, go back to the folder where the .vhd files are stored, right-click on the attached file and select Unmount. The second option, commit changes, is intended only for cases when the changes made need to be written to the system image file. The temporary drive will be immediately removed from the list of drives in Windows Explorer.

    Copyright © Acronis International GmbH, 2002-2012

    5. If necessary, you can add comments to the backup copy.
    6. Click the button Get started in the summary window.
    True Image 2013 cannot convert VHD files containing dynamic volumes

    originally located on more than one disk (striped or composite of two

    or more disks).

    8.11.2 Recovering from VHD files created by the program

    Windows archiving

    VHD files are the result Reserve copy systemic hard section disk

    using the Windows Backup program included with Windows Vista and Windows 7.

    If you purchased True Image 2013 after using Windows Vista Backup Utility

    or Windows 7, then the system hard drive can be recovered from VHD files when

    help True Image 2013.

    To restore your system from a VHD backup file, follow these steps:
    1. Change the boot order in BIOS to make the device bootable media

    (CD, DVD or USB flash drive) the first boot device. Additional

    For information, see Setting the Boot Order in the BIOS (page 116).

    2. Boot from bootable media and select True Image.
    3. On the True Image 2013 welcome screen, select the section Recovery and click

    4. Select the VHD file by creation date. If the VHD file you need is not listed,

    click the button Review, in the “File type” field, select OS backup archives

    Windows (VHD) and specify the path to the file.

    Even if the required VHD file is displayed on the screen after selecting it True Image 2013

    may display the following message: “True Image 2013 cannot find archive volume 1

    “Archive_Name”, where Archive_Name is the name of the selected backup. This happens for a reason

    what drive letters are in Windows OS and bootable version True Image 2013 may vary.

    Therefore, the backup path stored in the metadata points to the wrong

    storage. In this case, click the button Review, in the “File type” field, select archives

    Windows OS backups (VHD) and specify the backup you want

    restore.

    5. In the next step, select Recover disks or partitions(if not selected) and

    6. On the step Recovery object select the system partition. As a rule, in

    restoration of the main boot entry MBR is not necessary.

    7. Then specify the options for the selected system partition: storage, type (main,

    active), size. When restoring a partition to its previous configuration location

    no need to change.

    8. Review the recovery operation summary and click Get started.
    Restoring partitions and disks from VHD files is also possible from OS Windows.

    Recovering from Windows OS is preferred for recovering non-system partitions and