4 ms·
Been using vftool to host docker instead of Docker.app. It's been alright so far, got rosetta set up inside to run x86 images. All it takes is a little startup
by jsd1982 3y ago
Been using vftool to host docker instead of Docker.app. It's been alright so far, got rosetta set up inside to run x86 images. All it takes is a little startup script and some up front work to prepare a disk image with Ubuntu server.
Every once in a while, the guest Ubuntu kernel will oops about smp related things. Every time it boots its clock is reset almost a month in the past and I have to force sntp to correct it. After sleeping the host, the guest clock will not advance so it'll be behind several hours.
I'm not sure where to assign these issues: Ubuntu kernel? virtualization framework? vftool? bad configuration?
- moondev 3y agoDoes 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.