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