3 ms·
I added some clarification. There is no VirtualBox on ARM platform. So you can't virtualise ARM on ARM with VirtualBox, because they don't make ARM compatible r
by oneplane 4y ago
I added some clarification. There is no VirtualBox on ARM platform. So you can't virtualise ARM on ARM with VirtualBox, because they don't make ARM compatible releases.
But both VMWare and Parallels for example have made ARM on ARM virtualisation releases of their existing x86 on x86 products.
So if you need something like a sandbox or IR workstation, you can have plenty of virtual environments, just not with VirtualBox as supporting software and type 2 hypervisor.
- Maursault 4y ago> But both VMWare and Parallels for example have made ARM on ARM virtualisation releases of their existing x86 on x86 products. Right, but the VMs themselves are not cross platform. ARM Linux won't work in Intel VMWare, and x86 Linux won't work in ARM VMWare. I am sure you knew, or course, but as you pointed out there is confusion below about VirtualBox working on Apple Silicon.
- chrisseaton 4y ago> ARM Linux won't work in Intel VMWare Newsflash: program for one processor's instruction set won't work on another processor.
- coldtea 4y agoIf only it was that clear cut. As you well know, with Rosetta and other technologies (heck, also Wine) that's just not true. With Rosetta you can take any (or most) Mac programs compiled for x86 and just run them on M1 ARM. Support gets even deeper, as with the Rosetta update you will be able to even run x86 binaries inside a hosted ARM virtual machine (!). So it makes sense for people to be confused as to what's actually supported, and to add the clarification when this is not the case, because some might also expect this could be the case with say Virtualbox.
- chrisseaton 4y ago> Well, with Rossetta and other technologies (heck, also Wine) that's just not true. Rosetta takes an instruction stream from another processor and translates it to an instruction stream for another processor - that's exactly what I mean - it needs translation.
- coldtea 4y agoSure, and I know you know it. But it's exactly the availability of said translation that makes the claim "program for one processor's instruction set won't work on another processor" less clear cut than the "news flash" sarcasm implies. Doubly so since this translation is often automagical and transparent to the one using it (so they expect it to just work in all cases).
- deleted 4y ago[deleted]
- oneplane 4y agoThat is correct. But lets leave the VMs for now. The hypervisors is where the problem is at, if a hypervisor has no release for a specific platform, you cannot use it, period. That is the problem with VirtualBox. There is no VirtualBox for ARM. Only VirtualBox for x86. If you have an ARM host, and you wish you run an ARM guest, you cannot do that with VirtualBox. Because there is no VirtualBox for ARM.
- chrisseaton 4y agoDoesn't AArch64 support the same virtualisation primitives that VirtualBox uses on AMD64?
- oneplane 4y agoYes and no. Similar in functionality, different in implementation. So you do get things like IOMMU etc. but you need a different software implementation to make use of it, even if only to use the different ISA and setup procedures. Imagine it like this: ┌─────────────────────────────────────┐ │higher-level software to abstract it │ ├────────────────────────────▲────────┤ ├───▼─────────────────────────────────┤ │low-level software to make use of it │ ├────────────────────────────▲────────┤ ├───▼─────────────────────────────────┤ │hardware with virtualisation support │ └─────────────────────────────────────┘ Even within the same architecture you might need different low-level interfacing software to make use of it. Even a type-1 hypervisor like Xen would need to know a bit about the specifics of the hardware to know what features exist and how to use them. Then you get some higher level abstractions that allow you to use a virtualisation interface to make use of the system without having to re-invent that interface every time some new hardware gets released. So if you have libvirt, you have a high-level abstraction for multiple hypervisors (like KVM and Xen) which in turn know how to interact with various hardware implementations to actually have it act the way we want it. On macOS there were essentially two low-level implementations, one for ARM and one for Intel, and a higher-level abstraction, Hypervisor.framework, that lets you simply "create" virtual machine instances, which then make use of the various virtualisation features depending on the underlying hardware. In the early days, the implementations between AMD and Intel were so different that you often needed specific builds for one or the other implementations, and you couldn't have both loaded at the same time (even if just 1 active and every other implementation inactive).
- saagarjha 4y agoHypervisor has a core API that is shared across Intel and Apple silicon (e.g. hv_vcpu_run) and then each platform has its own additions on top of this (for example, on Intel platforms you can prod the VMCS). On top of this is the Virtualization framework, which provides a largely unified API to run VMs (dealing with things like screens, pointing devices, etc.) that and treating the actual virtualized processor as an implementation detail, besides you having to provide an image that matches the host architecture. The linked code here uses Virtualization.