Physical to Virtual Win7 Guest Blue Screens at Boot

Discussions about using Windows guests in VirtualBox.
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

I am trying to convert a physical Win7 machine that is having overheating problems to a VM so that I can run it under VirtualBox on a different Win7 machine while it away being repaired.

I have tried to follow all of the posts on physical to virtual and blue screen issues, but haven't had any success yet.

I am using VirtualBox 4.1.16.
The host machine is:
Win7 Professional SP1;
HP dv7 Notebook x64-based PC;
Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2201 Mhz, 4 Core(s), 8 Logical Processor(s)
8.00 GB Physical Memory
750 GB Disk (320 GB free); NTFS

The host machine was created named "Sony Vaio" with VirtualBox as Win7 64-bit with 4GB memory and using an existing VHD. The VHD was created usin the latest DISK2VHD running on a Sony Vaio notebook. This system is similar to the host machine:
Win7 Professional SP1;
Sony Vaio Notebook x64-based PC;
Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz, 1600 Mhz, 4 Core(s), 8 Logical Processor(s)
6.00 GB Physical Memory
500 GB Disk (150 GB free); NTFS
The resulting VHD is 292 GB and was copied to the "VirtualBox VMs\Sony Vaio" directory. It can be attached without a problem as 465 GB and has the following partitions:
Partition #0: 9.38 GB (Recovery Partion)
Partition #1: 100.00 MB (Active, Primary Partition)
Partition #2: 456.28 GB (Primary Partition)

When the VM is started, it seems to boot and the "Starting Windows" swirl goes for a while, then a Blue Screen followed by a reboot. This continues in a loop until the VM is shut down. I have attached the log file.

At this point I don't know what to do next to resolve the problem.
Attachments
Sony Vaio-2012-06-12-17-52-08.log
(80.93 KiB) Downloaded 145 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by mpack »

I would need details of the reset, e.g. a captured view of the BSOD screen. You can get this by temporarily disabling the VMs ability to perform a reset, by using the following command :-

Code: Select all

VBoxManage setextradata "VM name" "VBoxInternal/PDM/HaltOnReset" 1
You would need to use the same command later, with '0' instead of '1', to restore normal behaviour.

Other suggestions :-
  1. See if the VM will boot up in safe mode (press F8 when boot starts).
  2. If you have the setup DVD then you can try booting from it and selecting "Repair installation".
  3. If all you need is to access data on this disk then you could try attaching it as a secondary (non boot) drive on another VM
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

Thanks for the reply.

I have attached a screen capture of the BSOD.

Response to suggestions:
1. Safe Mode gets the same BSOD.
2. Don't have a Win 7 Pro DVD. Can I create a recovery DVD from the Recovery partion on the drive OR use the "Repair your computer" boot option?
3. I want to use the VM to run some applications that are difficult to transfer to a new machine.
Attachments
F8 Options
F8 Options
Boot Options.png (49.4 KiB) Viewed 30233 times
BSOD
BSOD
BSOD.png (61.65 KiB) Viewed 30233 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by mpack »

"Stop 0x7B" is usually caused by an inaccessible boot disk. I'm not experienced with Win7 P2Vs, but on XP this would be caused by changing IDE controller type, or configuring SATA when IDE was expected (perhaps the reverse might be true as well). You might try posting the results of "VBoxManage showvminfo <vm name>".
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

The controller is: SATA Controller; Type IntelAhci (see attached file).

This seems to be a match for the msinfo32 output from the physical Sony machine (VHD source):
[IDE]
Item Value
Name Intel(R) 5 Series 6 Port SATA AHCI Controller
Manufacturer Intel
Status OK
PNP Device ID PCI\VEN_8086&DEV_3B2F&SUBSYS_9067104D&REV_05\3&11583659&0&FA
I/O Port 0x0000E070-0x0000E077
I/O Port 0x0000E060-0x0000E063
I/O Port 0x0000E050-0x0000E057
I/O Port 0x0000E040-0x0000E043
I/O Port 0x0000E020-0x0000E03F
Memory Address 0xE8E06000-0xE8E067FF
IRQ Channel IRQ 19
Driver c:\windows\system32\drivers\iastor.sys (9.6.0.1014, 528.02 KB (540,696 bytes), 3/29/2012 4:41 PM)
I noticed the port difference and tried to set the VM Sata ports from 1 to 6, but this gave the same BSOD.

On the physical machine, the C: partition is marked as the boot partition. When I attach the VHD directly to the HP machine (not via VirtualBox), Win7 Disk Management does not indicate that the partition (or any partion on the VHD) is a boot partition.
Attachments
VB_Script_Output.txt
Outout from: VBoxManage showvminfo "Sony Vaio"
(3.05 KiB) Downloaded 95 times
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

