12 ms·
Why are Apple Silicon VMs so different?
- gnatolf 3y agoWhat's the progress, or who's behind a virtio layer for windows? Any hope that this will work in the foreseeable future?
- virtioliker 3y ago(oh and to answer the other part of your question: I believe Red Hat contribute a lot to virtio-win)
- gnatolf 3y agoThanks. I'm sorry if my question wasn't particularly complex to answer ; - )
- virtioliker 3y agoThere's mature VirtIO drivers for just about everything already, under the virtio-win umbrella: https://github.com/virtio-win/kvm-guest-drivers-windows https://github.com/virtio-win/kvm-guest-drivers-windows My desktop PC is using libvirt+qemu (on an Arch host. I use Arch, btw) to PCI passthru my RTX 4090 GPU to a Windows guest. I installed the guest initially with emulated SATA for the main drive. Once Windows was up and running, I installed virtio-win and the guest is now using virtIO accelerated drivers for the network interface + main disk. I'm also sharing some filesystems using virtio-fs.
- ComputerGuru 3y agoDid you have to use any hacks to get a regular GTX/RTX card to pass through? Last time I tried this with ESXi, it was insanely difficult and poorly documented to get non-Quadro cards to do pass thru (admittedly on a Windows guest).
- my123 3y agoNVIDIA changed this in 2021: https://nvidia.custhelp.com/app/answers/detail/a_id/5173/~/geforce-gpu-passthrough-for-windows-virtual-machine-%28beta%29 https://nvidia.custhelp.com/app/answers/detail/a_id/5173/~/g...
- ComputerGuru 3y agoThanks; that was after I tried to make things work and gave up.
- diffeomorphism 3y agoDo you mean windows using virtio? Then the answer would be red hat and since many years ago: https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers
- tbenst 3y agoDoes anyone know the state of running Windows / Linux x86-64 virtualization on Apple Silicon? This article is super interesting but dances around the most important application for VMs on Mac.
- vbezhenar 3y agoVery slow using qemu. You can run arm64 Linux and run x86_x64 apps inside using Rosetta, if your virtual machine uses Virtualization.Framework (does not work with qemu, AFAIK). I suppose you can do the same with arm64 Windows and Microsoft x86_64 translation technology, but not really sure.
- rincebrain 3y agoYou can use qemu -accel hvf.
- deergomoo 3y agoYou can use Rosetta to run x86 Linux binaries with good performance under a virtualised ARM Linux [0], but if you want to run fully x86 Windows or Linux you’ll need to emulate, not virtualise. It’s possible, but there’s a big performance hit as you might expect. [0] https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta https://developer.apple.com/documentation/virtualization/run...
- kamilner 3y agoI'm not sure how OrbStack does it, but it can run a fully x64 Linux using Rosetta with quite good performance.
- AkshitGarg 3y agoIIRC that runs a x86_64 userland (using Rosetta) on a arm64 kernel.
- 3y ago
- cactusplant7374 3y agoIs it possible to virtualize 32 bit?
- zamadatix 3y agoVirtualize no, there is no hardware support for 32 bit ARM on Apple Silicon. You can emulate it (32 bit ARM or x86) just fine though. Emulating the whole OS will be relatively slow compared to emulating just a userspace binary.
- sergiomattei 3y agoGreat post. This is a massive change: now we get macOS VMs with full graphics performance and QE/CI. This was impossible on Intel machines without PCI passthrough of a compatible GPU (on a Hackintosh).
- nsteel 3y agoCould the title of this piece also be "Why are arm VMs so different?" or is this actually specific to Apple's chips? Wouldn't anyone transitioning between two architectures while maintaining compatibility be in the exact same situation? I'm just curious what's special in this case (if anything).
- neilalexander 3y agoThe post is more about VirtIO than it is about the processor architecture. VirtIO is not ARM-specific.
- IMcD23 3y agoIt’s not Apple Silicon specific either. I don’t understand the title. Maybe it should have been “Apple’s virtualization API and VirtIO driver support on Apple Silucon”
- deleted 3y ago[deleted]
- JohnBooty 3y agoTechnically, no. Effectively, sort of. When they transitioned to Apple Silicon they simultaneously transitioned to Virtio.
- bonzini 3y agoIndeed, Virtualization.framework already supported virtio in guests before, but that's when they added host drivers. By the way this: > In the Virtio model, providing such support is the task of the operating system, not the virtualiser. is wrong. Virtualization.framework is a standard implementation of a virtualiser that is shipped with macOS, and while it includes virtio, it does not have to be part of the OS; the same task can be done by anyone (for example QEMU). The low-level, OS-dependent part of virtualization support is called Hypervisor.framework and it does not have any knowledge of virtio.
- deleted 3y ago
- mschuster91 3y ago> Running older versions of macOS in a VM enables users to run Intel-only apps long after Rosetta 2 support is dropped from the current macOS Now if they'd offer that for x86 Windows guests... I mean, games are the obvious thing but I guess the architectural differences between Apple's PowerVR-family GPU and NV/AMD are just too large, but there's a ton of software that only has Windows binaries available and which I still need either an Intel macOS device or an outright Windows device to run. Yes I know UTM exists but it's unusably slow and the Windows virtio drivers it ships are outright broken.
- mort96 3y agoEven if you could get Windows working, what good would ARM Windows do? Honestly, running virtualized x86_64 Steam (using something like FEX) under Asahi Linux and using Proton seems like the most fruitful way to play Windows games on Apple Silicon hardware (at least once the GPU drivers mature).
- nxobject 3y agoThere’s one obscure use case that won’t work, sadly - people who have to use proprietary binary only drivers! I’ve been through hell trying to get Oculus Link to work.
- mschuster91 3y agoI meant x86 Windows of course. No other way to flash Samsung or Mediatek phones, for example - the tools are all proprietary and only run on Windows.
- zamadatix 3y agoARM Windows probably already does better than future Asahi+Proton+FEX in that it includes a Rosetta2/FEX like layer of it's own, is otherwise the native Windows without needing to fake that interface, and e.g. Parallels already has DX11 working through Metal without the need for a future version of Asahi drivers combined with the layer in Proton. The downside to either approach is anticheats. Games without them can run great today, games with them can't run at all because they are kernel level x86 code and emulating the kernel architecture is too slow for games. It looks like Windows is doing another ARM push with higher end chips and less vendor exclusivity this time around - maybe that'll finally get enough market penetration to make this less of an issue going forward, at which point virtualized ARM Windows could be nearly fully viable.
- andix 3y agoDoesn't Windows do it more or less the same? A lot of Windows features depend on Hyper-V, once enabled Windows is not booted directly any more, Hyper-V is started and the main Windows system runs in a privileged VM. All other VMs need to utilize the Hyper-V hypervisor, because nested virtualization is not that well supported. So even VMware then is just a front-end for Hyper-V.
- neilalexander 3y agoYou are right that Windows itself runs under Hyper-V as a guest when virtualisation-based security is enabled and it even has paravirtual devices that are not massively different to VirtIO. I think your statement about VMware Workstation is right as of today too with recent versions, although for a long time older versions would simply refuse to start if it detected that Hyper-V was enabled, presumably because it made assumptions about the host virtualisation support.
- andix 3y agoIt's not just security features that need Hyper-V. Also WSL (Linux on Windows) or the Android Subsystem (run any side loaded app or anything from the Amazon App Store) need Hyper-V. Both of them are super useful for me, more and more things are iOS/Android App based only. Linux should speak for itself.
- ComputerGuru 3y agoOnly WSLv2 needs (or uses) Hyper-V.
- andix 3y agoBut WSL1 is de-facto dead, although it is still supported.
- ComputerGuru 3y agoIt still makes more sense than v2 for certain patterns.
- transpute 3y agoApple Silicon M2+ has hardware support for nested virtualization. It's rumored [1] that 2024 iPad Pro will see price hikes of $500-$700 to cover the OLED screen and increases in base memory/storage. If a new iPad Magic Keyboard gains [2] an aluminum shell that looks like a Macbook, that could put iPad Pro into the price tier of Macbook Pros. If 2024 iPad Pro + Magic Keyboard costs > Macbook Air + Mac Mini, that may allow Apple to untie iPad Pro M3 nested virt for iOS, macOS and Linux VMs. [1] https://www.tomsguide.com/news/ipad-pro-2024 https://www.tomsguide.com/news/ipad-pro-2024 [2] https://www.theverge.com/2023/9/3/23857409/ipad-aluminum-magic-keyboard-apple-ipad-pro https://www.theverge.com/2023/9/3/23857409/ipad-aluminum-mag...
- raccoonDivider 3y agoI don't understand why they're trying to turn iPads into laptops. Just start from their existing laptops and make them more mobile instead of trying to inflate a phone OS into something that does the job? Is this about control over the apps people can run?
- transpute 3y agoPerhaps they are turning laptops into iPads. The price/performance of Apple Silicon laptops was a descendant of early iPad Pro SoCs, with current iPad Pros on M2. A couple of years ago, MacOS on Apple Silicon gained the ability to run iOS apps, either via the Mac appstore or by copying .ipa files.
- neilalexander 3y agoIn many ways, an iPad with a keyboard is probably the perfect home computer for people who don't really care about computers and just have simple requirements. The apps that people generally expect to find are there and a keyboard just makes it that bit more comfortable to sit and bash out an email or letter.
- chongli 3y agoYeah not to mention it’s way easier to use than macOS. Macs used to be so easy to use on Classic Mac OS. Mac OS X really left a lot of people behind on the usability front. It became much more of a power user OS. Then iPads came along and stole that group (of ordinary users) away. But now it seems they’re adding more and more power user features to iOS, complicating things again (with even less discoverability due to complex gestures). History seems to be repeating itself.
- blikdak 3y agoAI generated nonsense, transition from intel to arm architecture has nothing to do with virtio.
- Klonoar 3y ago...you actually think a notable Apple-centric blog is AI-generated nonsense? Am I reading this right?
- bonzini 3y agoIt does have a lot of confusing or downright wrong content. Saying that it's hallucinations is in some sense a compliment to the author...
- AshamedCaptain 3y agoThe article is literally contentless. It doesn't answer its own question. I don't know if its AI generated or a marketing fluff piece. Virtio is nothing but an interface/protocol and won't magically make your VMs any different -- in fact it was already commonly used in x86 VMs.
- WanderPanda 3y agoMy great confusion is why docker —-platform linux/amd64 is so much faster (almost native performance) than x86 UTM VMs. Can docker somehow leverage Rosetta?
- koenigdavidmj 3y agoDocker runs an ARM kernel and uses qemu in user mode on the individual binary level. Anything CPU-bound is emulated, but as soon as you do a system call, you’re back in native land, so I/O bound stuff should run decently.
- jbverschoor 3y agoDitch Docket.. Orbstack is fast..
- steeve 3y agoIt does yes, Apple provides Rosetta for Linux: https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta https://developer.apple.com/documentation/virtualization/run...
- cpuguy83 3y agoYes, Docker can leverage Rosetta. I haven't used Docker Desktop in a bit (b/c I end up doing my work in a VM on Azure since I work on Azure), but not too long ago there was an option to enable it in the settings panel, not sure if it's default or not these days. Any Linux VM can use Rosetta[1] you just need to enable it when booting the vm. This creates a shared directory in the vm that you need to mount and then register Rosetta with binfmt_misc (same way Docker uses qemu). [1] https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta https://developer.apple.com/documentation/virtualization/run...
- MBCook 3y agoI remember seeing it was out of beta in the release notes of Docker Desktop not too long ago.
- 3y ago
- eptcyka 3y agoDaily reminders that apple only allows 2 concurrent virtualised instances of macOS to run on their hardware.
- deleted 3y ago[deleted]
- arianvanp 3y agoIs that a technical or a contractual limitation? edit: I fucked around and found out: The number of virtual machines exceeds the limit. The maximum supported number of active virtual machines has been reached.
- ComputerGuru 3y agoUse a better hypervisor like ESXi (but I don’t think a different hyoervisor is available for Apple silicon).
- naikrovek 3y agoWorkarounds or not, the MacOS license agreement only allows two concurrent MacOS VMs on a single physical machine. I’m sure you could patch qemu to use Hypervisor.Framework as a virtualization backend and then you could run more than two, but you’d still be violating their license agreement. Apple are very weird about MacOS virtual machines.
- caycep 3y agoDo all commercial desktop VMs - VMWare fusion/parallels/UTM/Vimy now use this virtio model? in theory win arm64 should run roughtly the same for all?
- naikrovek 3y agoIf they are using Virtualization.Framework they are all going to have the same performance. Apple made it very easy to create and use VMs with this framework, so I would expect most tools to use it.
- janandonly 3y agoOwh waawh. I see this article mentions drivers written by Rusty Russell, who I encourage everyone to follow on twitter (he is @rusty_twit) for his deep insights into software development.
- svdr 3y agoI wanted to use a MacOS VM with Parallels for development. It is very easy to install and runs fast, but it's impossible to sign in with an Apple ID, which severely limits its use.
- chaxor 3y agoMan is this the case. I have been trying to figure out how to have a single command to make a Qemu VM on an M2 Apple silicon chip for like a year without much luck. All I want is to run something like Alpine Linux + Sway WM on Qemu while on macOS or AsahiLinux with one command on cli. On x86-64 its fairly simple :(
- hinkley 3y agoI think this is basically what Colima is doing, if you’re willing to run docker containers to get it
- chaxor 3y agoIt would be silly to install Colima for this though. If the argument is that Colima --calls--> Lima --calls--> {a ton of different things including kubernetes and docker and ...} --calls--> a QEMU command somewhere deep in the code, then the only thing that is required here is QEMU. Not kubernetes or any other junk on top that just adds complexity and potential insecurity. One QEMU command should be all that's required.
- r-bar 3y agoLima (1) is a project that packages Linux distros for MacOS and executes them via qemu in the backend. Maybe you could solve your problem by launching one of their vms and inspecting the command line it generates. You might find an option you were missing. (1) https://github.com/lima-vm/lima https://github.com/lima-vm/lima
- chaxor 3y agoI'll check this out. There are many different systems out there like UTM and such, but I want the most basic / minimal amount of dependencies, which will work basically anywhere - which is just QEMU. Not UTM, or maybe parallels, sometimes Lima, for Mac and then virtualbox for windows, and QEMU Linux type of nonsense. Just QEMU should suffice everywhere, and it's much more secure that way.
- iuiu2u2u2 3y ago[flagged]
- iuiu2u2u2 3y ago[flagged]
- Erratic6576 3y agoI wish every OS user logged in their isolated VM of the OS. This way, Adobe could install all their bloatware and take control of their user and I could keep ownership of my Apple’s computer
- curt15 3y agoIsn't that roughly what Qubes OS provides?
- fulafel 3y agoDoes it support macOS VMs?
- deusum 3y agoQubes does allow creating a VM for just about any program or service. But, in my experience, it suffers from latency. So, while fine for web browsing, it wasn't too keen on playing videos. YMMV of course, but Adobe products are already hogs without the emu layer.
- rustcleaner 3y agoI daily drive Qubes and will never go back to a normie system again if I can help it!!
- jdewerd 3y agoWhat's sad is that processes are already virtual machines, they just need to have a better permissions system. What's really sad is that for the most part those better permissions systems have been built (namespaces/cgroups on linux, gatekeeper on Mac OS) but nobody figured out how to expose that to end users before the business people figured out that there were trillions of dollars available if you charged rent to centrally manage it. We were so close. Sigh.
- lox 3y agoIs this not essentially what docker did with cgroups? It’s incredibly tricky securing containers, I’m not at all confident process only sandboxes would be adequate.
- effnorwood 3y ago[dead]
- justinclift 3y agoOne major point which this article failed to mention, is that macOS only lets you run two VMs at the same time. So if you were thinking of getting a mac mini to use as a build server, just buy the absolutely cheapest model. Unlike on Linux systems, you're not allowed to have enough VMs to actually fully utilise the hardware. So buying headroom (resource wise) is a complete waste.
- stephenr 3y agoTwo macos VMs. It you want dozens of Linux VMs for each distro/release and eg the two most recent macOS releases, you're fine.
- justinclift 3y agoThanks, didn't know that. Sounds like we could potentially get some Windows ARM64 builds happening as well then. Might be a project for a future weekend. :)