bhyve How to run win7 on bhyve?

I cant boot the install iso
1000042283.png
 
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.
So which version is working?
 
So which version is working?
None of the ones I tested. And if you speak about those I can boot with, I just don't know. It's some files I keep to test in such cases.

There's not a bootx64.efi in win7_sp1.iso
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.
 
There is no bootx64.efi file on mine either ... and vm-bhyve boots and install Windows 7 just fine.

vermaden_2026-02-06_12-17-06.png


vermaden_2026-02-06_12-17-19.png


This is my vm-bhyve config for Windows 7 machine if that helps.

Code:
% cat /vm/windows7/windows7.conf
loader="uefi"
graphics="yes"
cpu=2
memory=4G
ahci_device_limit="8"
network0_type="e1000"
network0_switch="public"
disk0_type="ahci-hd"
disk0_name="disk0.img"
disk0_opts="sectorsize=512"
utctime="no"
 
Maybe this story of sectorsize...

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.
 
There is no bootx64.efi file on mine either ... and vm-bhyve boots and install Windows 7 just fine.

View attachment 25285

View attachment 25286

This is my vm-bhyve config for Windows 7 machine if that helps.

Code:
% cat /vm/windows7/windows7.conf
loader="uefi"
graphics="yes"
cpu=2
memory=4G
ahci_device_limit="8"
network0_type="e1000"
network0_switch="public"
disk0_type="ahci-hd"
disk0_name="disk0.img"
disk0_opts="sectorsize=512"
utctime="no"
which iso you use?
I don't use vm-bhyve, maybe vm-bhyve had set something, I will try vm-bhyve later
 
There is no bootx64.efi file on mine either
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
 
THERE IS a bootx64.efi
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 ; )
 
Ms Windows started to use Uefi with Windows 8
Not true.

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.
 
Back
Top