Follow up to last post. Here is how disk management sees the disk partion on the physical machine AND how the VHD partitions are viewed on the host machine
Attachments
VHD 3 partitions are volumes G:, H:, and blank
VHD 3 partitions are volumes G:, H:, and blank
VHD Partitons.PNG (22.97 KiB) Viewed 30225 times
Source Disk used with DISK2VHD utility
Source Disk used with DISK2VHD utility
Disk Management on Physical Sony Machine.JPG (56.04 KiB) Viewed 30225 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by mpack »

You can also view the partition info from a VHD using CloneVDI. I would trust that more than Windows disk manager, which be unhappy about presenting more than one partition as "the" boot partition.

And, though you seem to know what you're doing I had better put it out there... I assume that in both cases you imaged the whole disk with Disk2VHD, and didn't just image the main partition.
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

Yes, I imaged the entire disk.

Here is the partition info from CloneVDI, if you look at the physical machine info in previous post, the 100 MB (2nd) partition is marked as "system" and the 450 GB (3rd) partition is marked "boot". In Clone VDI, the second partition is marked as bootable Y. Not sure of how the "system" partition is used in the boot process.
Attachments
CloneVDI Partition Screen.png
CloneVDI Partition Screen.png (21.32 KiB) Viewed 30218 times
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

I may not have been clear on one of my early posts. When I try F8 Safe Mode, it does load all of the the .sys files, ending with \windows\system32\drivers\classpnp.sys. Then after about 15 seconds, I get the same BSOD that I get without safe mode. I may be wrong, but to me, this would indicate that it is not a problem reading the disk. At least initially.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by mpack »

You can believe what CloneVDI tells you about the partition map contents. The bootable partition contains the Win7 boot manager and possibly other stuff - I've never really had cause to learn a lot about Win7. The main (large) partition is booted by the boot manager, not the BIOS, hence it isn't marked bootable.


I have become convinced that your problem is that Win7 is failing to find the main partition because the drive UUID or controller type has changed. It looks like Win7 is even more fussy about that than XP was. You may want to read this thread that I found on the VMWare forums: ignore any suggestion of using VMWare converter, you are only interested in solutions that involve dealing with the Win7 config problem directly.
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

Thanks for the link, I think we are getting to the root of problem. I should have researched the STOP x7B earlier.

There is another really good discussion here http://www.minasi.com/forum/topic.asp?TOPIC_ID=31980 that is for Hyper-V. It comes to the same solution of changing the value of HKLM/System/CurrentControlSet/Services/intelide in the registry. It suggests that you change the registry on the physical machine prior to the P2V. Running DISK2VHD again takes a while, so I will try the method from the link in your post first.

Do you know if there is any way to change the registry hive on the VHD if I attach it to the host machine and have access to the \Windows\System32\config\system directory? This would save me having to get the DVD.
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

Q. How can I make registry changes to an offline Virtual Hard Disk (VHD) with Windows 7 or Windows Server 2008 R2?
A. @ http://www.windowsitpro.com/article/vir ... r-2008-R2-
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by mpack »

PhilS in JP wrote:Do you know if there is any way to change the registry hive on the VHD if I attach it to the host machine and have access to the \Windows\System32\config\system directory? This would save me having to get the DVD.
I've never done it, but yes there is a way: basically I think you run regedit from a command line, giving it the name of a registry hive to edit. I'm sure you can google for the details. Of course you will need access to the VHD contents. There are several ways to do that, e.g. you can mount the VHD as a virtual drive on the host, or attach the VHD to another Windows VM, or you can boot your own VM from a live CD containing whatever is needed to run regedit.
 Edit:  Ah, I see you already searched for data on editing non-local registries. 
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

No Go. I attached the VHD, used regedit to load the H: drive (VHD C: drive) hive into TEMP. The CurrentControlSet001/Services were all set to the values in the links from previous posts. The CurrentControlSet002/Services/intelide was a 3, so I changed it to 0. I then unloaded the hive to H: (and yes, I reloaded it to check that the change took). After detaching the VHD, I started the VM and got the same error.

I will try creating a new VM when I have the Win7 x64 Pro DVD and then check how all of ide services are defined in the fresh Win7 install. I will try the approach in post "11. May 7, 2012" within this thread.
PhilS in JP
Posts: 10
Joined: 11. Jun 2012, 22:47

Re: Physical to Virtual Win7 Guest Blue Screens at Boot

Post by PhilS in JP »

It's working. The final piece was the msahci setting in the registry. Both posts referenced earlier had msahci = 3. When I installed a fresh Win7 VM from an install disk, the registry had both intelide = 0 and msahci = 0.

I used the method of attaching the VHD, regedit32, load hive, change values, unload hive, and detach VHD (as described before). The VM now boots. :D

On the first boot there was a missing battery message from power management, but a reboot allowed Win7 to reconfigure and that no longer appears.

The only issue now is that it attempts to run a chkdsk on the recovery partition on every boot. That fails and then everything works after that. Any idea how to stop the chkdsk? I haven't looked in the forum yet, but will do that later today.
Post Reply