18 ms·
macOS 11 Virtualization Framework to Run Linux in a VM
- beamatronic 6y agoI don’t understand the headline. I already run Ubuntu, which is Linux, under Virtual Box, on Mac.
- beervirus 6y ago> No overview available. Cool, why is this even posted?
- olliej 6y agoRight? It doesn’t look like any of it is documented?
- samgranieri 6y agoIt's usually like that at first. It'll change later on.
- geerlingguy 6y agoHopefully.
- ChrisMarshallNY 6y agoI'm not holding my breath. I have recently been working with Core Bluetooth (years old), and Swift Package Manager (also long in the tooth), and the documentation for them is still pretty awful. SwiftUI is really bad. In fact, someone has even written a documentation sidecar app for it[0]. I'm spoiled, though. I used to have the full 6-volume set of Inside Macintosh[1]. They don't write 'em like they used to... [0] https://apps.apple.com/us/app/a-companion-for-swiftui/id1485436674?mt=12 https://apps.apple.com/us/app/a-companion-for-swiftui/id1485... [1] https://en.wikipedia.org/wiki/Inside_Macintosh https://en.wikipedia.org/wiki/Inside_Macintosh
- plorkyeran 6y agoSwift Package Manager at least is open source. Unfortunately, digging into the source to find out how to do some incredibly basic thing that any package manager obviously must support and they just haven't documented usually just reveals that they really haven't implemented it.
- saagarjha 6y agoBecause it shipped as part of the SDK in the Big Sur beta today.
- beervirus 6y agoIt’s just a bunch of undocumented class names though.
- saagarjha 6y agoThat's better than Hypervisor.framework was until recently.
- zitterbewegung 6y agoThat’s basically what you can get from apple at this time. They aren’t that motivated for documentation.
- balladeer 6y agoMost of the times when I face a problem on my Mac or iPhone I am surprised to find an official support article by Apple for that problem. But the answer is almost never in that article and then I have to anyway hunt for the answer on the Internet.
- codercotton 6y agoIs there a Docker release for Apple Silicon yet?
- mrpippy 6y agoThe header file likely has comments that didn’t make it into these docs.
- saagarjha 6y agoIt does! (I just picked the first one that I found, the rest also have comments.) $ cat /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/ System/Library/Frameworks/Virtualization.framework/Headers/VZBootLoader.h // // VZBootLoader.h // Virtualization // // Copyright © 2019 Apple Inc. All rights reserved. // #import <Virtualization/VZDefines.h> NS_ASSUME_NONNULL_BEGIN /*! @abstract Base class of boot loader configuration. @discussion VZVirtualMachineConfiguration requires a boot loader defining how to start the virtual machine. VZBootLoader is the abstract base class of boot loader definitions. Don't instantiate VZBootLoader directly, instead you should use one of its subclasses. @see VZLinuxBootLoader. */ VZ_EXPORT API_AVAILABLE(macos(11.0)) @interface VZBootLoader : NSObject <NSCopying> + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END
- dang 6y agoI put a line break in your file path to prevent the comment from borking the page layout. Sorry. It's a bug we're working on.
- stock_toaster 6y agoLooks like this is just the "Virtualization Extensions" (apple silicon support) for the hypervisor framework (which has been around since 10.10 and is used by xhyve, and I believe the macos docker port?): https://developer.apple.com/documentation/hypervisor https://developer.apple.com/documentation/hypervisor Is that correct?
- ArgyleSound 6y agoHigh level ObjC APIs vs lower level C APIs
- ytch 6y agoMaybe we can view it as a high-level API of hypervisor framework?
- saagarjha 6y agoNo, this looks separate. You'll notice the APIs have to do with virtualized networks and filesystems, rather than lower-level hypervisor tasks (creating and running virtual machines, servicing exits, etc.)
- lstamour 6y agoPossibly it was needed for no-driver virtualization while preserving the same functionally of https://blogs.vmware.com/teamfusion/2020/07/fusion-big-sur-tech-preview.html https://blogs.vmware.com/teamfusion/2020/07/fusion-big-sur-t... — note there’s a newer beta if you view the community link, I think, and I can’t find an equivalent public beta from Parallels yet but presumably they’re working hard on it...
- hiphipjorge 6y agoThere might be nothing available on this page right now, but wow is this useful. I recently started doing some macOS dev and realized that this is a pretty big limitation when it comes to my normal CI workflows. I know there are some projects that dockerize macOS but they did not seem simple to work with.
- mgliwka 6y agoMany hosted CI solutions (i.e. Travis, Github Actions) support OS X natively.
- m463 6y ago> wow is this useful. I agree. I liked that you could run docker on osx, but there was no support for something like FROM macosx:10.6 Maybe it will be possible? If apple put 1/1000th of the effort into virtualization/containers that they put into emojis...
- saagarjha 6y agoNotably, Apple still has not released an Apple silicon chip that can do virtualization. So as far as I can tell, this framework is currently not testable on their systems using the A12Z.
- api 6y agoAFAIK this is an ARM IP module they can just add.
- saagarjha 6y agoA14 is rumored to have this already, it's not like they don't know how to do this but more that they had no reason to do so until now.
- ytch 6y agoParallel Desktop demos running linux on Apple Silicon in WWDC, maybe they have internal developer kit based on A14, but it cannot be made public.
- AlexCoventry 6y agoWhat's the reason to do it now?
- saagarjha 6y agoThey’re shipping Macs that need it by the end of the year.
- monocasa 6y agoDevelopers are something absurd like 20% of their install base, so Docker gets a first class seat at the table from a product requirements perspective? Albeit in aarch64 mode.
- pjmlp 6y agoDevelopers != Someone using macOS as pretty Linux to deploy on Linux. Also I am yet to see any benefit with docker in Apple platforms ecosystem.
- naetius 6y agoThe real question here is how documented/open the boot loader is gonna be and if (how) it'll be possible to just boot whatever ARM64 code instead of going down the hypervisor way.
- saagarjha 6y agoYou might be interested in this video, specifically the parts of how boot security works: https://developer.apple.com/videos/play/wwdc2020/10686/ https://developer.apple.com/videos/play/wwdc2020/10686/
- naetius 6y agoYeah, I’m aware of that process. The question here is whether disabling secure boot (which in that video would allow running “even old macOS versions”) would also permit unsigned blobs to boot and set up the silicon. We are still not sure about ASi’s memory map and if/how there are other limitations that might prevent it from booting anything other than macOS.
- yadco 6y agoSeems like competition for WSL
- skee0083 6y agoLinux is just an app that runs in macOS and windows.
- saagarjha 6y agoThere's an app called iSH on TestFlight that gives you precisely that for iOS as well ;)
- deeblering4 6y agoiSH is actually pretty great, considering the compromises that must be made to get a local shell on an iPhone. Just wish it was debian based
- skissane 6y agoIgnoring the "just" (it is much more than just that), running one OS under another is scarcely a new thing. In early 1977, Unix V6 was an app that run on Interdata OS/32 [1]. (Within a few months, it had gained the ability to run directly on the Interdata 7/32 hardware, without the need for the rather primitive OS/32 operating system to sit under it.) AT&T's 1979-1980 port of Unix to IBM mainframes ran it on top of the TSS/370 operating system [2]. (TSS was IBM's original, and ultimately unsuccessful, attempt to deliver timesharing for S/360 mainframes – TSO under MVS, and VM/CMS, succeeded where TSS largely failed. But TSS hung on for a few more years, sustained by the handful of customers using it, and AT&T decided it was the best base for their mainframe Unix port, and IBM was wiling to support them in that.) [1] http://bitsavers.informatik.uni-stuttgart.de/bits/Interdata/32bit/unix/univWollongong_v6/miller.pdf http://bitsavers.informatik.uni-stuttgart.de/bits/Interdata/... [2] https://www.bell-labs.com/usr/dmr/www/otherports/ibm.pdf https://www.bell-labs.com/usr/dmr/www/otherports/ibm.pdf
- sys_64738 6y agoIsn’t this just the HV FW that exists already? Would you really expect the API to change between x86 and Apple ARM chips?
- rafaelturk 6y agoWell hopefully not, however given that x86 and ARM are different CPUs API will likely change
- jen20 6y agoThis is a _much_ higher level API - hypervisor.framework is documented here: https://developer.apple.com/documentation/hypervisor https://developer.apple.com/documentation/hypervisor
- nikolay 6y agoSo, you create a problem... and then you create a solution. Windows 10 with Terminal, winget, WSL2 with soon X Window beats macOS as a development platform.
- baddox 6y agoWell, no. What’s the problem they created?
- creativeCak3 6y agoThe fact that it is very unlikely that you will be able to run linux(or any other OS; unix-based or otherwise) on a computer that you PAY(potentially more than 1500 hundred dollars) and all you get some "BootCamp" Spagetti Windows on the hardware asides from macOS. I'm sure the ones in the Apple Cult will still pay for these ARM-based machines, but Apple really is shooting themselves the foot with all this lockdown. And nybody who thinks this makes their platform "secure" or "less prone to attacks" is full of it. I'm kind of interested in seeing the clusterfuck this will turn into when Apple comes out with their own proprietary firmware for EVERYTHING on their glorified Apple Silicon.
- ixtli 6y agoYou’ve got to acknowledge that people have been saying this for 30+ years and it keeps working for them. If anything the history of the company shows that when they use other people’s tech it burns them. ESR wrote the cathedral and the bazaar how many years ago?
- harpratap 6y agoThey have been relying on "other people's tech" like Linux Kernel, Apache Mesos and now Kubernetes to power their own systems for decades now, doesn't seem to burn them in the slightest. It's all about controlling users for them.
- 6y ago
- cV6WB 6y ago“No overview available.”
- tonyedgecombe 6y agoDocumentation has been my biggest frustration with Apple development.
- jagged-chisel 6y agoTheir documentation had been stellar until just around the new focus on Swift. The C, C++, and Objective-C APIs were documented well, complete with guides on the preferred way to use them. I think it might have been well before the Swift switch that they headed downhill - I have a vague memory that some New Big Features came along on OS X and the documentation was lacking and then never caught up to the quality of the older stuff.
- antoncohen 6y agoI'm assuming Big Sur on ARM will be virtualizing ARM, not emulating Intel, meaning a VM will need to run an ARM Linux distro. In the short term I expect that to be problematic. First party packages in the distro's package manager will be fine, but I expect it might be hard to find some third-party software compiled for ARM Linux. And any Docker containers in the Linux VM will need to use multi-arch or ARM Docker images.
- LawnGnome 6y agoI don't think it'll be all that bad: one advantage of Raspberry Pis having been out for several years is that there's already been some demand for ARM and ARM64 builds of software. Closed source, commercial software might be a bit more of a crapshoot, of course, but this should provide a fair bit of impetus.
- marcan_42 6y agoActually, the rPi foundation have been extremely lazy about ARM64 support. The Pi 3 and newer support it (and I run 64bit Arch on mine), but Raspbian does not. I'd wager 95% of Pi users are stuck with 32-bit ARM software, as you have to go out of your way for ARM64 support.
- brirec 6y agoThere is a beta build of Raspberry Pi OS (née Raspbian) in ARM64 available. https://www.raspberrypi.org/forums/viewtopic.php?p=1668160 https://www.raspberrypi.org/forums/viewtopic.php?p=1668160
- quaa55 6y agoThis. plus fedora and arch/manjaro and many others have great aarch64 support. pinebook pro user here.
- danieldk 6y agoIf I am counting correctly, nixpkgs (NixOS) Hydra currently builds 22369 packages successfully on AArch64. IIRC also 98% of Debian unstable builds on AArch64. So even though the rPi foundation may be slow (I don't know), the larger community has been working hard on making software build on AArch64.
- Alupis 6y agoIs it possible yet to virtualize an OSX install without breaking the EULA?
- wmf 6y agoYes, the EULA allows running macOS on macOS. (I realize this isn't what you want.)
- stephenr 6y agoTechnically I believe you're still "covered" if you were to e.g. run a macOS VM, under some non-macos "host", on Mac hardware. I'd imagine the most common scenario for that would be macOS guests running on ESXi on Mac hardware, but my understanding is that e.g. a macOS guest under say Vbox or KVM with a linux host OS should also be "ok" in terms of the EULA.
- Alupis 6y agoSomeone quoted the actual EULA below. I won't repost it since I don't want to steal their thunder, but it's very clear you can virtualize macOS up to two instances on your Mac computer. Extremely limiting, and a real bummer. Here in 2020, Apple invests a lot of resources to allow other OS's to be virtualized on macOS, but you still can't virtualize macOS on other OS's
- stephenr 6y ago> but you still can't virtualize macOS on other OS's The EULA does not say "you must virtualise macOS as a guest VM on a macOS host". It says you must do it on Mac hardware. As I said above - ESXi on Mac with macOS guests is very much a thing that happens, at reasonable scale.
- Alupis 6y agoI doubt it. VMware would need to develop special drivers just for macOS, since there seems to be practically zero cooperation from Apple here. Even with some compatibility shim or custom drivers, just like Hackintoshes, these VM's would be subject to breaking on every OS update. And the EULA clearly states it only allows up to 2 instances of macOS to be virtualized on a Mac computer already running Apple software, ie macOS.[1] [1] https://news.ycombinator.com/item?id=23924200 https://news.ycombinator.com/item?id=23924200
- pjmlp 6y agoIronically the "Year of Desktop Linux" seems to be running GNU/Linux inside VMs on macOS, Windows and even ChromeOS.
- raghava 6y agoYear of "virtualized Linux on Desktops!" - growing strong since 2010, powered by Docker, k8s and Cloud.