Host-based backup of Microsoft Hyper-V VMs.
Post Reply
Jeff L

Restore to Hyper-V

Post by Jeff L »

Didn't know whether to post here or in the AHV section but figured here was better.

Been testing Restoring AHV backups to hyper-v. Initially it wouldn't work, however, I found that if we used Gen2 Machines, it worked just fine.

So, I have to do an instant recovery, then move to production, then once the disks are restored, create a new Gen2 machine, and map the disks to it.

Is there a simpler option where Veeam could just start with a Gen2 HyperV machine, instead of Gen1?
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Restore to Hyper-V

Post by Egor Yakovlev »

Hi Jeff,
there is no (friendly) way to alter generation choice, as it is based on logic of what was backed up and where it is being restored. We do some checks and following on results, we pick best suited(aka "supported by Microsoft" generation) - for example if you backed up Windows Server 2008R2 we cannot create Gen2 machine with it, as it is not supported scenario by Microsoft guidelines.
Can you please clear following questions:
- Source VMs, are they legacy BIOS or EFI?
- What are OSes in those machines?
- What is version of Hyper-V server you are restoring to?
Thanks in advance!
Moopere
Enthusiast
Posts: 71
Liked: 14 times
Joined: Jul 06, 2018 3:44 am
Full Name: Moopere
Contact:

Re: Restore to Hyper-V

Post by Moopere »

An older thread, but I've just bumped into this myself and Dr. Google has nothing useful to say, nor does a search against the Veeam help.

I'm testing against Veeam v11a and can't see any way to specify which generation of VM an 'instant restore' should use. I've just tried to instant restore an EFI domain controller and its restoring as gen1 ... therefore it won't boot. I'll have to do as you suggest above. Restore -> move to production -> create a new Gen2 VM -> map the disks to the new VM and then run it.

Note @egor yakovlev, if you're reading this, I'm not trying to on-the-fly convert gen1 to gen2, its a problem of Veeam choosing to restore a previously configured Gen2 VM as a Gen1 VM ... which won't succeed.
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Restore to Hyper-V

Post by Egor Yakovlev »

Hi Moopere,

can you please clarify few details here:
- I take it you had a Hyper-V Gen2 VM, backed it up with Veeam Agent and tried a restore to another host?
- what was source Hyper-V version?
- what is VM guest OS version?
- what is target Hyper-V version you are restoring to?

/Thanks!
Moopere
Enthusiast
Posts: 71
Liked: 14 times
Joined: Jul 06, 2018 3:44 am
Full Name: Moopere
Contact:

Re: Restore to Hyper-V

Post by Moopere »

- I take it you had a Hyper-V Gen2 VM, backed it up with Veeam Agent and tried a restore to another host?
I generally install the Veeam agent inside the VM's. In this case its a Gen2 Hyper-v VM backed up and then backup-copied to a USB drive. The whole site is being re-created as part of BCP planning.
- what was source Hyper-V version?
Windows Server 2012 R2

- what is VM guest OS version?
Windows Server 2012 R2

- what is target Hyper-V version you are restoring to?
Windows Server 2012 R2. The target is actually the restore of the server 2012 R2 hyper-v that the VM originally lived on. In this scenario the Gen2 VM is being restored to a restore of the original hyper-v but on fresh metal.

There doesn't seem to be a way to tell Veeam that the original VM was a Gen2 ... its assumed to be a gen1. I imagine the automated 'guessing' being done here would present less of a problem if the VM was being backed up as a VM ... but I'm using Veeam inside the VM itself so perhaps it can't determine that it even is a VM?
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Restore to Hyper-V

Post by Egor Yakovlev »

Thanks for details.
VM Generation is being picked based on Guest OS + Target Host versions.
Will check the selection logic with devs.
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Restore to Hyper-V

Post by Egor Yakovlev »

It will be a good idea to check Guest OS disk layout:
- see if boot partition is marked EFI or BIOS inside VM
- see if you have GPT partitions or MBR ones
/Thanks!
Moopere
Enthusiast
Posts: 71
Liked: 14 times
Joined: Jul 06, 2018 3:44 am
Full Name: Moopere
Contact:

Re: Restore to Hyper-V

Post by Moopere »

The VM disk is GPT.

300MB is the EFI boot partition, 49GB is the disk where Server 2012 R2 is installed.


DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 50 GB 1024 KB *

DISKPART> sel disk 0

Disk 0 is now the selected disk.

DISKPART> list part

Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 300 MB 1024 KB
Partition 2 Primary 49 GB 301 MB

DISKPART>
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Restore to Hyper-V

Post by Egor Yakovlev »

What is your "sel partition 1" "detail partition"?
I have a feeling it's worth a support case.
Moopere
Enthusiast
Posts: 71
Liked: 14 times
Joined: Jul 06, 2018 3:44 am
Full Name: Moopere
Contact:

Re: Restore to Hyper-V

Post by Moopere »

DISKPART> list part

Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 300 MB 1024 KB
Partition 2 Primary 49 GB 301 MB

DISKPART> sel part 1

Partition 1 is now the selected partition.

DISKPART> detail part

Partition 1
Type : c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Hidden : Yes
Required: No
Attrib : 0X8000000000000000
Offset in Bytes: 1048576

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
* Volume 2 FAT32 Partition 300 MB Healthy System

DISKPART>
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Restore to Hyper-V

Post by Egor Yakovlev »

Yup, that's definitely a EFI partition.
Looks like a logic of VM Generation selection has made a flaw for your case.
Please, open support case so we can investigate the root of it.
(you can share the case ID in this thread or via private message to me)
/Thanks!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests