I tried yesterday, just for fun, and found out that the fact you can or cannot boot depends on the version of edk2-bhyve.
The screencopy you post is what you get with the last version and I found no way to boot. There is no efi shell, but in the efi menu you can select the file efi/boot/bootx64.efi (in the iso) and try to boot on. Alas, that doesn't work. There is a problem with this file: like the firmware thinks it's not an efi program.
An earlier version of edk2-bhyve leads to the efi shell. There, you can execute bootx64.efi and Windows launches... Another version of edk2-bhyve boots automatically without manual intervention.
However, Windows starts but hangs on the animated logo and you never reach the installation part. I don't know why. Tried to change some bhyve settings, but to no avail.
I tried yesterday, just for fun, and found out that the fact you can or cannot boot depends on the version of edk2-bhyve.
The screencopy you post is what you get with the last version and I found no way to boot. There is no efi shell, but in the efi menu you can select the file efi/boot/bootx64.efi (in the iso) and try to boot on. Alas, that doesn't work. There is a problem with this file: like the firmware thinks it's not an efi program.
An earlier version of edk2-bhyve leads to the efi shell. There, you can execute bootx64.efi and Windows launches... Another version of edk2-bhyve boots automatically without manual intervention.
However, Windows starts but hangs on the animated logo and you never reach the installation part. I don't know why. Tried to change some bhyve settings, but to no avail.
It depends on the actual iso. I used Windows 7 SP1 ultimate x64. For example, at first try, I picked a x86 iso by error and the efi directory is empty.
I think that this technology evolves, both edk2 and bhyve sides. And these evolutions don't care if you can or cannot run a 16 years old OS. One can find that sad, but it's unavoidable.
You show files inside the boot directory but it's /efi/boot/.
If there is no bootx64.efi, how your iso can boot at install time since it's the default name that a firmware is looking for?
Did you mount all the partitions this iso may have? I saw bootx64.efi file from the efi shell and the efi boot menu. I didn't dream.
This mystery has ended. sysutils/xorrisso reports: Found hidden El-torito image for EFI.
So, this file exists and this is the one that the efi firmware boots (well, depending on its version...).
"sectorsize=512" changes nothing. I read the vm-bhyve template for Windows and didn't find anything interesting. So, on this topic, the riddle is always there.
Boot Windows 7 in bhyve using Clover (UEFI shim) Clover acts as a “bridge” between bhyve’s modern UEFI firmware and Windows 7’s older bootloader. bhyve → EDK2 UEFI → Clover → Windows 7 boot files
This bypasses the missing bootx64.efi problem entirely.
Step 1 — Get Clover ISO
You need the Clover ISO (not the USB version). The file is usually named something like:
Code CloverISO-XXXX.tar.lzma
CloverISO-XXXX.iso
Once extracted, you’ll have a bootable ISO that bhyve can load.
GitHub — Official CloverBootloader Releases
This is the most up‑to‑date and reliable source. Look for files like: Clover‑5167‑X64.iso.7z (You’ll extract it to get the ISO
Step 2 — Create your Windows 7 disk image
You can use:
a raw disk (.img)
a ZFS volume
or a qcow2 converted to raw
Example:
Code truncate -s 40G win7.img
Step 3 — Boot Clover in bhyve
This is the key part. You boot Clover as the primary UEFI loader, and Clover will then detect the Windows 7 boot files.
A typical bhyve command looks like this:
Code bhyve \
-c 2 \
-m 4G \
-H -w \
-s 0:0,hostbridge \
-s 1:0,ahci-cd,./Clover.iso \
-s 2:0,ahci-hd,./win7.img \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
win7vm
What this does:
Loads bhyve’s UEFI firmware
Boots Clover from the ISOClover scans the Windows 7 disk
Clover exposes a UEFI boot entry for Windows 7
You select it and Windows boots normally
Step 4 — Install Windows 7 (if not already installed)
If your disk is empty, Clover will still boot the Windows 7 installer if you attach the Windows 7 ISO as a second CD-ROM:
Code -s 1:0,ahci-cd,./Clover.iso
-s 1:1,ahci-cd,./Win7.iso
Clover will detect the installer and let you launch it.
Step 5 — After installation
Once Windows 7 is installed: You can remove the Windows 7 ISO
Keep Clover as the bootloader
Or install a UEFI bootloader inside Windows and remove Clover later.
It’s basically a “UEFI translator”.
Boot Clover + Windows 7 installer (fresh installation)
Use this when you want to install Windows 7 from ISO.
sh bhyve \
-c 2 \
-m 4G \
-H -w \
-s 0:0,hostbridge \
-s 1:0,ahci-cd,./Clover.iso \
-s 1:1,ahci-cd,./Win7.iso \
-s 2:0,ahci-hd,./win7.img \
-s 3:0,e1000 \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
win7vm
What this does
Loads bhyve’s UEFI firmware
Boots Clover from the first CD drive
Clover detects the Windows 7 installer ISO
Clover exposes a boot entry → you select it
Windows 7 installer runs normally
Installation goes onto win7.img
Disk image creation (if you need it)
sh
truncate -s 40G win7.img
Or use a ZFS volume:
sh
zfs create -V 40G -o volblocksize=64k zroot/win7
Then replace ./win7.img with /dev/zvol/zroot/win7.
Notes for best compatibility
Windows 7 prefers 512‑byte sector size If using a ZVOL, set:
Code
-o volblocksize=4k
Windows 7 works fine with ahci-hd (virtio-blk requires older drivers)
Clover versions around r50xx are the most stable for this trick
This is a workaround to ran Windows 7 x64 with Bhyve, Ms Windows started to use Uefi with Windows 8, so before just Bios releases, but if you use this method you probably can ran Windows 7 x64, only, with Bhyve, if you would ran 32 bit version , you need to use Qemu, you could also create a VM with Qemu and then attach the disk image to Bhyve, but Clover solution seems to be smoothly....Let's try it ; )
Windows 7 x64 can boot under UEFI. There is an hidden el-torito volume that is msdos formatted and contains /efi/boot/bootx64.efi.
It doesn't boot at all with the last edk2-bhyve version but it's ok with some previous ones (needs sometimes to be launched from the UEFI shell).
The main problem is Windows 7 hangs at startup, looks like it get some troubles with the hardware detection.
I don't know if your software can help on this last point. It's not what it has been written for.
By the way, I'm not the Op of this thread. It's just out of curiosity. I won't use such an OS full of unpatched security flaws.
Hi
Got here looking for a solution with installing MS Windows 2008 R2 in bhyve (need it to run some legacy applications there).
Quick sum-up of my research so far:
- Windows 7 / 2008 support was broken with edk2-stable202508 (edk2-bhyve-g202508 pkg)
- latest working version is edk2-stable202505 (there is no corresponding port)
- latest working version with released port is edk2-stable202308 (edk2-bhyve-g202308_5 pkg)
Sources:
- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292897
- https://www.freshports.org/sysutils/edk2
In addition:
- original Windows 7 / 2008 R2 do not support pure UEFI (i.e. without CSM) - there is an issue with int10. UefiSeven is supposed to solve this by providing "fakevesa" to override int10 handler.
- New UEFI cause ACPI issues with Windows 7 / 2008 R2 systems.
Also, found the related (?) bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295943
So, there is a hope to have fixed edk2-bhyve package soon (or, better say edk2-legacy package compatible with legacy Win7 systems).
But for now the only option is to install old edk2-bhyve-g202308 package.
Unfortunately, I was not able to install edk2-bhyve-g202308_5 package on my current system - 15.1-RELEASE: pkg: wrong architecture: FreeBSD:14:* instead of FreeBSD:15:amd64
so I installed FreeBSD 14, deployed edk2-bhyve-g202308 and bhyve-firmware-1.0 packages there (via pkg add -M ...), and copied /usr/local/share/edk2-bhyve/* to a new FreeBSD 15 system.
Having that done, Windows 2008 R2 installation was able to start from ISO, but stuck on "Stating Windows". The same for the Windows 7 x64.
Tried to play with Rufus and UefiSeven, but failed as well - stuck on the same "Stating Windows". Playing with UefiSeven's force_fakevesa option to overwrite Int10h handler change nothing.
Also, found another one option, but didn't try it yet as well:
Start windows 8/10 install media on UEFI mode (csm off)
Then press SHIFT+F10 to open a command line
Prepare the disk layout:
> diskpart
list disk
select disk N (N is your install drive)
clean (will erase all data!!!)
convert gpt
create partition efi size=100
format quick fs=fat32 label="EFI"
assign letter="S"
create partition primary
format quick fs=ntfs label="Windows"
assign letter="W"
exit
The interesting fact: I restored old Windows 2008 R2 system image (from FreeBSD 13 ages), created a VM with that image and it started successfully! Though, I don't remember if I did some patch/hack for that system or/and ISO to install it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.