Boot Windows 7 with Enable UEFI set.

Discussions about using Windows guests in VirtualBox.
Post Reply
DocBrown
Posts: 28
Joined: 2. Feb 2010, 09:42
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Fedora11,Windows Vista,Windows Server 2008

Boot Windows 7 with Enable UEFI set.

Post by DocBrown »

I have an older computer with Windows 7 installed. I want to transfer that installation to a VirtualBox Virtual Machine. I am using Acronis 2019 Universal Restore in an attempt to restore an image backup of the Win 7 to the VM. The issue I am struggling with at the moment is this:

On the hardware computer, the Win 7 OS is booting using the UEFI bootloader. On the Virtualbox I can configure the VM to boot using UEFI, but VB says that it is for "special OSs" and not recommended for Windows 7. I was able to restore the Windows 7 image to the VM, and set the UEFI boot mode but when I try to boot it, the boot up hangs. When I attempt to boot to Safe Mode, it also hangs after all the drives are loaded. I'm pretty sure it is the UEFI boot process is involved because the same hang occurred with I booted from a Windows 7 Pro Install media. The install media does not hang when the VM is set to BIOS mode.

So, at this point I would appreciate any suggestions to get past this. Is there a workaround so I can boot the Win 7 VM? Is there a way to change the boot mode to BIOS, either on the original computer or VM, so that it boots without the "Enable UEFI" set?

Some specs:
Old computer: Asus Z170 Pro Motherboard, 16 GB Ram, 256 GB M.2 SSD. Windows 7 Pro OEM.
New Host computer: Asus H670-Pro Motherboard, 32 GB Ram, 512 GB M.2 SSD, Plus other SSDs and disks. Windows 10 Pro.
Software: VirtualBox 6.1, Acronis 2019,
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Boot Windows 7 with Enable UEFI set.

Post by scottgus1 »

Essentially, you're trying to move the 7 OS from one PC to another. The source PC boots from UEFI, the destination PC boots from Legacy BIOS. Web-search to solve this problem referring to two real PCs, and the solution will probably work in the VM. I don't know what the solution is, but it will probably involve changing something in the 7 OS, perhaps altering the boot loader, or repair-installing the 7 OS. Since you're using Acronis, they may have some ideas.
DocBrown
Posts: 28
Joined: 2. Feb 2010, 09:42
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Fedora11,Windows Vista,Windows Server 2008

Re: Boot Windows 7 with Enable UEFI set.

Post by DocBrown »

Thanks for the suggestions. Yes, that's pretty much what I've been trying. But there's not much info on doing this because few want to do this. And it doesn't appear to be supported. I've had some success in accomplishing this. What I've done is this (in summary):

1. Create a image backup of the physical machine with Acronis.
2. Create a Acronis Universal Restore media from another Win 7 VM (same version) and add the Virtualbox drivers into the restore media.
3. Create a new disk image for the VM and initialize it as a MBR BIOS/Legacy disk (not a GPT disk.)
4. Restore the disk image to the new VM disk using the Acronis Recovery media.
5. Run the Acronis Universal Restore media on the restored image.
6. Run the BCDBoot utility to insure the boot loader is configured correctly.
7. Boot the VM.

This actually seems to mostly have worked. I can boot the VM and my programs are working. The very interesting aspect is that the OS is OEM (the Product key has OEM in it). But I was able to activate it Online. There are still a couple of strange issues though. Most Desktop Icons are missing, and somehow the permissions on the C:\Users\Public folder are messed up. There may be other issues I'm sorting out with a Repair install.

Anyway, although unsupported it seems possible.
Post Reply