Open copumpkin opened 7 years ago
Oh, I guess this is sort of duplicating the follow-up discussion to https://github.com/moby/hyperkit/issues/19. I'll let maintainers decide if this is worth closing due to that ticket, but my inclination would be to track individual missing features rather than a big batch like in #19, since it's hard to decide when that ticket is "fixed".
A separate issue like this specifically for macos support seems wise.
Cool! Here's how to run it on qemu, which will give a sense (possibly via command-line args) of what hardware emulation is needed to get it working: https://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/
bin/qemu-system-x86_64 -machine q35,accel=kvm -bios ~/OVMF.fd -m 4096 \
-cpu Penryn -smp 4,cores=2 \
-usb -device usb-kbd -device usb-tablet \
-device isa-applesmc,osk="insert-real-64-char-OSK-here" \
-netdev user,id=usr0 -device e1000-82545em,netdev=usr0,id=vnet0 \
-device ide-drive,bus=ide.2,drive=MacHDD \
-drive id=MacHDD,if=none,file=~/mac_hdd.img \
-monitor stdio
That insert-real-64-char-OSK-here
thing is the magic blurb I mentioned. The other stuff is probably all work that needs doing. It does look like they got it working without EFI unless I'm missing something that implies EFI in that command line.
On a quick scan:
-bios ~/OVMF.fd
: This is the EFI firmware, not sure it'll work-device usb-kbd -device usb-tablet
: HyperKit does not have USB support-device isa-applesmc
: No idea what that is, but hyperkit does not have it-device e1000-82545em
: That's some e1000 network car which HyperKit does not support-device ide-drive
: Not sure this is in HyperKit eitherYeah, sounding like lots and lots of work 😄
Here's AppleSMC, FWIW: https://github.com/qemu/qemu/blob/master/hw/misc/applesmc.c. I think it stands for System Management Controller and controls various cooling and lighting options on Apple hardware, as well as containing the magic string that macOS checks for original Apple hardware.
For available permissively-licensed code, bhyve has an e1000 (aka 82545em) emulation, an XHCI USB controller emulation plus tablet device, and there is an out-of-tree IDE driver from a GSoC project.
did anything change in this scope? can I virtualized macOS guest using hyperkit?
AFAIK, no one has been working on this. But you could try a recent version of qemu
on macOS. In January or so, Hypervisor framework based acceleration was added.
The macOS license actually allows running macOS in a VM on Apple host hardware, which hyperkit would satisfy. I'm wondering what work would be required to enable that. Since quite a few people have figured out how to run it under qemu (with questionable licensing implications), it seems like there's probably enough FOSS code out there that HyperKit could take inspiration from to support macOS guests too.
I imagine the two biggest missing pieces are EFI emulation and the magic "don't steal macOS" blurb.