libkrun icon indicating copy to clipboard operation
libkrun copied to clipboard

macOS x86-64 support

Open jrmuizel opened this issue 4 years ago • 4 comments

This would be nice to have. What all needs to be done to make it work?

jrmuizel avatar Sep 03 '21 19:09 jrmuizel

Looks like https://github.com/containers/libkrun/tree/main/src/arch/src/x86_64 needs to be modified not to use the kvm_bindings crate, which is linux specific.

The aarch64 functionality in https://github.com/containers/libkrun/tree/main/src/arch/src/aarch64 appears to work without that, which is why that works for macos.

This would be really nice to have on macOS x86_64...

satmandu avatar Nov 13 '21 22:11 satmandu

Supporting macOS's Hypervisor.framework on x86_64 is doable, but requires some work, given that we need to emulate more devices than with KVM (which provides in-kernel implementations of them). So far nobody has volunteer to work on that.

slp avatar Nov 15 '21 11:11 slp

I'm not seeing a rust implementation for using the macOS Hypervisor.framework, but I am seeing:

Objective C implementation: https://github.com/evansm7/vftool Swift implementation: https://github.com/gyf304/vmcli

satmandu avatar Nov 15 '21 17:11 satmandu

@satmandu There is C API for hypervisor framework. I think you could use that and FFI into libkrun.

flouthoc avatar Nov 15 '21 17:11 flouthoc