Not everything will work.
Once upon time I tried to make CTF with M2 Pro, and I seriously wished that I had x86_64 Linux instead.
Many of the penetration testing tools are not mainstream and they include pre-build x86_64 binaries, or are configured just to not compile with ARM, for reason unknown.
And there is no time to figure out what is wrong.
I know this might be a niche scenario, but still...
That seems like a wonderful opportunity to use QEMU since it's not all that performance-sensitive (I think?) and you're not running random pre-built binaries directly on your computer.
I ran all my stuff inside non-root non-volume container so prebuilt binary it is not really a problem.
I used QEMU through Podman machine in the end, but the performance is terrible. Even on MacOS side QEMU does not support Rosetta 2.
Docker for Desktop supports and gives significant boost, but I don’t want to use it.
This stuff makes me super nervous. I've just gotten an M1 MacBook Pro at work because my old touchbar Mac was showing signs of impending battery death (and I only got that because IT didn't want to support Linux and I didn't want Windows). I've already had a few battles with some python libraries and today I've found that the Oracle container image doesn't run.
I love the battery life and the keyboard is much better than the old one. It feels snappy running native code but I just know it's going to cause me more issues than it's worth.
It will cause issues, yes. But personally I’d rather spend two hundred hours fiddling with arm64 issues that going back. The performance and silence is wonderful.
Did you try Lima on Mac? I never did compare apples to apples, ran an x86 Podman VM and then switched to an arm64 Lima VM and had drastically improved performance.
>Is Rosetta 2 that much faster than QEMU's own translation
Oh yes. Based on the benchmarks I've seen it's a good 30-40% faster on compute workloads. I assume that the pre-transpilation of the binaries is advantageous relative to having to virtualize the CPU.
QEMU makes translation in Just-in-Time. Rosetta ”pre-builds” binaries to match different architecture, and binaries eventually run ”natively”, with the cost of delayed start.
It's not obvious that QEMU's JIT has to be a lot slower, but it is. It may be that Rosetta 2 is just more thoroughly engineered and tuned for Apple Silicon.
Among other things, Rosetta 2 is able to use the CPU's special TSO memory ordering mode, which I think QEMU's TCG cannot use so has to use barrier instructions instead (MTTCG), or run all the virtualised CPU threads on a single host core (obviously slower for parallel workloads).
Many of the penetration testing tools are not mainstream and they include pre-build x86_64 binaries, or are configured just to not compile with ARM, for reason unknown. And there is no time to figure out what is wrong.
I know this might be a niche scenario, but still...