bhyve windows 11 on bhyve

I've tried this the other day but couldn't get it to work. During the installation of Windows 11, I'm being presented with the dredded "your system doesn't match the minimum requirements"-type message which I've seen before on systems not supporting TPM.

rootbert Are you able to provide a bit more information on this? I looked at the utility you linked in your post and it would seem like the Auto ISO option is supposed to remove the TPM requirement automatically when generating the ISO. Am I mistaken here or am I missing something else?

I'd like to spin up a Windows 11 VM for CI/CD purposes but Microsoft seems to make this intentionally difficult with the TPM requirement as of today. I purchased a genuine license and everything...
 
How I made it:
  1. install Windows 10
  2. download the install image of Windows 11
  3. unpack the image with WinRar or 7Zip
  4. delete sources\appraiserres.dll from the unpacked image
  5. execute setup.exe, and:
  • disable the checkbox that would download updates during installation, or
  • cut the internet till the basic installation is done (haven't tried this)
Just not having sources\appraiserres.dll during installation disables the TPM and secure boot check.
 
I gave it a shot again yesterday but also failed. Tried it with the auto upgrade option from the script and the auto iso option, but both failed, the VM just crashed - maybe a virtio-driver/bhyve issue? At the moment I am short of time, but will look into this with the previous setup (FreeBSD 13.0 and not 13.1)... will comment here
 
well that was fast ;) ... I was using my FreeBSD 13.1 system with bhyve for this. With the script from the 1st post I chose "auto iso" settings to generate an ISO file; this ISO file can then be used for a fresh install (Upgrade did not work in my case). I used virtio-win-0.1.185.iso as an additional cdrom for the storage driver, after the complete installation I used virtio-win-0.1.217.iso for the network interface. Windows 11 now works as expected! ... I have updated wiki.freebsd.org
 
Thank you for giving this a try again. I guess I have to try again as well.

My host is tracking stable/13 so I think I should be good there.
Is there anything special, non-inutitive or "fishy" that you have to do when using the auto iso option?
 
no, it is really easy ... just execute the script and two more clicks to generate the iso file which can then be used for the install
 
I circled back to this today: No idea what changed but this time I was able to install Windows 11 without the TPM issue.
For future readers: If you don't feel like setting up a Microsoft account, disabling Internet access of the VM during Installation allows to create a local account.
 
Good morning, afternoon, or evening.

You can bypass TPM using the below instructions. Good luck.

These instructions were taken from Windows 11 Guest VM with VirtIO on Libvirt.

Bypass Hardware Checks​

If the guest does not satisfy the Windows 11 System Requirements, you can bypass the checks by:
  1. Press Shift-F10 to open Command Prompt.
  2. Run regedit.
  3. Create key HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig with one or more of the following DWORD values:
    • BypassRAMCheck set to 1 to skip memory size checks.
    • BypassSecureBootCheck set to 1 to skip SecureBoot checks.
    • BypassTPMCheck set to 1 to skip TPM 2.0 checks.
  4. Close regedit.
  5. If the “This PC can’t run Windows 11” screen is displayed, press the back button.
  6. Proceed with installation as normal.
Be aware that Windows 11 is not supported in this scenario and doing so may prevent some features from working.
 
Just to chuck into the mix:
  • BypassCPUCheck - Allows for 1 CPU core
  • BypassStorageCheck - Allows for <50GB disk
Just updated my "cesspit" VM from Windows 7 to Windows 11 recently and came across these.
 
Just wanted to add a bit that worked for me:

Shift+Fn+F10 is what displayed the command prompt windows at the Windows 11 install screen with the "Install Now" button.

Thanks to the people in this thread for the knowledge.
 
Good morning, afternoon, or evening.

You can bypass TPM using the below instructions. Good luck.

These instructions were taken from Windows 11 Guest VM with VirtIO on Libvirt.

Bypass Hardware Checks​

If the guest does not satisfy the Windows 11 System Requirements, you can bypass the checks by:
  1. Press Shift-F10 to open Command Prompt.
  2. Run regedit.
  3. Create key HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig with one or more of the following DWORD values:
    • BypassRAMCheck set to 1 to skip memory size checks.
    • BypassSecureBootCheck set to 1 to skip SecureBoot checks.
    • BypassTPMCheck set to 1 to skip TPM 2.0 checks.
  4. Close regedit.
  5. If the “This PC can’t run Windows 11” screen is displayed, press the back button.
  6. Proceed with installation as normal.
Be aware that Windows 11 is not supported in this scenario and doing so may prevent some features from working.
Just wanted to make sure I understand things correctly. Does "not supported" mean, among other things, "no updates"?
 
So I had this working jolly well yesterday.

Including passing through an AMD GPU to the Windows guest. :cool:

(Note: in addition to the trick above to skip the TPM check, you also need another Shift-F10 trick to skip the Windows Live account setup: in 2022H2, it's become mandatory and not having an internet connection isn't a valid excuse. But you can run a secret cmd.exe program that skips it.)

However, I installed a bunch of updates, and now I cannot boot my VM with a USB controller passed through. The VM crashes reliably almost immediately on boot. That occurs even for the Windows Automatic Repair.

Take out the USB Controller, all is well.

More experimentation required. It's such a pain to go through all the steps to disable TPM and Windows Live accounts, then rip out all the adverts after installing, I'm not sure I want to do it again. Also for some reason Windows didn't enable restore points, so I can't even roll back. I knew I should have made a zfs snapshot!
 
Bah.

