Bhyve with Windows 10

For newbs like me - please explain how 'bhyve with windows 10' will look like. Will it have windows GUI?
Or it will only run in text mode?
 
For newbs like me - please explain how 'bhyve with windows 10' will look like. Will it have windows GUI?
Or it will only run in text mode?

You can access the Windows console using VNC. It's not great for extended use or anything that would require more advanced graphics, but in the server environment which bhyve is mainly aimed at, it's enough to be able to configure the system if you don't have RDP access.
 
Hey guys! First post here, an attempt at a 2022 differential update for this great tutorial, on FreeBSD 13.1-RELEASE. Also sharing some learnings.

The official handbook chapter about virtualization, together this forum post, is pretty good already! Some of the surprizes I saw along the way:

Virtualization:
  • Trying to run bhyve, I got an error about SMV not available. Turns out I needed to enable VT-X in the BIOS.

Virtio disk driver:
  • The need to remaster Windows ISO to include virtio storage driver mentioned in wiki: not really needed, during the install one can add drivers. So I sticked -s 5:0,ahci-cd,virtio-win-0.1.118.iso to expose virtio drivers as an additional CD drive, and let Windows find the driver from there.
  • But, I found I don't need that either: as the Klara article points, one can use nvme driver using -s 3:0,nvme,./w0.img, which is natively found by Windows.
  • At one point, I encountered vtblk: write to GUEST_FEATURES: bad size 2 - but in retrospect not sure if this was a genuine error, or something printed on each VM shutdown. Since I moved to nvme since then, didn't check.
Snapshotting:
  • Initially I just used a file as disk image, but the handbook points one can use a zfs dev volume - probably more effective, but also support snapshotting.
  • Moving disk image to zfs dev (after turning off VM - always turn off VM before snapshotting, to take a consistent image):
    • sudo zfs create -V50G -o volmode=dev zroot/w10disk0
    • sudo dd if=w0.img of=/dev/zvol/zroot/w10disk0 bs=8M
    • sudo zfs snapshot zroot/w10disk0@after_install

Virtio network driver:
  • Similarly, Windows found the network driver from the attached CD.
  • (What I want to test yet: the VNC connection even through localhost is a bit sluggish. See if using RDP would be better, or other ways to speed up graphics. Not sure if it is the protocol or graphics driver here)

UEFI firmware:
  • sudo pkg install edk2-bhyve installs it.
Memory:
  • Initially I started up with 2048 MBs. After the VM quit, I wanted to bump that to 4096 MB, but got an error Unable to setup memory (22). Took some googling to know that bhyve maintains some reservation per active VM (still not sure how this works, didn't found reference in man pages), that one can reclaim with bhyvectl --vm=<thevm> --destroy. Or maybe the first running establishes the settings, and the second invocation with larger memory request doesn't fit into that invocation? Hm, should try bhyvectl --vm=<thevm> --set-mem ... the next time I run into this.
Sources:
 
CBSD, based on bhyve, runs Win 10 successfully. Several people have got bhyve runs Win too without necessarily using a bhyve-manager like cbsd. You want to try a manager like CBSD, vm-bhyve(which I also use)?

the VNC connection even through localhost is a bit sluggish. See if using RDP would be better, or other ways to speed up graphics. Not sure if it is the protocol or graphics driver here
CBSD over vncviewer has been fine so far. I can now play my steam games - EU4, etc.
 
Back
Top