Bhyve and Windows 11
The Windows 11 Evaluation is fully functional, with the minor annoyance that it shuts down automatically after 1 hour. See also: automate configuration using rset(1).
VirtIO and Startup
To enable Windows networking we will need the Windows VirtIO Drivers. Convert the image using
pkg install qemu-devel qemu-img convert -f vmdk -O raw WinDev2404Eval-disk1.vmdk win11.img fetch https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
kldload tpm name="win11" vncport="5907" bhyve -c 2 -m 8G -w -H \ -s 0,hostbridge \ -s 3,ahci-hd,/vm/$name.img \ -s 4,ahci-cd,/vm/virtio-win.iso \ -s 10,virtio-net,tap7,mac=00:0c:29:dc:df:79 \ -s 29,fbuf,tcp=0.0.0.0:$vncport,w=800,h=600 \ -s 30,xhci,tablet \ -s 31,lpc \ -l tpm,passthru,/dev/tpm0 \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ $name
Account Setup
To change the Windows password run
cmd
as Administrator
net user User ***** wmic UserAccount set PasswordExpires=False
sc delete vmtools del "C:\Program Files\VMware" del "C:\Program Files\Common Files\VMware" del "C:\Program Data\VMware"
Caveats
- Performance is much worse on Bhyve than on bare metal.
- Windows Subsystem for Linux does not work since this requires support for nested vitalization.