Live data from Hacker News

macOS in QEMU in Docker

github.com

101–110 of 190 posts

Re: macOS in QEMU in Docker

#101

Earlier quoted context omitted.

It's also £5,499.00 in the UK (just under $7k USD). Not exactly ideal for hobbyists.

I considered including a price tag (... and comes for only $6990 ), but decided against it for being too thick. I also think that using /s markers kinda kills the idea of sarcasm.

> I also think that using /s markers kinda kills the idea of sarcasm.

Tone of voice (and tone of face) are both essential to convey sarcasm over rich channels, and both are lost over text.

Now add Poe's Law.

In short: Welcome to the wonderful world of autism! /s

Re: macOS in QEMU in Docker

#102
post #33

Earlier quoted context omitted.

I've been worried about Azure DevOps getting merged into GitHub since Microsoft bought Github, but thankfully I haven't seen any drop in the maintenance of Azure DevOps, not yet anyway. As much as I like Github for OSS projects, I really love Azure DevOps for everything else. The CI/CD capabilities are amazing, and I haven't had any real issues with lack of documentation (a few small things here and there for sure th…

Microsoft told my previous employer (a very large enterprise customer) that they can expect ADO to be de emphasized at best and retired in favor of the GH offering at worst.

They've told my employer the exact opposite, that they expect Github and Azure DevOps to coexist peacefully indefinitely, so I guess neither of us should read too much into that!

Re: macOS in QEMU in Docker

#103
post #42

Earlier quoted context omitted.

Honestly that's kind of yikes. That probably just adds extra complexity, and there are better ways to deliver VMs.

If you have container orchestration in place, being able to use it to run VMs via qemu is actually incredibly useful and isn't really much of a yikes. Sure, you're losing the container's isolation features, but you have a VM there, which is even stronger isolation. We do CI for our VM images in our kubernetes clusters. The build system already was in kubernetes, so putting the OS image testing in there was a big win.…

I don't think you understand what this project is.

You have to fiddle with BIOS and kernel module parameters, install packages, configure KVM, etc on your docker host for this to work. It's not something that you can just throw into kubernetes, especially if you don't manage the kubernetes deployment yourself.

> The benefit of doing this is also that on a personal machine you can start playing with an OSX vm with a single docker run command with no other dependencies

There _are_ external dependencies that you have to set up manually. It's the same amount of work to set up on docker or to use a real VM, so I can't imagine why you would prefer this method.

Re: macOS in QEMU in Docker

#104
post #47

So this is pretty misleading. It's really a full system emulator (qemu) running inside Docker, using root privileges on the container that make the isolation very weak (--privileged). It also uses hardware assisted virtualization (KVM) which is not going to be available most of the time Docker is. You can think of the Docker platform itself as subset of the Linux platform. With many common features removed by default…

I think "docker" is an ambiguous term nowadays. Depending on your point of view, it could denote a container, or source control, or a sort of makefile. To me it is a reproducible recipe in 43 lines of Dockerfile text.

It is definitely a recipe, but the "reproducible" claim is weak. These 43 lines of Dockerfile text are unlikely to work in a few months (or even weeks).

Re: macOS in QEMU in Docker

#105

Earlier quoted context omitted.

According to Apple software license agreements, yes, it is too much to ask. You can not legally run Mac OS on non-Apple hardware. But don't be sad, their new Mac Pro is fantastic .

The EULA says you can't run Mac OS on non Apple hardware? Pretty sure these terms are not enforceable in Europe so safe to ignore.

I've always wondered why apple gets a pass on the kinds of anti competitive suits brought against google. Google gets fined Billions of dollars for preloading a web browser in Android, but it's fine for apple to completely monopolize their hardware and software ecosystems.

Re: macOS in QEMU in Docker

#106
post #17

Earlier quoted context omitted.

Only if you do it on a non-Apple comoputer. If you install linux on your mac, then follow the guide I believe it should be fine.

