6 ms·
You can also just run the VM's using Apple's own API's. Their sample code includes a resizable display, shared drive, network access, etc. You can run x86 Linu
by w10-1 3y ago
You can also just run the VM's using Apple's own API's.
Their sample code includes a resizable display, shared drive, network access, etc. You can run x86 Linux on Apple Silicon (including running pre-built x86 binaries with Rosetta). On the latest release, you can save and restore the VM state to avoid boot initialization and application setup.
Run headless linux
https://developer.apple.com/documentation/virtualization/running_linux_in_a_virtual_machine https://developer.apple.com/documentation/virtualization/run...
Run GUI linux
https://developer.apple.com/documentation/virtualization/running_gui_linux_in_a_virtual_machine_on_a_mac https://developer.apple.com/documentation/virtualization/run...
Run intel binaries in linux vms on appleSilicon with rosetta
https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta https://developer.apple.com/documentation/virtualization/run...
Configuring Virtio shared directory
https://developer.apple.com/documentation/virtualization/vzvirtiofilesystemdeviceconfiguration/ https://developer.apple.com/documentation/virtualization/vzv...
And you can run MacOS VM's on Apple silicon:
https://developer.apple.com/documentation/virtualization/installing_macos_on_a_virtual_machine https://developer.apple.com/documentation/virtualization/ins...
https://developer.apple.com/videos/play/wwdc2022/10002/ https://developer.apple.com/videos/play/wwdc2022/10002/
- freetime2 3y agoDoes this offer any performance benefit over using Lima, particularly when running x86 VMs on Apple Silicon? Or is Lima already using the same APIs?
- treesknees 3y agoTo be clear, you can't run an x86 Linux VM on Apple Silicon using Apple's virtualization framework. It says right in the docs, >The kernel and RAM disk image must support the CPU architecture of your Mac. You _can_ run x86 via Rosetta inside the VM. But that's not the same thing as running an x86 VM. To answer your question, Lima supports two VM types - QEMU and vz. QEMU is the default and is what's used by other projects to run x86. If you select a vz VM type then it uses MacOS' native APIs. I wouldn't expect a performance improvement in using a vz-typed VM with Lima and Apple's own instructions.
- freetime2 3y agoThank you for clarifying!
- nine_k 3y agoIt should have a performance benefit when running Arm64 Linux, I suppose.
- dikei 3y agoLima has experimental supports for Apple's native virtualization framework, but the default is still QEMU.
- mathisfun123 3y agoyou know what i need this very minute? to run a m1 vm on an x86 mac. why? because there seems to be no god damn way to faithfully build m1 wheels on github's mac runners without such a contrivance. note, cibuildwheel claims it can pull off this trick but in fact it screws something up and pip install x86 dependency wheels.
- vaxman 3y agom1 Mac:mini is about $400 used (sold by vain people). If you are worried it will come with pet hair stuck in the fan blades, pay an extra $100 to buy from a reputable reseller. If you are constrained to software or work in a chair meant for eating or sun bathing, another option is Mac Orka/Anka.
- mathisfun123 3y agoyes this is basically the decision i've arrived at after pulling my hair out today.
- bdcravens 3y agoYou can also use AWS M1 instances, with the huge disadvantage that they must be run a minimum of 24 hours at a time. https://aws.amazon.com/ec2/instance-types/mac/ https://aws.amazon.com/ec2/instance-types/mac/
- urschrei 3y agoThe problem is probably not cibuildwheel. That having been said, the maintainers are knowledgeable and responsive, so I would try to open an issue first. Speaking from personal experience, they were able to help me to solve my problem in a couple of hours.
- mathisfun123 3y agoI opened an issue but then also plowed through the source. I'm pretty sure the issue is pip is basically intransigent and will not let you easily install packages for whatever arch it insists you have (which most certainly close to the canonical platform.machine). You end up having to chain --platform --only-binary=:all:. Okay great but I'm cross-compiling - this is exactly the time I do want source distributions. People say it a lot but I never really felt it until I tried it - python packaging is infuriating and is beyond a shadow of a doubt proof that python is a shit professional language. Not because professional languages need to have bulletproof packaging systems (see C/C++) but because the fact that python can't make it work after so long means python is fundamentally flawed. And don't tell me "well you're implicitly talking about C extensions". Yes I am but that's a language feature and if you design a language feature that your language fundamentally precludes you from being able to support, then again that's on you.
- pseufaux 3y agoI keep debating over spending the time to implement an Apple Virtualization Framework vagrant provider. Maybe I'll get around to it after I unbury myself from the rest of my self imposed side projects.
- stephenr 3y agoThis would be very welcome. I had hopes that Veertu would provide this (they used Hypervisor.framework at the time) but they pivoted away from regular VM usage before it ever eventuated. With the current state of Vbox on Arm it would be good to have a reliable free/cheap alternative to Parallels or VMWare for vagrant use.
- moondev 3y agocloud-init and multipass made me forget all about vagrant
- ralgozino 3y agoI second multipass, it is pretty cool if your target is Ubuntu. I think it is closer to "Docker for Ubuntu VMs" than Vagrant though. In the latest releases hey are dropping support for native virtualization on mac and moving to QEMU only. I my experience the QEMU backend has not been as stable as the hyperkit one, but YMMV as usual.
- troupo 3y ago> You can also just run the VM's using Apple's own API's. "just". Where "just" is: - download and install XCode - download sample project - download a sample project - download a Linux Kernel image - load a RAM disk into memory - write some Swift code to configure run parameters. Swift code is different if you want to run non-UI and UI versions - you can only run one VM at a time or write your own code to manage that - .... Or, you know, use Docker Desktop, or lima, or...
- deleted 3y ago[deleted]
- c-hendricks 3y agohttps://getutm.app/ https://getutm.app/
- troupo 3y agoThis one is absolutely brilliant. I used it to run Ubuntu on an x86 on an M1 Mac because a vendor's alpha SDK could only run on x86 Ubuntu.
- brian_herman 3y agoYes, UTM is very easy to use and would recommend to anyone.