moby / hyperkit

A toolkit for embedding hypervisor capabilities in your application
BSD 2-Clause "Simplified" License
3.61k stars 327 forks source link

Can Windows 10 be booted? #315

Open lonnietc opened 3 years ago

lonnietc commented 3 years ago

Just wondering if Windows 10 can be booted up with Hyperkit which seems tobe using Xhyve/Bhyve?

djs55 commented 3 years ago

@lonnietc I'm not aware that anyone has tried it recently. I personally doubt it works: there are probably a bunch of subtle differences between the how the virtual hardware behaves today and what Windows expects. Someone suitably motivated and with enough time on their hands :) could probably make it work (particularly if some of the issues have already been solved in xhyve/bhyve).

lonnietc commented 3 years ago

Thanks for getting back to me on this. I know that Bhyve is able to run Windows as one of the guests (at least the FreeBSD version and SmartOS port), but was not sure how closely the Xhyve port is up to date on the Bhyve version and thus not sure if the HyperKit version is closely mirroring the Xhyve version. That would be the trickle down effect from the current Bhyve version, I guess.

I am also interested in trying to port either the Xhyve or Hyperkit version over to Linux as well and am collecting information on the difficulty.

Of course, there is KVM and QEMU on Linux (and Windows as well, but they are a bit bloated in size and I was looking for a hypervisor that had minimal dependencies as well.

Cheers and have a good weekend

rn commented 3 years ago

some 4+ years ago we had Windows Nano Server (is that still a thing) booting on hyperkit but I can't remember how much hacking was required for that. I think we were able to boot via UEFI as the firmware but proper support likely requires some form of display emulation, which we hyperkit does not have. hyperkit does not emulate any legacy IO devices and getting windows with virtio is doable but tedious last time I tried.

Bhyve only got Windows support way after xhyve and hyperkit were "forked" of it. it's not longer a matter of changes trickling down. Since qemu supports the macOS hypervisor framework I'd use that to boot windows on macOS (or use vmWare).

There are a bunch of more minimal VMMs for kvm and even qemu offers a microvm machine model which is pretty lean.

lonnietc commented 3 years ago

@rn Thanks for the information on this as it is very handy to know since I did not know that Bhyve achieved Windows support after the Xhyve and Hyperkit fork.

I will have to see what I can find on the microvm stuff from qemu.

Have a great weekend.