Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there a way to run Windows 7 Pro 64-bit EFI system in a VM with raw disk access?
Reading around the web indicates running Windows 7 in VirtualBox with EFI is not supported. This bug report and this discussion seem to affirm my findings.
Do any of the other virtualization platforms support this kind of configuration?
Thanks for any ideas.
Background:
I am helping a person configure and learn CentOS 7 on a new laptop. The laptop came with Windows 7 Professional 64-bit pre-installed. The laptop uses EFI.
This person is dependent on certain Windows vertical apps and currently is dual booting. This person would like to stop dual booting by running Windows 7 Pro inside a VM using raw disk access.
I have used VirtualBox raw disk access several times with no problems.
The difference this time is EFI. All of my past efforts with raw disk access were with BIOS/MBR systems. This project is my first exposure to using EFI in VirtualBox.
Perhaps VirtualBox is not a sane approach in this particular use case.
Converting Windows 7 to virtual (P2V) might be possible but not reasonable. Too much data to convert as well as the usual problems with Windows partition management and reactivation.
Possibly we could configure the EFI to use CSM and an MBR, but I need some tutorials to proceed further.
KVM/qemu can run 64 bit Win 7 in (U)EFI with raw disk access, or, in fact, any kind of disk access. There's any number of tutorials available, wth an active mailing list. Check out vfio.blogspot.com
Two issues really. Can a VM run a physical drive and two can Windows HAL allow it. (maybe a legal issue with this)
Almost all VM's can run a physical drive by some means. It is not a recommended way.
Booting to a usb would prevent disk access issues. Guess one could boot directly to a linux partition and then run the original windows partition. Not sure how well that would work exactly. I've done it with limited success.
Now the second part may be how what I assume would be windows OEM being tied to the hardware. I think I've run into issues here. Once you fix hal or if it can fix hal then the actual install will be also changed and to boot again you'd need to fix hal back.
Try the programs in wine or maybe ReactOS or just use dual boot might end up being the solution.
I ran a quick test of EFI support in VirtualBox with Windows 7. When using EFI in VirtualBox, Windows 7 32-bit does not install at all. VirtualBox simply dumps into an EFI shell. I think the reason is Windows 7 32-bit does not support EFI, but I am guessing. Windows 7 64-bit starts to install and then freezes. So that nominal effort more or less affirms that Windows 7 is not supported in VirtualBox with EFI.
Windows 10 installs just fine when using EFI in VirtualBox.
I am presuming KVM/QEMU uses OVMF for the EFI emulation layer. I would guess the VirtualBox devs use the same code in VirtualBox. So I do not know why KVM/QEMU supports Windows 7 and VirtualBox does not.
@mostlyharmless: This is encouraging to read. Sadly, I am familiar only with VirtualBox. Learning KVM/QEMU has been on my to-do list for some time. Looks like I should bump that item higher on my list.
I looked at vfio.blogspot.com. At the moment everything written there is over my head. I need to read some tutorials that are written at the baby step level. Something that provides a good "block diagram" and flowchart overview of the KVM/QEMU/CentOS tool chain and required packages. If possible at your end I would appreciate some links to get me started at that beginner level.
@jefro: I have used raw disk access several times, including three current systems. I never read anything about the approach being not recommended. I have read that concurrent access of the affected partitions from both the host and guest is likely to corrupt data. I avoid concurrent access by creating udev rules to ignore the Windows partitions. That way the partitions are not listed in file managers and then are not easily inadvertently mounted while running the VM with raw partition access.
Regard OEMs, VirtualBox supports spoofing firmware data. A few years ago I created a script that uses dmidecode to grab BIOS and SLIC information. The script grabs the actual eth0 MAC address. The MAC address seems to be a heavily weighted attribute of the [re]activation scheme. The script then creates another one-shot script that I use to populate the VirtualBox config file with the extra data. The extra data seems to avoid needing to reactivate.
Once the VM is functional using raw disk access and firmware spoofing, I then remove boot access from the GRUB boot loader. Basically I disable dual booting. That way there never is a conflict with physical and virtual hardware detection that triggers reactivation.
The stumbling block this time is I never worked with EFI in VirtualBox. I simply do not have any such hardware.
WINE will not help with this person's Windows needs. He is running special vertical apps related to his business. Neither of us have time nor the energy to tinker with WINE. ReactOS is a non conversation.
Maybe it would be easier to use MS Virtual PC and run Centos in the VM, leaving windows 7 as is.
Yes, but ....
The user wants to start migrating away from Windows. While he has certain Windows vertical app dependencies, he is looking long term and wants to migrate. He uses CentOS 6 in almost all of his servers. His first choice for his first desktop migration was CentOS 7. He is content with the MATE Desktop because of the familiarity with GNOME 2 in CentOS 6.
Outside his vertical dependencies, he wants to move forward. He does not want to move to Windows 10 and the clock is ticking slowly toward EOL for Windows 7. The proverbial handwriting is on the wall with respect to Windows 7. Three years until EOL provides him plenty of time to migrate, acclimate, and decide what to do about the Windows dependencies.
Interestingly, he has a low opinion of Windows because of the way everything is masked and hidden from the user, making debugging and troubleshooting difficult. He is not tickled at the way Windows 10 is designed or the way the MS folks are moving forward.
He is no hurry to migrate and is prepared to tackle each challenge along the way. Because I had created several VirtualBox VMs using raw disk access, we both thought we could do likewise on his new laptop. I never thought about EFI. As Windows 10 seems well supported in VirtualBox with EFI, all we can do is shrug and frown that Windows 7 lacks the same support. Reading the bug report I linked in the original post indicates this is not a high priority for the VirtualBox devs. C'est la vie.
So now we move forward looking at other virtualization options. For some time I have been wanting to learn more about KVM/QEMU and the libvirt/virt-manager platform. Looks like something to do this winter.
If you are curious, one of the dependencies is Quickbooks, which is dependent on Intuit cloud servers. He fully understands his lock-in. He also uses some networking tools that only run in Windows. We might find work-arounds for the networking tools, but QuickBooks is a tight and mean vendor lock-in challenge.
I have a small efi computer that as I recall has a way to load windows 7 to eif. Forget how to do that.
I have managed to get 7 installed on uefi before, although I don't remember how to do so either as it's been a while since I tried (and it was a lot of frustration getting it to work.
The problem is not installing Windows 7 in hardware with EFI. The laptop came with Windows 7 Pro 64-bit preinstalled.
There was no problem installing CentOS 7 on the laptop and dual booting with GRUB.
The problem is VirtualBox does not support Windows 7 using its own EFI support layer emulation.
I have used raw disk access several times to avoid dual booting. Every time the VM was not using the VirtualBox EFI support emulation. My past projects all used traditional BIOS emulation.
This lack of support is evident to me when I tried to install Windows 7 32-bit and 64-bit inside a VirtualBox VM with the EFI support enabled. I was unable to install. Disabling the EFI support emulation results in Windows 7 installing in the VM without incident.
That all said, possibly there is a unique way to configure VirtualBox. That is why I started this thread. Yet the links in the original post indicate Windows 7 is not supported in VirtualBox when using EFI emulation.
Right now the user has to dual boot. Doable and livable, but not efficient or ideal.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.