Thursday, August 21, 2014

Windows Backup to ESXi Virtual (B2V)

My problem: 

I have a backup from Windows backup (Server 2012 in this case) that I wanted to restore to an ESXi virtual machine.

My Sub-Problem: 

I could not get an NTFS mounted drive to mount into ESXi for the windows recovery system to work properly.

How I solved it: 

I created a virtual machine within Hyper-V which allowed the backup drive to be direct mounted. Ran through the restoring backup solution, then ran the VMware vCenter Converter Standalone to convert the Hyper-V machine to a virtual on the ESXi Server.

Things to consider for this project:

Requires two physical servers, not including the downed server. One of which running ESXI the other running HyperV, this cannot be a virtual machine of a HyperV server unless you can raw map the backup drive into that virtual machine (if anyone has any way of doing this and not requiring the HyperV server please comment).

Requires having storage space on the HyperV larger than the total hard drive space of the downed server.

Requires upward of a day's worth of time to complete even on high end hardware. It can require more time if there is large amounts of data being restored and migrated. The more data involved the longer the process. The lag I was getting seemed to be related to how fast the storage drives are, since I was using backup disks on a simple Raid 1 on sata drives the performance was low. The disk creation time took 100% active time on the disk at 60-80MB/sec.

My in-process problems: 

  •  The backup drive on the Hyper-V server must be "offline" to be mounted within the VM for cloning. 

    Solved by putting the drive offline through disk management.

  • The restore would not function because the destination drive in BIOS is too small. 

    Solved by creating a fixed disk which exceeded the backup size instead of a dynamic disk in the virtual machine settings (I had to create a 250GB fixed disk which required a fair bit of time so if it goes fast (A minute or less) and you have a larger sized disk, you will need to go back, it created a fixed disk by deleting the disk you just created, which should take around 400k if you haven't installed anything, and making a new disk and be sure to select fixed size). Your description should look like this (I originally created a partition too small explained below):
I later found out the error code I was getting (shown below) means that the target drive is smaller than the original backup drive which is required to be bigger by microsoft's backup system.

I then expanded my drive from 200 to 250 since my original drive was 236 (240GB SSDs) and retried.

  • When attempting the restore of the system, the search for a recovery file would take forever.
I was not able to find a "resolution" for this issue. I just bounced back and forth between find and refreshing the image searcher (Microsoft why can't we just target a file? Waiting is ridiculous for system admins, we know what we are doing (usually)). 

  • When I first got the P2V conversion completed successfully I ended up accidentally creating a hardware version 10 virtual machine. 
When I did so and got reminded that 10 is not capable of being managed through the vsphere system, I ended up restarting the rebuild process after deleting the virtual machine due to hard drive size limitations on my destination server. It turns out that there are some pretty simple ways to fix this. Most of them are detailed here but the last one just blew me away in frustration: 

  • Create a new virtual machine with required hardware version and attach the existing disk from the virtual machine.
So simple yet so frustrating after you already dedicate yourself to starting over from scratch. Yet again, lesson learned.

No comments:

Post a Comment