The agreement is pretty vague on the subject but it seems that you can get permission to virtualise on non-Apple hardware. How one does this and if anyone ever has is another matter entirely.

Apple does it internally, since they can turn off the mechanisms that stop macOS from booting on non-Apple hardware (last I heard on HN, they ran it on HP workstations?). I'd imagine that if you got JAMF, Adobe, and Microsoft in a room one of them has the magic incantation as well, considering the amount of Mac code they put out.

Re: macOS in QEMU in Docker

#107
post #85
post #20

Earlier quoted context omitted.

It's a hammer problem. Docker is the new hammer and now everything starts to look like nails.

It's the hammer problem because management and IT have locked up all of the other tools , so you're damned right I'm gonna try to use the hammer. Spooling up a docker image is low friction at a lot of places. Doing anything else can take an act of Congress.

> Doing anything else can take an act of Congress.

Does fiddling with BIOS parameters and installing kernel modules fall into "anything else"? Because this project doesn't work until you've done that on your docker host.

Re: macOS in QEMU in Docker

#108
post #77

So this is pretty misleading. It's really a full system emulator (qemu) running inside Docker, using root privileges on the container that make the isolation very weak (--privileged). It also uses hardware assisted virtualization (KVM) which is not going to be available most of the time Docker is. You can think of the Docker platform itself as subset of the Linux platform. With many common features removed by default…

I don't care though. What I care about is that it's a pain in the butt to do CI/CD pipelines for an application with iOS/OSX support. So if someone has a headless OS X contraption on offer, I want to hear some more about it. The last time I set this up, a manager decided he wanted a laptop like the rest of us instead of the iMac he got. He asked semi-jokingly if someone wanted the machine for anything and I said "Yes…

> So if someone has a headless OS X contraption on offer, I want to hear some more about it.

you still legally need to run it on an actual Mac due to Apple's terms of service though... so is there really a lot gained ?

Re: macOS in QEMU in Docker

#109

Earlier quoted context omitted.

If you have container orchestration in place, being able to use it to run VMs via qemu is actually incredibly useful and isn't really much of a yikes. Sure, you're losing the container's isolation features, but you have a VM there, which is even stronger isolation. We do CI for our VM images in our kubernetes clusters. The build system already was in kubernetes, so putting the OS image testing in there was a big win.…

I don't think you understand what this project is. You have to fiddle with BIOS and kernel module parameters, install packages, configure KVM, etc on your docker host for this to work. It's not something that you can just throw into kubernetes, especially if you don't manage the kubernetes deployment yourself. > The benefit of doing this is also that on a personal machine you can start playing with an OSX vm with a s…

To run 64 bit VMs, you always needed to turn on hardware virtualization in the bios. To configure kvm, all you need to do is "modprobe kvm" if it isn't already loaded. At that point, everything else is user-space and 100% of the user-space dependencies are installed in the image. All the docs about libvirt on the github page are unnecessary. So full steps are really:

1. Enable hardware virtualization 2. modprobe kvm 3. docker build 4. docker run

and you have an OSX VM.

> It's not something that you can just throw into kubernetes, especially if you don't manage the kubernetes deployment yourself.

GCP and Azure support nested virtualization, so you actually could do this in a managed kubernetes cluster. It's plenty common to use privileged DaemonSets in kubernetes to load kernel modules for filesystems, storage, or iptables rules. If you're allowed to run privileged containers, it's trivial to run VMs like this in kubernetes.

Re: macOS in QEMU in Docker

#110

So this is pretty misleading. It's really a full system emulator (qemu) running inside Docker, using root privileges on the container that make the isolation very weak (--privileged). It also uses hardware assisted virtualization (KVM) which is not going to be available most of the time Docker is. You can think of the Docker platform itself as subset of the Linux platform. With many common features removed by default…

(Darling requires a kernel module, which also isn't a thing you are able to do in the context of Docker as you are often just working with the host kernel.)
Post reply on HN