Support for Virtualization.framework #923
Replies: 8 comments 17 replies
-
Thanks, the former one seems better but the latter one is also acceptable if it is easier |
Beta Was this translation helpful? Give feedback.
-
I agree that the former sounds better for deeper integration, but I'm not so keen on having different binaries for each macOS version. We would need at least 6: macOS 10, 11, and 13, for both aarch64 and x86_64. But even with the latter approach we would probably need separate binaries of the CLI for macOS 11 and 13, so that wouldn't really help either. I don't know if it is reasonably feasible to use a mechanism like dlopen/dlsym on Linux to dynamically link the framework at runtime based on OS version. |
Beta Was this translation helpful? Give feedback.
-
@AkihiroSuda @balajiv113 Hi 👋 lima VM is great!! Thank you. Btw, I released v2 version of the library. https://github.com/Code-Hex/vz I think I can help if you can report bugs etc. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Apologies for the quiet period on this thread. Have been trying to get hands-on to macOS 13 to try out new API's :) The following are the updates, vz now supports building in older version that has support for Virtualization.framework (Greater than 11.x). Some questions now will be,
|
Beta Was this translation helpful? Give feedback.
-
I have started working on some code changes on this.
The initial changes are under, The next important step would be networking (SLIRP). For this, i was able to successfully use gvisor-tap-vsock with vz. |
Beta Was this translation helpful? Give feedback.
-
Next updates, I have integrated the same in this branch, also integrated gvisor for slirp network. I was able to run existing docker.yml template successfully 🎉 Next & Final Steps
|
Beta Was this translation helpful? Give feedback.
-
Hi 👋 I have released the vz v3 version which has supported Apple Virtualization.framework for macOS 13 API.
https://pkg.go.dev/github.com/Code-Hex/vz/v3 I have also started compiling the Linux information needed to use each of the features provided by the Virtualisation.framework here. Anyone is free to edit it. https://github.com/Code-Hex/vz/wiki It was very hard, but I'm very excited to use lima with support for the Apple Virtualization.framework. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Updates
Have opened the PR as well #1147 |
Beta Was this translation helpful? Give feedback.
-
This discussion is to come up with a plan for implementing drivers in lima and also provide support for Virtualization.framework in macOS.
Requirements
Support for different drivers
The base idea is to support different drivers implementations and pick a driver accordingly based on the VM configuration.
Idea - Driver code will be part of lima
The idea is to have different drivers as part of lima itself (No separate binaries for drivers)
Driver - qemu
All the current features/codeflows will stay the same, we will only refactor code to support multiple driver model.
Note - There should be no change in configuration file as well
Driver - vz
The main complication here will be Virtualization.framework is available only after macOS 11. Also features we will use (EFILoader) are available only as part of macOS 13.
But we should support older versions of macOS as well.
To overcome this complications, I have came up with 2 integration options
Integration - Directly use vz go-binding in lima
In this model, lima will directly depend on code-hex/vz.git go binding for mac virtualization API. And the vz driver will create VM using those go-binding.
Pros
Cons
Integration - Cmd line utility for vz
In this model, We will develop a cmd line tool like https://github.com/code-ready/vfkit and the driver will simply spawn a child process like in qemu driver
Pros
Cons
Configuration changes
I tried to come up with a basic configuration model for driver based solution.
The goal I had in mind was to accommodate our current configuration for new driver as well.
This way, we can reuse configuration for different drivers as well.
With this above configurations, We must need to do some driver specific yaml validations as well.
This will be the first steps. Based on the integration model we choose I can come up with a set of checklists on what needs to be done.
Beta Was this translation helpful? Give feedback.
All reactions