Live data from Hacker News

Apple Virtualization Framework

developer.apple.com

31–40 of 127 posts

Re: Apple Virtualization Framework

#31

Earlier quoted context omitted.

Virtualization is, of course, based on a very standard KVM-like API. There's not much Mach in its design at all.

Mach is down below. This is what Mach is for the BSD that was originally part of the DARPA deliverable was just to prove that Mach could run on OS.

There's not much down below it. It calls into the Hypervisor APIs, which directly touch platform virtualization features.

Re: Apple Virtualization Framework

#33
post #29
post #22

Earlier quoted context omitted.

Well damn that is pretty cool. I’ve not used UTM or the Apple Virt Framework but gonna have to look into that now! Thank you for the link.

UTM also have their own docs on it: https://docs.getutm.app/advanced/rosetta/ And FYI, this is also available in Docker Desktop for macOS, which allows better performance when running x86_64 containers compared to the older solution where Docker was using qemu.

Do you have any sources for that? I basically gave up on Docker for M1 since the qemu performance is terrible.

Last time I checked, Rosetta only worked for one-off binaries, wouldn’t really allow docker to run more x86 code inside.

Re: Apple Virtualization Framework

#34
post #6

Has there been a significant development? Been using it with https://mac.getutm.app/ for a while

I've also been using the Apple Virtualization option with Linux VMs in UTM and have had zero issues whatsoever. The biggest benefit to doing so in my opinion isn't necessarily the noticeably better performance, but the RAM usage. I've noticed that Linux VMs in UTM that run using the Apple Virtualization Framework use significantly less RAM compared to otherwise because the framework provides dynamic memory allocation. This makes it very well suited to running Linux VMs on systems that have less memory (e.g., an M1 MacBook with only 8GB of RAM).

The only thing I'd like to see added to the framework is the ability for nested virtualization (which is now available in the M2 chips, but isn't built into M1 chips).

Re: Apple Virtualization Framework

#36
post #6

Has there been a significant development? Been using it with https://mac.getutm.app/ for a while

I've also been using the Apple Virtualization option with Linux VMs in UTM and have had zero issues whatsoever. The biggest benefit to doing so in my opinion isn't necessarily the noticeably better performance, but the RAM usage. I've noticed that Linux VMs in UTM that run using the Apple Virtualization Framework use significantly less RAM compared to otherwise because the framework provides dynamic memory allocation…

[deleted]

Re: Apple Virtualization Framework

#37
post #29
post #22

Earlier quoted context omitted.

Well damn that is pretty cool. I’ve not used UTM or the Apple Virt Framework but gonna have to look into that now! Thank you for the link.

UTM also have their own docs on it: https://docs.getutm.app/advanced/rosetta/ And FYI, this is also available in Docker Desktop for macOS, which allows better performance when running x86_64 containers compared to the older solution where Docker was using qemu.

Yes, I've used it with Terraform plugins by setting the arch to x86 and running via docker. Needed to do this as some plugins don't have arm64 versions.

Re: Apple Virtualization Framework

#39
I tried a bunch of different options and landed on multipass.

I'm curious whether someone has found a good option for running x86 images on m1 chips.

I'm generally happy with the multipass VMs I'm creating but they are arm architecture so then if i use docker images inside them I'm limited to arm images. Maybe I just haven't explored how to run x86 correctly within multipass?

I'm finding that usually arm images are a step behind the x86 images if they are official, or they are built by someone outside the organization, so I'm never sure I'm using a safe image.

Do any of the options here make it performant to run x86 on apple silicon? Some interesting comments on Rosetta that I don't fully understand.

Re: Apple Virtualization Framework

#40
post #29

Earlier quoted context omitted.

UTM also have their own docs on it: https://docs.getutm.app/advanced/rosetta/ And FYI, this is also available in Docker Desktop for macOS, which allows better performance when running x86_64 containers compared to the older solution where Docker was using qemu.

Do you have any sources for that? I basically gave up on Docker for M1 since the qemu performance is terrible. Last time I checked, Rosetta only worked for one-off binaries, wouldn’t really allow docker to run more x86 code inside.

Search for Rosetta on this page

https://docs.docker.com/desktop/settings/mac/

Post reply on HN