4 ms·
Does vftool use https://developer.apple.com/documentation/virtualization https://developer.apple.com/documentation/virtualization or https://developer.apple.com
by moondev 3y ago
Does vftool use https://developer.apple.com/documentation/virtualization https://developer.apple.com/documentation/virtualization or https://developer.apple.com/documentation/hypervisor https://developer.apple.com/documentation/hypervisor ?
https://github.com/evansm7/vftool https://github.com/evansm7/vftool appears to indicate the former, but I thought the latter was required for rosetta so interested to try this.
EDIT - looks like I had this backwards, vftool indeed supports https://developer.apple.com/documentation/virtualization https://developer.apple.com/documentation/virtualization which is the newer framework that supports Rosetta. The older framework is https://developer.apple.com/documentation/hypervisor https://developer.apple.com/documentation/hypervisor
- jsd1982 3y agoRight, it uses Virtualization Framework. I forked vftool [0] and added direct Rosetta support which was trivial to do according to the Apple documentation; just had to convert Swift example code to Obj-C. Have had a PR open for several months with no attention from the author. I almost forgot about it until seeing this HN headline. [0] https://github.com/JamesDunne/vftool-rosetta https://github.com/JamesDunne/vftool-rosetta The Rosetta support is surprisingly trivial to use. The virtualization framework exposes a mountable volume containing a single `rosetta` executable. In the Linux guest, you just register binfmt_misc support that recognizes an x86 ELF image and point it at the `rosetta` binary. It works for docker too so you can run arm64 and amd64 images.