Agent-based backup of Windows, Linux, Max, AIX and Solaris machines.
Post Reply
bbuchanan
Influencer
Posts: 16
Liked: 7 times
Joined: Jul 07, 2022 2:05 pm
Full Name: Brian Buchanan
Contact:

Windows recovery image file not found

Post by bbuchanan » 1 person likes this post

Hello, this is a follow-up to case 05873745.

For an unknown reason Veeam was failing to find the Windows Recovery Image (or it was corrupt?) on two new VMs deployed as a SQL Server Failover Cluster.

After working with Support and researching how to repair/rebuild the recovery environment I combined KB 2685 with Microsoft's "Deploying WindowsRE" and a few other pages to come up with a solution that worked.

KB 2685 is kind of incomplete. For example reagentc /setreimage doesn't work if the Recovery Environment is enabled, it's missing the commands to disable and to enable. There's also a caveat that reagent /disable copies the bad winre.wim (and reagent.xml) to C:\windows\system32\recovery, overwriting the copy from the install.wim.

It also doesn't address recovery partitions, and if you simply disable, copy, setreimage and enable, the winre.wim actually gets copied to C:\Recovery and not the recovery partition.

These commands are a REFERENCE of what I worked out from KB2685, https://learn.microsoft.com/en-us/windo ... windows-11 and other Google results. Don't run these unless directed by Support.

Gather info on the current Recovery Environment. If enabled, note the current status and location.

Code: Select all

reagentc /info
Disable Recovery Environment

Code: Select all

reagentc /disable
Launch diskpart in an elevated command prompt

Code: Select all

diskpart
Find and Format the recovery partition

Code: Select all

list volume
If the volume isn't apparent, examine the disks

Code: Select all

list disk
select disk 0
list partition
The recovery partition will have a Type value of "Recovery"

Code: Select all

select partition 1
list volume
Format the recovery partition still inside diskpart

Code: Select all

format quick fs=ntfs label="Recovery"
Assign a drive letter

Code: Select all

assign
Exit diskpart

Code: Select all

exit
Mount the server ISO, the commands below assumes it received drive D:

Mount install.wim

Code: Select all

mkdir C:\dism
dism /mount-image /imagefile:D:\sources\install.wim /index:1 /mountdir:C:\dism /readonly /optimize
Copy the recovery files

Code: Select all

robocopy /mir C:\dism\windows\system32\Recovery\ C:\Windows\System32\Recovery\
Unmount install.wim

Code: Select all

dism /unmount-image /mountdir:C:\dism /discard
The following assumes the recovery partition was assigned drive letter E:

Make a directory for the recovery environment

Code: Select all

mkdir E:\Recovery\WindowsRE
Copy the winre.wim to the recovery partitoin

Code: Select all

xcopy /h C:\Windows\System32\Recovery\Winre.wim E:\Recovery\WindowsRE
Set the recovery environment image path to the recovery partition

Code: Select all

reagentc /setreimage /path E:\Recovery\WindowsRE /target C:\Windows
Enable the Recovery Environment

Code: Select all

reagentc /enable
Review the recovery environment information, noting the status and location. If the recovery partition is partition 1, the path should reflect that.

Code: Select all

reagentc /info
Remove the drive letter from the recovery partition

Code: Select all

diskpart
list volume
select volume x
remove
exit
After all that the agent job ran successfully.
Dima P.
Product Manager
Posts: 14417
Liked: 1576 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Windows recovery image file not found

Post by Dima P. »

Hello Brian,

Thank you for sharing the details with the community, I'll pass your post to the team and we will discuss if we can improve the current KB article.
ksl28
Enthusiast
Posts: 48
Liked: 8 times
Joined: Sep 21, 2016 8:31 am
Full Name: Kristian Leth
Contact:

Re: Windows recovery image file not found

Post by ksl28 » 1 person likes this post

Your guide worked like a charm! Just fixed several clients at our end.
Only thing that was not working was the "regaentc /enable", because there was a typo :)

Thanks for sharing!
Dima P.
Product Manager
Posts: 14417
Liked: 1576 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Windows recovery image file not found

Post by Dima P. »

Kristian,

Thank you for the comment, sharp eye! Corrected the typo in the original post!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests