Readit News logoReadit News
shortformblog · 3 years ago
I did an interview with Sickcodes a couple of years ago when this first emerged. He does extremely interesting stuff and his point of view is unique.

https://www.vice.com/en/article/akdmb8/open-source-app-lets-...

nier · 3 years ago
This is the first time I read about this. How on earth is this not an April’s fools joke?

Apple allows you to run a maximum of 2 virtual machines on Apple hardware.

Someone is going to get sued by Apple for going against this part of the license agreement and I must say I really like that thought because the result of that trial will give clarity to the rest of us.

We had to deal with a gray area in our project as well. DeepL does not allow use of their translator in critical infrastructure. Our client is in the transportation business and has been using DeepL for years to translate emails. They wanted to integrate DeepL into a customer portal that we develop for them. When we told them that we will not be complicit in breaking DeepL’s license agreement, they weren’t too happy.

userbinator · 3 years ago
Apple has largely left the Hackintosh community alone. It seems like they're not interested in going after anything but those trying to commercialise it: https://en.wikipedia.org/wiki/Psystar_Corporation
zxcvbn4038 · 3 years ago
I think there is a different perspective - MacBooks are great development machines, pretty much everything builds without modification, if you need a true linux environment you can always spin one up with docker. I’d bet you that people running MacOS in VMs leads to people running MacOS on their shiny new MacBook.

If you had told me thirty years ago that one day I’d be developing on a Mac I would have laughed, but once I had one I realized developing under Windows was a pain - everything is unnecessarily difficult because Microsoft wants you to develop FOR windows and they want you giving money to all their partners who forever have their hands out, and they make everything else hard.

It’s like a pain that never goes away - you can learn to ignore it but at some level it’s always there.

britneybitch · 3 years ago
I hate to give Apple any ideas... but I've always wondered why macOS/iOS support falling back to software rendering, when all of their devices ship with a known GPU configuration. Without that fallback, getting the OS running on non-Apple hardware would take a lot more work.
cmeacham98 · 3 years ago
Apple has documentation on installing OS X in a VM: https://developer.apple.com/documentation/virtualization/ins...

While _this_ usecase obviously isn't officially supported, it does seem like they support VMs in some capacity officially.

sigjuice · 3 years ago
This document is about running macOS in a VM on Apple's own hypervisor. Wouldn't this count as official support?
easton · 3 years ago
I wonder if that’s GPU accelerated, the last time I used a macOS VM on a Mac it wasn’t, but it wasn’t with the newest version of the hypervisor.
spijdar · 3 years ago
Presumably they use it internally. IIRC there are drivers for VirtIO devices in modern MacOS, implying they use KVM/QEMU for something.
smoldesu · 3 years ago
It's also used when you load into the recovery partition, IIRC. It may be redundant nowadays, but it's a nice redundancy to have for sure.

Dead Comment

incrudible · 3 years ago
Without that fallback, getting the OS running on Apple hardware would take a lot more work, as well.
BudaDude · 3 years ago
I would imagine battery life may be a part of it
FlyingSnake · 3 years ago
Can this be used to run CI/CD in Docker for iOS projects?

If that’s possible then it’s huge.

Edit: Best way to know is to just do it. I’ll try this and report back.

jbverschoor · 3 years ago
nazka · 3 years ago
Oh wow I didn’t know about that. That’s huge. I remember people some time ago buying dozens of Macs to create their own CI/CD with racks of half open MacBooks running 24/365.

Great they have that now!

FlyingSnake · 3 years ago
I'm aware of this but I'm looking more into ephemeral docker containes that builds an iOS app and runs XCTests. Something like Gitlab CI for Android¹

1: https://hub.docker.com/r/jangrewe/gitlab-ci-android

preisschild · 3 years ago
Technically yes, but this is against Apples EULA and they could ban your apps from the Appstore for it.
psnehanshu · 3 years ago
Really eager to know if this works. But I don't have the capability "yet" to do it myself.
monkpit · 3 years ago
Is anyone using it in for production software? Are there any legal issues?

I’ve considered using this for running simulators but I always get asked about how legal this is.

spijdar · 3 years ago
The general consenus I've seen is that 1) projects/code that enables MacOS to be emulated is legal, but 2) running MacOS VMs on non-Apple hardware is a violation of the EULA you agree to when installing MacOS.

So if it's on an Apple device (even one not running MacOS as the host) it's fine, otherwise it's a violation of the EULA, and something a business probably doesn't want to get tangled in.

monkpit · 3 years ago
Thank you!
remram · 3 years ago
I'm not sure why you are getting downvoted.

I personally wouldn't have any scruples using this for testing/building OSS, but I would also think twice about using it at my job.

monkpit · 3 years ago
To clarify, by simulators I meant: iOS simulators running under a Linux docker host.
pxc · 3 years ago
Ok, so this is just OSX-KVM with extra steps. Seems like a very weird use case for Docker, but okay.
thejosh · 3 years ago
I recently wanted to build Python wheels for a whole bunch of Python versions and packages on Mac ARM64. I ended up using OSX-KVM, and then using cibuildwheel to crossbuild to arm64. Pretty dang easy.

I set up OSX-KVM (https://github.com/kholia/OSX-KVM) and it worked really well. Having archlinux is a huge plus for this (it's why the docker image uses it), as qemu is super simple to setup and get running. Was surprised how easy it was, but given how much effort the bootloaders have had over the recent years for Hackintosh, qemu users can just yoink that bootloader and use it.

BHSPitMonkey · 3 years ago
Surely you mean fewer steps (e.g. "docker run [image]" versus the long set of prep/install steps in the OSX-KVM README)?
tjbiddle · 3 years ago
IIRC, when compiling any iOS apps, etc. you need a Mac machine. I remember in the past, when I was creating CI/CD pipelines we had to ensure that there was a Mac Mini or some other machine that we had access to in order to automate this.

Seems like this solution would make it much simpler, as we used Docker for everything else.

devmor · 3 years ago
I wonder how the performance is compared to a mac mini.
moralestapia · 3 years ago
Great find, thanks!

I've set up some tests that require OS X and usually set up remote VMs for that. This could be a nice alternative to run those using regular (and cheaper) linux instances.

I know you can do the same with KVM but nothing beats a one liner command.

sally_glance · 3 years ago
Could be or is? Please drop a result once you tried it :)
SillyUsername · 3 years ago
Can someone explain why I'd use this instead of a regular VM please?
lapser · 3 years ago
This is a regular VM. Specially it's qemu-kvm. The difference being that this is running qemu-kvm inside a container (remember, containers are mostly just processes). The advantage this gives you is that your run command is much simpler than the alternative.
pxc · 3 years ago
Because you don't know how to configure KVM or don't want to bother, I guess. This project just wraps another project for setting up normal KVM guests running macOS.
stevebmark · 3 years ago
Should this work on Mac (using Docker Desktop for Mac)? I don't see why not, but trying to run it results in:

> docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory.

cpuguy83 · 3 years ago
It's possible docker4mac doesn't enable nested virt?
moondev · 3 years ago
Fun fact: apple silicon doesn't support nested virt
bityard · 3 years ago
KVM is a Linux hypervisor
stevebmark · 3 years ago
I don't follow. Docker for Mac uses a Linux VM

Deleted Comment