Live data from Hacker News

Running GUI Linux in a virtual machine on a Mac

developer.apple.com

191–200 of 206 posts

Re: Running GUI Linux in a virtual machine on a Mac

#191

Earlier quoted context omitted.

In all cases, the Docker daemon is running under Linux. The Mac and Windows versions are merely bundling up a Linux VM containing Docker with a frontend that's as transparent as possible, but still with Linux as a hard requirement. Pretending that the Mac and Windows versions somehow aren't using Linux VMs behind the scenes is of no use to anyone. It's a convenience for users when they can get by with ignoring the VM…

> In all cases, the Docker daemon is running under Linux. The Mac and Windows versions are merely bundling up a Linux VM containing Docker with a frontend that's as transparent as possible, but still with Linux as a hard requirement. I really doubt that's the case if you run native Windows containers on Windows.

Thanks for pointing that out. I hadn't realized Microsoft had jumped on the Docker bandwagon to that extent; it's far enough from the topic at hand and from anything I'd ever use that I overlooked it.

So while there is in fact an exception to my previous generalization, there's still no cross-platform compatibility magic to Docker aside from that of virtual machines. If the container OS is different from the host OS (or a different version of the OS, for Windows containers), then using Docker is an instance of using VMs, not an alternative to VMs.

Re: Running GUI Linux in a virtual machine on a Mac

#192

Earlier quoted context omitted.

It's not "scare quotes" - it's to convey sarcasm and justified scepticism. Sure, poorly coded third party kernel extensions can have security and / or stability issue. That doesn't mean that Apple is the only one who knows how to write such bug-free or secure system software. In fact, in the past most of the popular application firewalls (and VM softwares) on macOS came with their own kernel extensions and have worke…

> That doesn't mean that Apple is the only one who knows how to write such bug-free or secure system software. In fact, in the past most of the popular application firewalls (and VM softwares) on macOS came with their own kernel extensions and have worked fine without issues, and millions of users have used such applications without any issues. Apple definitely cannot write bug-free code, but your claim that third-pa…

> but your claim that third-party software worked fine without issues is factually incorrect.

That's a misunderstanding of what I was trying to convey. To clarify - I was specifically talking about existing application firewalls and VM applications for macOS that use / used kernel extensions and already have a large userbase on macOS. Their popularity, and relative stability of the kernel extensions these applications used, is proof that Apple's black and white approach of "all non-Apple kernel extensions are bad" is rubbish. Especially when we consider how such a move is also anti-competitive and anti-consumer, and thus helps Apple's business.

Forcing developers to make an expensive migration from their own tried-and-tested and stable codebase over which they have full control, to use Apple's OS API's is a developer hostile move. Even more so when you consider that a developer will now have to rely on Apple to fix bugs or add new features - which Apple may have no inclination to do so so if it feels it isn't aligned to their own business interest (thus anti-competitive).

I personally have been using some of these applications that install custom kernel extension, and my macOS (3 versions of macOS over a period of a few years) has never crashed or become unstable because of them, so far. If an application that used a kernel extension made my system unstable or crashed it, I obviously wouldn't use it and will uninstall it. But completely taking away my choice as user to customise my OS with kernel extensions, and reducing my choices (as a customer) by taking away the ability of developers to offer a non-Apple custom software solution that is better is also obviously anti-consumer.

Re: Running GUI Linux in a virtual machine on a Mac

#193

Earlier quoted context omitted.

It's not "scare quotes" - it's to convey sarcasm and justified scepticism. Sure, poorly coded third party kernel extensions can have security and / or stability issue. That doesn't mean that Apple is the only one who knows how to write such bug-free or secure system software. In fact, in the past most of the popular application firewalls (and VM softwares) on macOS came with their own kernel extensions and have worke…

> It's not "scare quotes" - it's to convey sarcasm and justified scepticism. Sure, poorly coded third party kernel extensions can have security and / or stability issue. That doesn't mean that Apple is the only one who knows how to write such bug-free or secure system software. They don't have to be "the only one who knows how to write such bug-free or secure system software". They just have to disallow a class of po…

> I'd rather trust just Apple on kernel-space (which I have to anyway, as they make the kernel), than Apple + any random third party software that wants to run as a kernel extension.

Which is all ok till you consider that experienced developers that make good system software can offer better software than Apple, which often may have no incentive to support softwares that isn't aligned with their business interest. Application firewalls is an example, because they can also prevent Apple software and services from data-mining a users personal data. (You may trust the Apple codebase on which all Application firewalls on macOS are forced to run, but what if I don't and want alternative? And if you say, "Then don't use macOS", note that's a very anti-consumer view and is toss to everyone's consumer rights). Virtualisation is another example where non-Apple options can be better than Apple's as Apple would prefer that you do everything on their OS than use alternate ones. Or when you don't want to use Apple software because of the terms you have to accept to use it.

Re: Running GUI Linux in a virtual machine on a Mac

#194

Earlier quoted context omitted.

With Apple, it is all about exerting control and crippling softwares that don't align with their goals. Don't be surprised if Apple suddenly forces developers to only use their virtualisation API on macOS, just like they did for application firewalls (that are no longer allowed to have their own custom kernel extensions for "security" and "stability"). They are slowly squeezing macOS to make it more and more like ios…

> Don't be surprised if Apple suddenly forces developers to only use their virtualisation API on macOS As far as I can tell, nobody has made a third party virtualization solution for Apple silicon nor is anyone really looking to do so. I don't think this conclusion is particularly surprising.

What about UTM - https://mac.getutm.app/ - based on QEMU? VM applications - Parallels, VMWare, Virtualbox etc. - have long been available on macOS and so its not as if nobody suddenly wants it just because their macOS is running on ARM SoC. There can be many reasons why they haven't yet migrated to Apple Silicon Macs, some of which may be the smaller userbase, the cost of migrating to a new platform, lack of literature or support from Apple, Apple not allowing them to offer their virtualising application using their own custom kernel extensions or Apple asking them to wait and use their virtualisation API under development.

To be clear, I don't believe there is anything wrong with Apple offering built-in OS API solution for applications like firewall, virtualisation, graphic engines etc. The problem is when they say you can only use those and don't allow competition.

When a particular type of software on macOS is forced to use just one particular API, it stunts all such softwares using the APIS as they can't really offer any major distinction and can only offer the limited features the API provides. Worse still is when such practices is actually meant to restrict competition to protect their business interest. For example, it is clear that Apple is pivoting more and more into commercialising user privacy (monetised through its services) and advertising (by data mining personal data through these same services). In such a case, existing softwares that offer privacy protections (like application firewalls and even alternate operating systems on macs) are examples of competing system softwares that impede this goal. Obviously Apple cannot directly ban these softwares without negative user backlash. But it can ensure that such softwares are crippled by forcing users to use limited API's and / or by limiting the operating environment they run on. (The frog is slowly boiling - https://en.wikipedia.org/wiki/Boiling_frog - and we developers and users are slowly losing more a more control over our Apple computers and device).

Re: Running GUI Linux in a virtual machine on a Mac

#195

Earlier quoted context omitted.

It's not "scare quotes" - it's to convey sarcasm and justified scepticism. Sure, poorly coded third party kernel extensions can have security and / or stability issue. That doesn't mean that Apple is the only one who knows how to write such bug-free or secure system software. In fact, in the past most of the popular application firewalls (and VM softwares) on macOS came with their own kernel extensions and have worke…

This isn’t the way Apple wanted it to work. In a perfect world vendors would write good kernel extensions that were stable and wouldn’t crash a system. Instead, in the real world we got vendors that wrote horrible and unstable code that was required by IT departments. For example, instead of implementing a firewall using Apple technologies, in a stable manner, we got an “enterprise” firewall kext that would crash whe…

There are also examples of popular applications with kernel extensions that have been used by thousands / millions of users without any issue for years now on various macOS versions. Why should such system developers be punished with an inferior alternative, especially when it also serves Apple's interest by being anti-competitive too!?

Re: Running GUI Linux in a virtual machine on a Mac

#196
post #130

Earlier quoted context omitted.

Oh please. You are quoting an issue that happened two years ago and Apple has already acknowledged that their algorithms were crappy and promised to reengineer this stuff. This is like claiming that Linux does not allow you to install software because a repository happens to be down.

So where is the redesign? This is like saying that a repository is down for two years, but it's fine, since they promised to fix that. Also, it's much worse, because Apple knows every app you run, including, e.g., Tor Browser. Do you think it's good for your privacy? Can you yourself fix that on "your" computer, which you "control"?

Apple since implemented encryption for the OCSP protocol they were using (addressing privacy concerns) and most likely improved the infrastructure to avoid similar outages. They also promised that users could opt out of certificate revocation checking, but so far they have not delivered, this much is true.

I am not at all concerned about the privacy of Apple occasionally verifying the developer certificates I use on my computer. I think they have much better things to do then log this information and try to link it back to me. I mean, if they want to know which software I run they have many more — and much better — options to collect my private data than using OCSP. In the end, this is about trust more than about anything else. A Linux software repository could also be collecting data about which packages you download. Second, OCSP is a standard protocol for certificate checking in the web. I mean, Firefox is using it. So is Firefox bad for privacy now? Besides, I think it's entirely silly to be concerned about OCSP privacy when we have things like unencrypted DNS lookup still being the normality.

Look, I fully understand that some people dislike the idea of their OS periodically checking certificates on their computer. Fortunately, there are plenty of systems on the market that can cater to different needs and expectations. You decide what is a concern for you and what not. If you are privacy-oriented to the fault, you probably want to use some secure version of Linux with IP anonymisers, manually installed software and of course everything strictly audited. Most people don't care about this stuff.

Re: Running GUI Linux in a virtual machine on a Mac

#197

Earlier quoted context omitted.

> It's not "scare quotes" - it's to convey sarcasm and justified scepticism. Sure, poorly coded third party kernel extensions can have security and / or stability issue. That doesn't mean that Apple is the only one who knows how to write such bug-free or secure system software. They don't have to be "the only one who knows how to write such bug-free or secure system software". They just have to disallow a class of po…

> I'd rather trust just Apple on kernel-space (which I have to anyway, as they make the kernel), than Apple + any random third party software that wants to run as a kernel extension. Which is all ok till you consider that experienced developers that make good system software can offer better software than Apple, which often may have no incentive to support softwares that isn't aligned with their business interest. Ap…

>and if you say, "Then don't use macOS", note that's a very anti-consumer view

Not much more "anti-consumer" than "if you prefer formal attire, then just don't buy Levi's - as opposed to insist the make black suits and bow ties".

Though I understand the convenience - I'd like to have the option myself in some cases.

What I dont like is third party companies forcing you to install a kext if you want to use their product, for non essential reasons (that could be handled in userland). At least this forces them to work with userland APIs (looking at the "haxie" peddlers out there).

Re: Running GUI Linux in a virtual machine on a Mac

#198

Earlier quoted context omitted.

> Don't be surprised if Apple suddenly forces developers to only use their virtualisation API on macOS As far as I can tell, nobody has made a third party virtualization solution for Apple silicon nor is anyone really looking to do so. I don't think this conclusion is particularly surprising.

What about UTM - https://mac.getutm.app/ - based on QEMU? VM applications - Parallels, VMWare, Virtualbox etc. - have long been available on macOS and so its not as if nobody suddenly wants it just because their macOS is running on ARM SoC. There can be many reasons why they haven't yet migrated to Apple Silicon Macs, some of which may be the smaller userbase, the cost of migrating to a new platform, lack of literatu…

"Virtualization" in this context is not the framework but a custom hypervisor API rather than Apple's, as some vendors implemented on Intel Macs. I agree with your points about this limiting what you can do, but the replacement API is actually fairly decent in this case–there are some things that could be improved but overall it's not actually that bad.

Re: Running GUI Linux in a virtual machine on a Mac

#199

Earlier quoted context omitted.

What about UTM - https://mac.getutm.app/ - based on QEMU? VM applications - Parallels, VMWare, Virtualbox etc. - have long been available on macOS and so its not as if nobody suddenly wants it just because their macOS is running on ARM SoC. There can be many reasons why they haven't yet migrated to Apple Silicon Macs, some of which may be the smaller userbase, the cost of migrating to a new platform, lack of literatu…

"Virtualization" in this context is not the framework but a custom hypervisor API rather than Apple's, as some vendors implemented on Intel Macs. I agree with your points about this limiting what you can do, but the replacement API is actually fairly decent in this case–there are some things that could be improved but overall it's not actually that bad.

I do believe most of the current VMM apps - Virtualbox, Parallels, VMWare - that run on Intel Mac do offer their own custom hypervisor solution mostly tapping on to "Intel Virtualization solution" ( https://www.intel.com/content/www/us/en/virtualization/virtu... ) through kernel extensions and / or the macOS hypervisor framework (which I think avoids kernel extension). This is possible because Intel is more "open" and readily shares their hardware literature / SDKs with developers and that is why we have had many custom, decent and performant hypervisor solution on Intel Macs. But Apple has been loathe to release similar literature for their ARM SoCs because they don't want independent competitive alternatives to their system softwares (which is ok up to a point to protect their business, but not if it crosses into illegal anti-competitive behaviour).

Apple has great developers and they can surely build a decent hypervisor API solution. But we'll never know if it is the best if no custom alternates are allowed (either due to lack of hardware literature or due to Apple policies restricting such custom alternatives).

Re: Running GUI Linux in a virtual machine on a Mac

#200

Earlier quoted context omitted.

> That doesn't mean that Apple is the only one who knows how to write such bug-free or secure system software. In fact, in the past most of the popular application firewalls (and VM softwares) on macOS came with their own kernel extensions and have worked fine without issues, and millions of users have used such applications without any issues. Apple definitely cannot write bug-free code, but your claim that third-pa…

> but your claim that third-party software worked fine without issues is factually incorrect. That's a misunderstanding of what I was trying to convey. To clarify - I was specifically talking about existing application firewalls and VM applications for macOS that use / used kernel extensions and already have a large userbase on macOS. Their popularity, and relative stability of the kernel extensions these application…

> Their popularity, and relative stability of the kernel extensions these applications used, is proof that Apple's black and white approach of "all non-Apple kernel extensions are bad" is rubbish.

Thats not what they are saying though. They are saying, when we have official userspace API, we will remove access to the old kernelspace API.

Thats not to say the kext is bad or evil. It is to say you won't be able to accomplish it in a kext using public api anymore.

Were there badly written kexts before? Were there kexts with interactions? Were there kernel API and whole subsystems kept in for years because some popular enterprise product refused to update?

Absolutely. I'll refrain from mentioning the one I had in mind which hit all three checkboxes.

Post reply on HN