Veeam 6 Fails to Restore to Hyper-V Gen 2

Recently I had a Windows Server 2022 machine installed on bare metal, backed up with Veeam Agent for Microsoft Windows 6.0.2.1090 – Free Edition. I decided to virtualize this machine and wanted to restore it to a virtual machine under Hyper-V, also under Windows Server 2022.

I had created the Veeam recovery media as an ISO. To my surprise, when I tried to boot from that ISO under a Hyper-V  Generation 2 machine, I got the error “The boot loader failed”:

Veeam and Hyper-V 1

I tried disabling Secure Boot in the VM’s Settings, but I got the same error.

Veeam and Hyper-V 2

A Workaround

Eventually I found this workaround:

1. Create your Generation 2 machine with the virtual disks that you will need. Don’t start the machine.

2. Create a temporary Generation 1 machine. Attach the disks that you created in step 1. (I used SCSI for the disks and IDE for the DVD drive.)

3. “Insert” the Veeam ISO as the DVD for the Gen 1 machine and start it. It will immediately start the Veeam recovery environment:

Veeam and Hyper-V 3

4. Restore the disks under the Gen 1 recovery environment. Ignore Veeam’s warning that GPT disks may not boot under BIOS. The Veeam advanced Disk Mapping is pretty amazing, although for some reason it insisted on putting the Recovery partition at the beginning of the drive. Here is the original physical layout and Veeam’s re-partitioning:

Veeam 3.5

Veeam and Hyper-V 4

5. When the restore completes, shut down the Gen 1 machine and start the Gen 2 machine with your newly-restored disks. There are the usual delays and restarts as Windows adjusts to the new (virtual) hardware.

Stuck in Safe Mode

One additional issue, not necessarily unique to Veeam, is that if you have restored a domain controller, it will boot into Directory Services Restore Mode (DSRM) at first and you will not be able to log in with a domain user.  It’s confusing because as this post points out, “there’s no way to tell from the login screen”—you’ll just get the message “There are currently no logon servers available to service your request” when you try to log in. Solution:

1. Log in using the non-domain Administrator user and DSRM password. You’ll see “Safe Mode” in the corners of the screen. The DC will not be running.

Veeam and Hyper-V 5

2. Open msconfig.exe and uncheck Safe boot:

Veeam and Hyper-V 6

According to this Veeam article, you can also clear Safe Mode from the command line (though I didn’t try this):

bcdedit /deletevalue safeboot

Reboot to get back into normal mode with the domain controller running.

Conclusion

It’s surprising that Veeam recovery media does not support Generation 2 virtual machines. But after wasting an hour or more trying and failing to use Windows Server Backup to restore the machine, I was glad I had the Veeam backup and that it restored fine with only this one glitch.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.