I can't run the Win11 installer with any kind of pass through devices. The installer hangs very early into its boot -- still the TianoCore logo is on screen. Fine, remove the passthrough, re-run the install to a blank disk. Open Windows -- all looks good. Take a snapshot of the disk. Then pass through the devices on next boot. Great, everything works -- USB is picked up, bluetooth via USB works. Bluetooth audio works. XBox controller pairs. Even AMD GPU works when drivers are installed from the web. Reboot again and it still works.

But subsequent VM boot, it hangs in the same place with the TianoCore logo. Some weird driver issue?

I roll back to the snapshot. Still hangs. This isn't supposed to be how computers work ...

I remove the passthrough, boots normally. I reboot the host and try the passthrough again. Hangs. I spin up a Windows 2022 VM and passthrough the same devices. Works fine, including GPU (except Win22 broke bluetooth audio). Back to Win11? No, that VM doesn't work.

Time to bust out gdb to see what's going on. But gdb can't stop bhyve -- although the process appears as traced in the proc table, gdb doesn't ever get the stop notification, so gdb just hangs. I think this can only happen if the child is stuck waiting for a syscall to finish. bhyvectl can't destroy the VM either, it just hangs. So my guess is somehow Windows 11 22H2 has tripped some weird bug in the bhyve kernel module, but Windows Server 2022 doesn't have this problem.

Argh. Do I want to set up the kernel debugger or is it time for bed?
 
Ok, lowering the virtual CPU count from 18 to 1 seems to have eliminated the problem. That indicates to me there is a race somewhere.

This operating system is dog slow with only one CPU though ...
 
Had the same problem with Win 10. Hangs every other boot. Even opened a PR on this problem, but sadly, never received any replies.

Had no other choice but to remove from config ALL my PCI-E addon passthru devices (USB card first, then NIC with 4 ports). Thankfully, on-board USB3 passthru (VIA) does NOT have that effect. Good GREAT job done by devs here:) 👍, because originally the onboard VIA controller, when used as passthru, made computer reboot soon after boot and was mentioned among the "problematic" ones...

And bridged VLAN works just fine!! It's actually even better than the passthru NIC because Windows had problems setting VLAN ID on that one, even with Intel drivers installed. But with virtio-net driver and bridged tap device you have the whole bunch of stuff available 😃😃

Leaving 1 cpu is a MUST on Windows, I'm afraid. I"m using 1 cpu x 4 cores though.
 
Leaving 1 cpu is a MUST on Windows, I'm afraid. I"m using 1 cpu x 4 cores though.
My Win11: […] -c sockets=1,cores=2,threads=2 […] -s 7,passthru,33/0/0 […]
I've noticed that after opening f.e. a browser this VM crashes on startup - but directly after a reboot it always works fine. But so far I didn't invest more time on this - this Win11-VM is seldom used and just for tests.
 
Had the same problem with Win 10. Hangs every other boot. Even opened a PR on this problem, but sadly, never received any replies.

Had no other choice but to remove from config ALL my PCI-E addon passthru devices (USB card first, then NIC with 4 ports). Thankfully, on-board USB3 passthru (VIA) does NOT have that effect. Good GREAT job done by devs here:) 👍, because originally the onboard VIA controller, when used as passthru, made computer reboot soon after boot and was mentioned among the "problematic" ones...

And bridged VLAN works just fine!! It's actually even better than the passthru NIC because Windows had problems setting VLAN ID on that one, even with Intel drivers installed. But with virtio-net driver and bridged tap device you have the whole bunch of stuff available 😃😃

Leaving 1 cpu is a MUST on Windows, I'm afraid. I"m using 1 cpu x 4 cores though.
Not quite sure your bug is the same. In my case I cannot destroy the VM, and any attempt to interact with bhyve (ctrl-C, gdb attach, kill -9) fails because it is stuck in a deadlock in the kernel.
 
Not quite sure your bug is the same. In my case I cannot destroy the VM, and any attempt to interact with bhyve (ctrl-C, gdb attach, kill -9) fails because it is stuck in a deadlock in the kernel.
Looks like it isn't, after all, because I had 1 vCPU. I use -c sockets=1,cores=4,threads=2 (translates to 4 cores) .
But yes, I wasn't always able to destroy the VM or pkill bhyve. Sometimes I had to log out of user account to stop that bhyve instance, but then on logging back in I was sometimes able to start it normally.
 
Got a possible fix to my problem at https://reviews.freebsd.org/D37972 -- see attachment in the discussion.

Although my system seems stable when gaming, I'm getting a few triple faults from time to time, mostly when tinkering with the hardware in device manager.

btw, when I say "vCPU", I meant virtual cores, not virtual sockets. I'm not sure how meaningful the CPU topology is to the guest unless you are pinning a vcpu to a real hardware thread.
 
Whoa, cool find! I stumbled across this old post and wanted to say thanks for sharing your experience with Windows 11 on bhyve. That tool you mentioned sounds super useful. Have you checked out any websites for the cheapest windows 10 keys? Upgrading your OS can open up new features and opportunities.
 
Whoa, cool find! I stumbled across this old post and wanted to say thanks for sharing your experience with Windows 11 on bhyve. That tool you mentioned sounds super useful. Have you checked out any websites for the cheapest windows 10 keys? Upgrading your OS can open up new features and opportunities.
Tbh, I'm still not ready to upgrade my 10 to 11. Anyway, thanks for the update on your Windows 11 installation. It's always good to hear about successful setups like this. Let us know how it goes.
 
Back
Top