firecracker-microvm / firecracker

Secure and fast microVMs for serverless computing.

Home Page:http://firecracker-microvm.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Mac support on M2 and M3

gedw99 opened this issue · comments

commented

Feature Request

Mac support.

The Apple M1 CPU does not support hardware assisted nested virtualisation at all.
The Apple M2 and M3 CPUs support the v8.4-A level of hardware assisted nested virtualisation.

Describe the desired solution

Please see utmapp/UTM#6053

Basically I need to run firecracker on Macs as well as use it with UTM. I know firecracker is a Server only use case in general, but it would really make development of Firecracker on a Mac so much easier.

I have use cases where I want a Mac to act as an edge server also for production.

Describe possible alternatives

none.

Additional context

Checks

  • [ x ] Have you searched the Firecracker Issues database for similar requests?
  • [ x ] Have you read all the existing relevant Firecracker documentation?
  • [ x ] Have you read and understood Firecracker's core tenets?

Hi @gedw99 ,

Thank you very much for your request. It is always interesting see the penetration of Firecracker use, outside of its original intentions.
Similar request, was proposed while ago in #2845.

Unfortunately as you may be already aware, Firecracker heavily rely on KVM to perform its virtualization and emulation duties. KVM is not supported on MacOS and it is instead replaced by Hypervisor Framework which is quite different.
This means that supporting Firecracker to natively run on MacOS is actually a significant development task, which will also require significant expansion of our testing and maintenance strategy because we will basically need to validate any Firecracker feature against KVM and Hypervisor framework.
While we understand that this capability would help and improve the quality of life of MacOS developers, the cost and burden associated to it, is not backed by a valid business need because, as you said, the majority of servers run Linux nowadays and there is still the (intricate) opportunity for MaOS users to launch a Linux VM and develop inside it.

I do not know if it helps, but in the past, there were some attempts close to Firecracker to support a VMM based on Hypervisor framework. As you know, Firecracker use KVM bindings imported from our rust-vmm crate. One of our ex intern built runst-vmm bindings for Hypervisor Framework and a VMM which can run on x86 MacOS machine here https://github.com/fabianpatras/vmm. It can be a good inspiration for the future.
Let me know if you have any other questions. Feel free to close the request if somehow we answered to your question.
We will keep updated/reopen this feature request if something will change in the future 😊

Kind Regards,
Marco

commented

Hey Marco

yesterday I found a hyper visor lib for Mac. Is used by redhat for Podman . Also by Lima.

So I could work on integrating by I don’t know if the Apple Hypervisor API allows nested virtualisation which Firecracker requires.

commented

https://discussions.apple.com/thread/255314811?sortBy=best

Looks like no nested virt, but perhaps in M3, but who knows with apple