13 ms·
macOS in QEMU in Docker
- cranberryturkey 2y agoDoes this work with kde/wayland?
- rzzzt 2y agoIt looks like the "vnc-version" Dockerfiles will set up an Xvnc server and direct QEMU's output to it, and you can connect to that using a VNC client. The standard version sets up X11 forwarding over SSH and/or you can pass the host's X11 socket and corresponding DISPLAY variable directly to the container. QEMU also has its own built-in remote access capabilities (SPICE and VNC-based) but the former needs guest support.
- duskwuff 2y agoIt looks like it's running macOS under qemu (i.e. contained in a window), so I don't see any reason why it wouldn't.
- slivanes 2y agoI wonder if progress will halt once newer versions of MacOS without Intel support are released? Can I run docker inside this container to get MacOS to run inside MacOS? ;)
- vbezhenar 2y agoTheoretically you can always run qemu in full emulation mode.
- itsTyrion 2y agoAnd practically even a minimal debian install takes minutes to boot to TTY with qemu-aarch64 on AMD64
- fragmede 2y agoI mean you can just do that in any supported vm program.
- ProfessorZoom 2y agowe must go deeper
- dariosalvi78 2y agoCan this run xcode?
- slivanes 2y agoAccording to the readme on github, yes, although it takes about an extra 30GB of drive space.
- XiS 2y agoI tried this last year. It works though it's pretty slow. I really hate having to also support the Apple ecosystem. Development, CI/CD integration is really poor without having to buy the hardware.
- pzo 2y agoHonestly development in xcode is poor even on apple hardware.
- keyle 2y agoI run full apple hardware and < 2 years old and the damn thing is still pretty slow.
- KronisLV 2y agoI have an M1 MacBook Air and the iPhone 2022 SE, so far the performance of both is pretty good! However, the prices are definitely outside my regular budget (needed it for an iOS app project cause of walled garden ecosystem) and I only got the 8 GB MacBook which in hindsight very much feels like a mistake, even with the exorbitant pricing for the 16 GB model. For the price of the 8 GB model I could have gotten a nice laptop with 32 GB of RAM built in. That said, I don’t hate the OS, it’s all quite pleasant and performs well.
- prmoustache 2y agoHe is meaning the performance of MacOS in docker is pretty slow on "native" MacOS hardware, not that his 2y old hardware has become slow.
- prmoustache 2y agoIs the redistribution of MacOS images allowed by the license or is this project distributing illegal copies in plain sight on docker hub?
- meatjuice 2y agoThis is clearly illegal
- diggan 2y ago"Illegal" might be a bit strong, "Against the EULA" a bit more realistic, which may or may not be illegal, depending on the context and involved country.
- scintill76 2y agoI’m not a lawyer, but pretty sure unauthorized redistribution of copyrighted material is a crime (in the US.) This docker image contains Apple copyrighted files, probably, but anyone feel free to explain if I’m wrong.
- tombert 2y agoI suspect that it probably doesn't matter; Apple has generally not cared about Hackintoshes as long as you aren't selling pre-made Hackintoshes. Apple probably doesn't really mind for stuff like this, since this probably isn't realistically eating much into Apple's market.
- hadlock 2y agoYou need to prove commercial intent to profit If a choir teacher distributes the lyrics to a Britney Spears song to their students for practice, there is nothing illegal about this If a choir teacher starts a website britneylyrics.com and puts ads on the website, that would qualify The EULA might prohibit redistribution, but you don't need to accept an EULA to copy-paste files, as far as I know.
- nine_k 2y agoSo, to clarify things: it's QEMU running in a container, and macOS running under QEMU inside it. This is really nice WRT the ease of installation: no manual setup steps and all. This likely expressly violates the [macOS EULA], which says: «you are granted a limited, non-exclusive license to install, use and run one (1) copy of the Apple Software on a single Apple-branded computer at any one time» — because the point is to run it not on a Mac. So, pull it and keep it around; expect a C&D letter come any moment. [macOS EULA]: https://www.apple.com/legal/sla/docs/macOSMonterey.pdf https://www.apple.com/legal/sla/docs/macOSMonterey.pdf (Other versions contain the same language.)
- jbverschoor 2y ago(iii) to install, use and run up to two (2) additional copies or instances of the Apple Software, or any prior macOS or OS X operating system software or subsequent release of the Apple Software, within virtual operating system environments on each Apple-branded computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using macOS Server; or (d) personal, non-commercial use
- nine_k 2y agoIndeed. That would cover a conventionally installed VM, like VirtualBox. But this is packaged as a Docker image, and Docker is Linux-specific. Linux is not officially supported by Apple on their hardware, and is certainly not prevalent on it. I doubt that the intended target audience of this project is limited to Asahi Linux.
- prmoustache 2y ago> I doubt that the intended target audience of this project is limited to Asahi Linux. I guess that part of the license is meant to automatically disqualify an apple branded computer running a linux distro as host OS from running MacOS in a VM: "on each Apple-branded computer you own or control that is already running the Apple Software" Some smart ass might argue that "already running the Apple software" doesn't mean at the exact same time but more like "I am still running it sometimes as dual boot" but I am not sure this would pass the court test. And since I believe docker on MacOS runs on linux VM, so this would be running qemu on top of a linux vm on top of MacOS. I can't see any legit use of this. Anyone who would need automatized and disposable environments for CI/CD would simply use UTM on mac minis: https://docs.getutm.app/scripting/scripting/ https://docs.getutm.app/scripting/scripting/
- misiek08 2y agoHow many levels possible? Did anyone already try? I mean MacOS running on docker on MacOS running on docker on MacOS running on docker on MacOS...
- hda111 2y agoWill not work with Docker on Mac: https://github.com/moby/hyperkit/issues/127 https://github.com/moby/hyperkit/issues/127
- Izmaki 2y agoI really hate when "USB Passthrough" is used in situations when, at best, a "USB over ethernet proxy" is what is happening. That's not passthrough... It introduces a whole range of disadvantages that regular passthrough does not (and advanced passthrough might not) have.
- arghwhat 2y agoEh? QEMU USB passthrough is true USB passthrough. The problems with USB passthrough stem from issues related to USB controllers themselves and how device enumeration works, with the only better solution being PCIe passthrough of entire USB controllers... Which then present a different set of problems. Speaking from experience in large VM test farms with a significant amount of forwarded hardware. (However, "USB over ethernet proxy" is also a true passthrough, just one with higher latency than VirtIO.)
- ThatMedicIsASpy 2y agoOn proxmox with a USB DAC/AMP it is impossible to get correct audio without pcie passthrough of the usb controller
- Izmaki 2y agoYeah, isochronous mode is unfortunately not supported for USB passthrough on Proxmox. There were experimental implementations in oVirt back in the days (that is: experimental implementations in a non-prod, only-for-evaluation solution...).
- m463 2y agoI've run into this too. And I had to do a bunch of investigation into iommu groups to find a controller that wasn't shared.
- Izmaki 2y agoI skimmed the README only and just saw the big section of USB over ethernet with the video image and everything, not the tiny mentioning of VFIO above it. Lol. But tell me please, which problems do you have with PCIe passthrough? Also speaking from experience in large VM test farms with a significant amount of forwarded hardware. I've never experienced problems with hundreds of machines doing exactly this, for years.
- JayDustheadz 2y agoCan this be launched on an M1 Mac? I'm trying to find a way to run a Big Sur VM on my M1 Mac on Monterey/Ventura.
- dyllon 2y agoCouldn’t you use UTM to run a macOS VM?
- JayDustheadz 2y agoSadly it doesn't look like it: https://mac.getutm.app/ https://mac.getutm.app/ "Note that macOS VM support is limited to ARM based Macs running macOS Monterey or higher."
- orbat 2y agoHave you run into Viable https://eclecticlight.co/virtualisation-on-apple-silicon/ https://eclecticlight.co/virtualisation-on-apple-silicon/ or VirtualBuddy https://github.com/insidegui/VirtualBuddy https://github.com/insidegui/VirtualBuddy ? I think at least Viable has some limitations though Edit: "some" limitations is putting it lightly. From https://eclecticlight.co/2022/11/17/lightweight-virtualisation-in-ventura/ https://eclecticlight.co/2022/11/17/lightweight-virtualisati... which is apparently still current: > Apple’s current implementation of lightweight virtualisation still has no support for Apple ID, iCloud, or any service dependent on them, including Handoff and AirDrop. Perhaps the most severe limitation resulting from this is that you can’t run the great majority of App Store apps, although Apple’s free apps including Pages, Numbers and Keynote can still be copied over from the host and run in a guest macOS. Same deal with VirtualBuddy, apparently the root of the problem is that some sort of hardware validations fail in VMs https://github.com/insidegui/VirtualBuddy/discussions/27 https://github.com/insidegui/VirtualBuddy/discussions/27
- saagarjha 2y agoApple ID support has been added in Sequoia.
- 2y ago
- nottorp 2y ago> Docker-OSX now has a Discord server & Telegram! The Discord is active on #docker-osx and anyone is welcome to come and ask questions, ideas, etc. No forum eh? Everyone should come to the live channels and ask the same questions again :)
- BoredPositron 2y agoDiscussions are open on their repo...
- lyu07282 2y agoDiscord has built-in forums with search. Tell me you've never used discord without telling me you've never used discord.
- nottorp 2y agoI keep it open 24/7. Where are those forums? Have you ever seen how a forum is organized? Do you think all text based chat windows are forums? Hint: reddit is sort of a collection of forums. Discord, whatsapp group chats, Slack and other similar things are not, they're just a discardable text chat. Tell me you don't know what a forum is without telling me you don't know what a forum is :)
- sebstefan 2y agoBuilt-in un-googleable forums with a gate in front that nobody even uses except the Rustlang discord
- replete 2y agoThe only chance at GPU acceleration is passing through a supported dGPU (>= AMD RX 6xxx @ 14.x, no chance modern nvidia) with PCI passthrough. Intel iGPUs work up to Comet lake, and some Ice Lake, but anything newer will not work. Apple Silicon build of MacOS probably not going to be emulatable any time soon, though there is some early work in booting ARM darwin Also Intel VT-x is missing on AMD, so virtualization is busted on AMD hosts although some crazy hacks with old versions of virtualbox can make docker kind of work through emulation
- steve1977 2y ago> Also Intel VT-x is missing on AMD, so virtualization is busted on AMD hosts Wouldn’t that work with AMD-V?
- zamalek 2y agoYeah I would expect it too. As far as I know, AMD has had better luck with hackintoshes and VMacs.
- replete 2y agoAMD is far more complicated than Intel based machines in this regard. There's never been an apple computer with an AMD CPU...
- shortformblog 2y agoI encourage you to check out the OSX-PROXMOX project, which fully supports AMD and is designed to simplify these inside-a-VM setups (though not as much as a Docker setup). https://github.com/luchina-gabriel/OSX-PROXMOX https://github.com/luchina-gabriel/OSX-PROXMOX Also, there are a couple of kext projects that allow you to use AMD graphics, even iGPUs, on Hackintoshes. I have not tested this myself, but there are rumblings you may even be able to get this to work with a Steam Deck. https://github.com/ChefKissInc/NootedRed https://github.com/ChefKissInc/NootedRed https://github.com/ChefKissInc/NootRX https://github.com/ChefKissInc/NootRX A lot has changed in the Hackintosh space around AMD of late. I don’t think the automatic pessimism is as warranted as it once was.
- synchrone 2y agoAny word if this would run the iOS simulator? Edit: it actually does!
- arusahni 2y agoLooking forward to kicking the tires on this to validate functionality in Safari.
- bckr 2y agoLet’s say I wanted to run a headless Logic Pro for programmatic music production. Would I use this? Or should I containerize the application itself? It’s okay if I have to run it on Apple hardware.
- replete 2y agoDepends on whether you have plugins requiring GPU acceleration, as there is none
- adamgordonbell 2y agoNot to be confused with native Mac OS "containers": https://darwin-containers.github.io/ https://darwin-containers.github.io/ This parent project is VMs of OSX with a docker interface, I think. Darwin containers are runc reimplemented in terms of MacOS chroot, so you do some isolation on native macs in a docker style.
- xandrius 2y agoI'd love to try and see if it's possible to simply build for iOS. Say Unity, React Native, etc. This could be pretty awesome in terms of freedom, even if the build takes 5x more.
- arcanemachiner 2y agoI did this. I had to share my USB port over Docker somehow (black magic I guess, instructions in the repo) and I was able to build iOS apps and run them on an iPhone.
- flawn 2y agoWhat was the speed like?
- arcanemachiner 2y agoFor a basic Flutter app: tolerable
- ProfessorZoom 2y agoThat would impressive if you could build for React Native iOS (with native Swift modules) and run it on a simulator in this on a Windows machine
- shepherdjerred 2y agoCross-compiling is likely a better approach: https://github.com/tpoechtrager/osxcross https://github.com/tpoechtrager/osxcross This is how Godot targets iOS: https://github.com/godotengine/build-containers/blob/main/Dockerfile.ios https://github.com/godotengine/build-containers/blob/main/Do... Here's a Docker image with the tools preinstalled, though you'll need some tweaks to target iOS: https://github.com/shepherdjerred/macos-cross-compiler https://github.com/shepherdjerred/macos-cross-compiler While at RStudio (now called Posit), I worked on cross-compiling C/C++/Fortran/Rust on a Linux host targeting x86_64/aarch64 macOS. If you download an R package with native code from Posit Package Manager (https://p3m.dev/client/ https://p3m.dev/client/), it was cross-compiled using this approach :)
- mjlee 2y agoHuh, why does this repo have its own glibc? Let's check the commit history: Self-host in the repo glibc to emphasize the temporariness of this patch sickcodes committed Feb 12, 2021 Seriously though, this is great.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- pmarreck 2y agoNow I just need a flake.nix that does the same thing lol (I don't like Docker...)
- daft_pink 2y agoThis would be awesome to run iCloud sync on my homeserver. Currently, there is no good way to physically backup iCloud on a homeserver/nas, because it only runs on windows/apple.
- toomuchtodo 2y agoThis might assist you in syncing this data and then either storing locally or pushing elsewhere for backups: https://github.com/steilerDev/icloud-photos-sync https://github.com/steilerDev/icloud-photos-sync https://github.com/icloud-photos-downloader/icloud_photos_downloader https://github.com/icloud-photos-downloader/icloud_photos_do...
- bm3 2y agoHow would this help with that? What would this let you do that's different than just rsync'ing your iCloud folder from a connected Mac/PC to your NAS?
- daft_pink 2y agoThe problem is that I would have to purchase a dedicated desktop with enough storage to hold all my iCloud files and iCloud no longer syncs to external drives, so it’s cost prohibitive to purchase a desktop Mac expressly for that purpose.
- paranoidrobot 2y ago> that's different than just rsync'ing your iCloud folder from a connected Mac/PC My guess: Being able to run it on a non-Mac/Windows machine.
- watusername 2y agoThis is just running macOS in a VM. For much less fiddling and more stability, you can just run Windows in a VM instead for this use case.
- teh_hippo 2y agoI've been working on a solution here that uses OSX-Docker & OSXPhotos. It's getting there, but I wanted a way to back-up all the info in iCloud, but also include the metadata changes. Turns out that iCloud doesn't update the raw photos. Makes sense, but not helpful for those who do back-ups and expected those changes to be there.
- dang 2y agoRelated: Docker-OSX: Run macOS VM in a Docker - https://news.ycombinator.com/item?id=34374710 https://news.ycombinator.com/item?id=34374710 - Jan 2023 (110 comments) macOS in QEMU in Docker - https://news.ycombinator.com/item?id=23419101 https://news.ycombinator.com/item?id=23419101 - June 2020 (186 comments)
- cheptsov 2y agoIf this receives support for an Apple GPU, it will be incredibly significant!
- croemer 2y agoNote that this project currently provides only x86-64 Docker images, and not for aarch64.
- cheptsov 2y agoI wonder if the project makes it possible to run macOS inside a container on a macOS host?
- 486sx33 2y agoParallels already does this…
- replete 2y agoNo apple silicon emulators exist yet, and probably wont for years
- mappu 2y agoQemu can somewhat do it already, with limitations - see https://youtu.be/oZqFYJVOUQo?si=wKaK6vLzfomESerY https://youtu.be/oZqFYJVOUQo?si=wKaK6vLzfomESerY
- replete 2y agoYes but the host he's using is Apple Silicon, I think what he's talking about is QEMU using Apple's Hypervisor Framework, which is what vmware Parallels, etc also use nowadays. Booting an apple silicon version of MacOS on non-Apple hardware probably isn't going to possible for a while as it would require emulation. In 2021 Blackberry, surprisingly, wrote this article about getting emulating the XNU kernel and getting it running on non-apple hardware, but its just a terminal: https://blogs.blackberry.com/en/2021/05/strong-arming-with-macos-adventures-in-cross-platform-emulation https://blogs.blackberry.com/en/2021/05/strong-arming-with-m... Someone would have to write something that can emulate/abstract the apple iGPU to get anywhere near a usable GUI - I'm no expert but I don't think this is going to happen anytime soon, so when Intel releases of MacOS stop happening apple hardware might be the only way to virtualize MacOS for a while
- evanhughes 2y agoFor some reason I was convinced this wouldn't work, I was wrong. I guess docker can run any image so that makes sense.
- shortformblog 2y agoI did an interview with Sick Codes a while back where he talked about his approach to this product: https://www.vice.com/en/article/akdmb8/open-source-app-lets-anyone-create-a-virtual-army-of-hackintoshes https://www.vice.com/en/article/akdmb8/open-source-app-lets-... Also wanna point out the existence of OSX-PROXMOX, which does something similar for Proxmox home servers: https://github.com/luchina-gabriel/OSX-PROXMOX https://github.com/luchina-gabriel/OSX-PROXMOX I’ve personally been using the latter on my HP Z420 Xeon; it’s very stable, especially with GPU passthrough.
- mysore 2y ago[flagged]
- acka 2y agoSomewhat off topic but still highly relevant for people who actually want to use projects like this: why oh why do so many build recipes such as Dockerfiles insist on pulling random stuff off the internet as part of the build process? For example, the Dockerfile in this project pulls in two Git repositories and a script at build time. Besides the obvious build failures on heavily sandboxed build servers with no access to the internet, this forces anyone with even a little concern for security to do a full audit of any build recipes before using them, as merely studying and making available the dependencies listed in READMEs and build manifests like requirements.txt, package.json etc., is no longer enough. I find this a very worrying development, especially given the rise in critical computer infrastructure failures and supply chain attacks we've seen lately.
- dbtablesorrows 2y agoThe answer is churn, my friend. There's so much churn in devops space that nobody has time to figure out "the correct way" anymore.
- nstart 2y agoIn this case, the individual did it for their own research purposes for security stuff. I looked at their profile. They have a demo running a modded version of Doom on a John Deere tractor display. This person definitely takes the time to figure stuff out :D .
- BossingAround 2y ago
- l8rlump 2y agoNew to containers. How easy would it be to run only the OSX Reminders and Calendar apps, or as stripped-down as possible a system to get these running without the overhead of the OS? The webapp versions of these are crippled compared to the OSX/iOS apps.
- oldandboring 2y agoI set this up a few months ago as an experiment. Worked pretty well until I discovered that for iMessage to work, the application phones home to Apple using your hardware IDs, and this project uses fake values. At that point I started spiraling down the Great Waterslide of Nope, slowly discovering that the fake values are flagged by Apple and they will, as a consequence, flag your iCloud ID as a potential spammer, limiting your access from other devices. Your only option is to use a hardware ID generator script they vaguely link out to, and you can just keep trying values until you find one that "works", but there's not actually a good signal that you found one that works and isn't harming your iCloud reputation. Worked really great otherwise, though. Very useful in a pinch.
- nixpulvis 2y agoPro tip: In general, don’t use your main iCloud account (or other accounts) for security research.
- judge2020 2y agoThe "keep cycling HWIDs until one works" thing was also common to get Hackintosh iMessage to work, you'd be able to check if it works by going to checkcoverage.apple.com. I quickly realized it's easier to copy the Serial from a old but real Mac. But I think this tool is more useful for things like build scripts (that rely on proprietary macOS frameworks) more than it is for actually using it like a personal computer.
- deleted 2y ago[deleted]
- calini 2y agoThis is SO useful for cross-compilation, and delivering macOS binaries!