| Author |
Topic  |
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
Posted - 08/17/2009 : 7:09:17 PM
|
Has anyone had success with this?
I'm trying to backup a Win7 PC and restore it as a Hyper-V guest. I've had success with this when the guest OS is Server 2003 or even 2000 Server, but Win7 is giving me issues when booting after the restore.
I get a blue screen just after the "Windows is starting" screen with a 0x0000007B error.
A Google of the hex code suggests an IDE/AHCI conflict, but there is no BIOS setting for that in a Hyper-V VM that I am aware of, so I can't try the suggested fix of switching the BIOS setting from IDE to ACHI or vice versa.
Here's my process so far:
1. I tried capturing an image of the Win7 PC using Symantec Backup Exec System Recovery version 8.5.5 and then doing a "Restore Anyware" bare-metal restore into the VM. That didn't work, but BESR doesn't yet officially support Win7, so I was just doing that as a long shot anyway. The next version of BESR will support Win7.
2. Just as a test, I tried restoring the BESR image but did NOT choose any of the bare-metal restore options. Since Vista/2008/Win 7 have some hardware-agnostic traits (I do not yet fully understand exactly what makes them hardware-independent, maybe I'm misunderstanding/mis-applying the concept) I figured maybe the Win7 image would already be bare-metal restore capable without using any of the BESR tools. A restore resulted in the 0x0000007B blue screen.
3. I did a Window 7 CompletePC image of the Win7 PC. I then booted the VM to the Win7 DVD and did a restore of this image. 0x0000007B blue screen.
I am running the "R1" version of Server 2008 and Hyper-V. Microsoft says pre-R2 Server 2008 supports Windows 7 as a guest OS, so I don't seem to require 2008 R2 in this situation.
I will try restoring the CompetePC image again tomorrow and experiment with different settings in case that yields any success.
|
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
Posted - 08/17/2009 : 7:37:55 PM
|
Did I hit an iteration of the issue Mark talked about here:
"Quick review: CompletePC Backup is a new technology built into Vista and Server 2008 that backs up entire drive letters (or groups of drive letters), storing them in the VHD format that Microsoft normally uses to store its virtual machines for Virtual Server, Virtual PC or the upcoming Hyper-V server. The VHD format understands the notion of snapshots and so a given VHD can store many versions of a given drive's backup, and does it fairly efficiently as the snapshots store just the differences from one backup to another. These backups can then be restored to do a complete system restore, allowing you to do a CompletePC Backup of a system and then restore that to a system with somewhat different hardware. (Different drive architectures seem not to always work — transplanting a backup taken from an IDE hard disk doesn't seem to be possible on a SATA hard disk, for example, although I HAVE transplanted a SCSI backup onto an IDE drive.) Thus, CompletePC Backup allows for so-called "bare metal" restores. Again, it cannot just back up a single file or folder — just an entire drive."
The physical PC that I took the image from has a SATA drive, while the virtual machine I'm restoring to has an IDE virtual interface...
EDIT: The physical machine I took the image from has a SATA drive, not a SCSI drive. |
Edited by - Vic on 08/18/2009 11:50:15 AM |
 |
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
Posted - 08/17/2009 : 8:54:07 PM
|
Wait-a-minute....
Maybe I'm thinking of this backwards. My original thought is that, since the source image came from a SATA disk and the target is an IDE (virtual) disk, I would need to get into BIOS on the virtual machine and manipulate the AHCI/IDE settings (but I got stuck there since there is no way to do that in Hyper-V as far as I know).
However, maybe I need to go into the registry on the source (physical) machine, enable AHCI drivers, then take an image, then restore that image to the Hyper-V VM.
I'm not at work tight now, so this'll have to wait until tomorrow. I'll post the results.
EDIT: typo |
Edited by - Vic on 08/17/2009 9:43:49 PM |
 |
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
Posted - 08/17/2009 : 9:41:22 PM
|
I think the KB article is the key.
My thought process:
1. The KB article explains that if you enable AHCI in BIOS, you get the 0x0000007B STOP error I am seeing. You get the error because BIOS is set to use AHCI, but Windows is NOT set to use it. This mismatch between the AHCI setting in BIOS and the AHCI setting in Windows causes the error.
2. My source (physical) machine is NOT set to use AHCI in Windows. The registry string HKLM\System\CurrentControlSet\Services\Msahci has a string called "Start" that is set to a value of "3". If I understand this correctly, any value OTHER THAN ZERO causes this driver to NOT be loaded. This makes Vista/2008/Win7 load faster by not loading all these drivers if no hardware is using them. I am changing the hardware by doing a bare-metal restore onto dissimilar hardware, so this registry value needs to change in order for my restored image to boot.
3. My process should be to change the registry value to 0, take an image, then change it back to 3 on the physical system (no need to make the physical system boot any slower by leaving the value at 0). Then, when I restore the image to the VM, the VM will have this registry with a value of 0, it will load the AHCI driver, and the boot process will succeed.
Does this also mean that a Hyper-V Virtual Machine's BIOS assumes that AHCI is enabled? |
 |
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
Posted - 08/18/2009 : 09:49:02 AM
|
Well, that didn't work...
On the source (physical) machine, the registry settings originally were:
HKLM\system\CurrentControlSet\Services\msahci "start" = 3
<same path> \pciide "start" = 0
So, that means the physical machine's Windows 7 installation expects to use an IDE disk without AHCI to boot.
I tried setting the physical machine's msahci "start" value to 0. I expected this would enable AHCI (I assumed the Hyper-V VM wanted to use AHCI), but that resulted in the same STOP 0x0000007B error. Maybe it doesn't like the fact that AHCI and IDE are both enabled?
I now have set the msahci "start" to 0 and the pciide "start" to 3. This should enable ahci and disable regular IDE. I'm taking the CompletePC image now. We'll see what happens. |
 |
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
Posted - 08/18/2009 : 11:43:38 AM
|
I GOT IT!!
This took a bit more detective work. I decided to approach the problem from a different direction. Instead of guessing what the Hyper-V VM boot process was expecting as far as drivers/services being enabled, I created a new VM, installed Win7 Pro on it, booted it up, and rooted around in the registry to see which boot services were on. I figured that whatever the Win7 installation process detected and enabled is surely what Hyper-V machines need. Here's what a fresh install of Win7 in a Hyper-V VM has in the registry that applies to this issue:
HKLM/System/CurrentControlSet/Services/<item below> and then the value of the "Start" parameter
Aliide = 3 Amdide =3 Atapi = 0 Cmdide = 3 iaStorV = 3 intelide = 0 msahci = 3 pciide = 3 viaide = 3
Comparing these against what my source physical machine's settings were, I noticed two conflicts. My source physical machine had pciide = 0 and intelide = 3. I switched these settings on the physical machine to match what the fresh Win7 VM values are (so that now my physical machine is set to pciide = 3 and intelide = 0), took the CompletePC image, then switched the values back on the physical machine (so that it will still boot properly as a physical machine!).
Then, I booted a new VM to the win7 boot disk, restored this CompletePC image to the new VM, and rebooted it after restore.
Success!
So, a Hyper-V virtual machine running Windows 7 Professional wants to use "intelide" to boot. Once I changed that registry value for intelide to 0 on the physical machine BEFORE taking the image, it restored properly to Hyper-V VM and booted successfully. |
 |
|
|
Mark Minasi
Chief cook and bottle washer
    
USA
9651 Posts
Status: offline |
Posted - 08/19/2009 : 12:43:34 PM
|
| VERY interesting, thanks Vic -- can't wait to get a minute to try this! |
Mark tweetin' at mminasi |
 |
|
|
deandownsouth
Old Timer
  
USA
418 Posts
Status: offline |
Posted - 08/20/2009 : 5:43:35 PM
|
quote: Originally posted by Vic
I GOT IT!!
This took a bit more detective work. I decided to approach the problem from a different direction. Instead of guessing what the Hyper-V VM boot process was expecting as far as drivers/services being enabled, I created a new VM, installed Win7 Pro on it, booted it up, and rooted around in the registry to see which boot services were on. I figured that whatever the Win7 installation process detected and enabled is surely what Hyper-V machines need. Here's what a fresh install of Win7 in a Hyper-V VM has in the registry that applies to this issue:
HKLM/System/CurrentControlSet/Services/<item below> and then the value of the "Start" parameter
Aliide = 3 Amdide =3 Atapi = 0 Cmdide = 3 iaStorV = 3 intelide = 0 msahci = 3 pciide = 3 viaide = 3
Comparing these against what my source physical machine's settings were, I noticed two conflicts. My source physical machine had pciide = 0 and intelide = 3. I switched these settings on the physical machine to match what the fresh Win7 VM values are (so that now my physical machine is set to pciide = 3 and intelide = 0), took the CompletePC image, then switched the values back on the physical machine (so that it will still boot properly as a physical machine!).
Then, I booted a new VM to the win7 boot disk, restored this CompletePC image to the new VM, and rebooted it after restore.
Success!
So, a Hyper-V virtual machine running Windows 7 Professional wants to use "intelide" to boot. Once I changed that registry value for intelide to 0 on the physical machine BEFORE taking the image, it restored properly to Hyper-V VM and booted successfully.
Interesting information.
In the early days of virtualization and P2Vs, if the P2V had issues we would have to go in and tweak similar settings but now this is normally something a VM conversion tool and/or a P2V product accomplishes automagically pretty much without issue. I don't know what tools MS provides, or why it wouldn't flip those bits for you-or at least prompt you as to where you want to restore it to, but VMware Converter does the reconfiguration for you as does PlateSpin and any other program of that type-including bare metal recovery tools that provide any-to-any restores. |
Mark Dean
|
 |
|
|
Vic
Here To Stay
 
148 Posts
Status: offline |
Posted - 08/21/2009 : 10:13:08 AM
|
I'm sure Microsoft's response would be that CompletePC Restore is not intended to be used for P2V or V2P, only for disaster recovery purposes.
It seems to be, though, that they're only half a step away from being able to advertise CompletePC images as P2V/V2P capable. Maybe they could make that an optional component of CompletePC backups; a checkbox that asks if you intend to restore this image to a VM, and if you choose that option, it does all this magic for you.
Even though I'm getting WAY outside of the intended use of these tools, I'd LOVE to be able to take a CompletePC image of an XP box and restore that into the XP Mode function of Win7 Pro/Ent/Ult. |
 |
|
|
joe_elway
Honorable But Hopeless Addict
    
Ireland
6729 Posts
Status: offline |
|
|
DrPCDr
Welcome Newcomer
Canada
3 Posts
Status: offline |
Posted - 11/07/2009 : 10:57:01 PM
|
Vic you are a genius!
 I repair PCs by restoring images of windows onto free space. Stop error 0x0000007b has plagued me.
My images of Windows created on my PC using an IDE desktop HD were made deployable onto any MB including laptops by mergeide.
With windows XP Pro SP2 I could do repair install and keep all my settings except IE 7 which the repair reverts back to IE6.
Before I discovered the beauty of the repair install of XP, I would install windows XP from the Windows CD then copy the hal file to c:\windows\system32 folder on my image of windows. Also, I would copy the boot.ini file to root on my image. This often worked but NOT always.
Most times changing the SATA settings in the bios to compatibility or IDE mode allowed my images of Windows boot no problem!
However, this option in the bios is often not present!
With Vista I Once solved the problem by restoring the image of Windows onto an added 40 GB IDE HD, using the existing larger SATA HD for the data partition.
Many times Acer MBs change the file system of the 1st partition frustrating the installation of Windows. I solved this by restoring a dummy 1 GB partition first before restoring the partition containing the OS. If an XP repair install is required on an Acer then I employ BootitNG to move the OS partition up so the windows XP CD can sucessfully complete the repair.
Recently, my 8-user Windows 7 ultimate image has refused to boot on HP laptops which lack the SATA settings option in the bios. Your post was extremely useful!
Using a spare laptop SATA HD I installed Windows from the Windows 7 DVD. I explored the start DWORD values for aliide, amdide, atapi, cmdide, iastorv, intelide, msahci, pciide, viaide in HKLM/System/CurrentControlSet/Services/
Using my desktop PC I restored my 8-user image of windows 7 onto the customer's 250 GB SATA laptop HD. Using the Windows 7 DVD I completed the boot repair and booted windows on my desktop PC. I explored the start DWORD values for aliide, amdide, atapi, cmdide, iastorv, intelide, msahci, pciide, viaide in HKLM/System/CurrentControlSet/Services/
I noticed that on my image of Windows 7 the msahci start DWORD value was set to 3. On the Windows installed from the Windows DVD, the msahci start DWORD value was set to 0. Also, the pciide on my image was set to 0 but on the windows installed from DVD the value was set to 3.
On my destop PC I changed the start DWORD values for msahci from 3 to 0 and, pciide from 0 to 3.
I put the customer's laptop HD back into the laptop and BINGO! it booted! Hallelujah! Thanks to the genius of Vic!
|
http://drpcdr.ca |
 |
|
|
Mark Minasi
Chief cook and bottle washer
    
USA
9651 Posts
Status: offline |
Posted - 11/15/2009 : 05:17:27 AM
|
One other thing to try in this case, I wonder if it would help.
Once you've got the image in place, then -- before you try to boot it -- boot up WinPE on the image (from a virtual CD/ISO or whatever) and
1) do bcdedit /v to get the GUID of the OS entry you're booting. 2) With that guid, type
bcdedit /set {FILLINTHEGUIDHERE} detecthal on
Might help. |
Mark tweetin' at mminasi |
 |
|
| |
Topic  |
|
|
|