News for hackers. Stuff that matters.
Re:M1 dev setup with a virtual Linux box by Toutouxc on Sunday April 11, 2021 @10:10AM (#26770478)
Everyone is talking about running a separate Linux dev environment, but I'd actually love to run a separate macOS dev environment in a clean way (i.e. without messing with partitions for dualboot, especially on the M1).

I get my stuff from Homebrew, just Rails + MySQL, no Docker, no fancy stuff. I'd love to have a fast macOS VM to run software I don't trust like Zoom or Skype and a second one to run my work projects, so they don't spill over my personal stuff, but AFAIK the virtualization story is still pretty incomplete on the M1 (or is there a way to run an arm64 macOS VM without a gigantic performance hit?).

Re:M1 dev setup with a virtual Linux box by kitsunesoba on Sunday April 11, 2021 @10:54AM (#26770733)
If I recall, VMWare Fusion and Parallels can run macOS VMs with little or no speed hit, under Big Sur. Big Sur added GPU virtualization support so VMs aren’t slow, previous macOS versions lacked this.
Re:M1 dev setup with a virtual Linux box by AzN1337c0d3r on Sunday April 11, 2021 @11:08AM (#26770819)
IMO the graphics performance when running macOS Big Sur VMs under Fusion is better but still atrocious. Not anything like a native experience.

Not sure about Parallels.

Re:M1 dev setup with a virtual Linux box by Qerub on Sunday April 11, 2021 @04:57PM (#26773362)
3D acceleration is not enabled by default for macOS Big Sur in VMware Fusion because it's not considered stable yet. It's possible to activate by tweaking the vmx file: https://kb.vmware.com/s/article/81657

In Parallels it's on by default but you need to allocate a lot of RAM to the VM: https://kb.parallels.com/en/125105#section6

Re:M1 dev setup with a virtual Linux box by alsetmusic on Sunday April 11, 2021 @11:58AM (#26771242)
Just tested Parallels latest beta on M1 and it couldn’t find an OS on a Big Sur ISO that I’d just created. Doesn’t appear to support virtualizing macOS on M1 yet.
Re:M1 dev setup with a virtual Linux box by sscotth on Sunday April 11, 2021 @12:13PM (#26771371)
Re:M1 dev setup with a virtual Linux box by erwincoumans on Sunday April 11, 2021 @03:53PM (#26772901)
Parallels only supports arm images on M1, such as Ubuntu arm and Windows arm. No MacOS arm image as client.
Re:M1 dev setup with a virtual Linux box by erwincoumans on Sunday April 11, 2021 @12:07PM (#26771311)
Yes, Parallels runs great for Ubuntu arm on M1, both headless terminal and X11, since December 2020.
Re:M1 dev setup with a virtual Linux box by 0x426577617265 on Sunday April 11, 2021 @11:02AM (#26770776)
Fusion doesn’t work on M1s.
Re:M1 dev setup with a virtual Linux box by coopreme on Sunday April 11, 2021 @11:04AM (#26770789)
I’ve been looking for this for a while, not sure when or if it will get done. X86 emulation on an M1… I wonder if there will be a massive hit
Re:M1 dev setup with a virtual Linux box by aidos on Sunday April 11, 2021 @11:52AM (#26771191)
Been dealing with this this week. It’s about a 40x performance hit to run x86 via qemu in our estimates.
Re:M1 dev setup with a virtual Linux box by my123 on Sunday April 11, 2021 @12:22PM (#26771443)
Qemu isn’t representative of anything else perf-wise. You may want to use user-mode emulation too.
Re:M1 dev setup with a virtual Linux box by aidos on Sunday April 11, 2021 @01:33PM (#26771976)
I don’t entirely understand your comment (actively looking for solutions for these issues so all info is good).

My initial attempt at getting a running system was to install an x86 VM via qemu / utm. It worked but was about 1 /4 speed of my old MacBook.

Round 2 was to an arm64 VM via qemu / utm (utm is using qemu here, but I guess it’s almost running purely on the M1?). That’s blazing fast but I don’t have everything I need compiled for it. So I’m recompiling what I can and whatever I can’t I’m then using qemu user mode within the arm VM to run the x86 binaries. The VM itself is really fast, the x86 code, obviously isn’t, but I’ve at least minimised the times I need the emulation.

Not sure of a better approach, but as I say, definitely open to hearing what else I can do.

Re:M1 dev setup with a virtual Linux box by my123 on Sunday April 11, 2021 @01:54PM (#26772123)
You should try running an Arm64 OS and then using ExaGear (Linux VM) or just run your x86_64 app (Windows).

Forget about full system emulation, especially with Qemu’s approach which doesn’t leverage the host MMU. Emulating an MMU alone is very costly perf-wise. That means that you should use an arm64 OS and then use an x86 compat layer on it.

For Qemu’s user mode emulation, it doesn’t exactly provide good performance either. But it is still much better than full system emulation.

Re:M1 dev setup with a virtual Linux box by aidos on Sunday April 11, 2021 @02:59PM (#26772558)
Isn’t that what I’m doing?

Mac OS is arm64, with an arm64 Ubuntu VM, then I’m running qemu in that for specific single x86 processes.

To clarify, I’m using UTM to run the VM, so it’s using qemu - but it looks like that doesn’t give you a performance cost in itself.

Re:M1 dev setup with a virtual Linux box by my123 on Sunday April 11, 2021 @03:05PM (#26772600)
Yes that’s what you do, you might want to look at options other than Qemu though for more performance.

(I assumed FSE from your 40x worse perf figure, which is a very bad case)

Re:M1 dev setup with a virtual Linux box by kitsunesoba on Sunday April 11, 2021 @11:09AM (#26770824)
Ahh, so it’s just Parallels then. Don’t yet own an M1 Mac myself, but saw Parallels had made the jump an assumed VMWare followed.
Re:M1 dev setup with a virtual Linux box by upbeat_general on Monday April 12, 2021 @03:08AM (#26776726)
It’s not smooth enough for me to consider regularly using for most work but you can setup macOS VMs from parallels/fusion inside of macOS since apple allows it on their hardware (...or a hackintosh).

It’s not as easy to get working compared to a windows vm because I believe it uses the OS recovery image but it’s not that hard to setup and works well. I’ve used it in the past to test my dotfiles setup on a perfectly clean install.

Re:M1 dev setup with a virtual Linux box by balloneij on Sunday April 11, 2021 @02:02PM (#26772171)
I still haven't tried it, but what if you downloaded the iOS apps on the M1? Wouldn't it be more containerized if you ran those apps from the phone "emulator"
Re:M1 dev setup with a virtual Linux box by philistine on Sunday April 11, 2021 @04:48PM (#26773280)
You're absolutely right, but I would assume Zoom has disallowed its iOS client from being installed on macOS. Since Apple closed the loophole allowing sideloading, we're out of luck on that front.
Re:M1 dev setup with a virtual Linux box by saagarjha on Sunday April 11, 2021 @06:17PM (#26773986)
Just decrypt the app and run it.
Re:M1 dev setup with a virtual Linux box by rovr138 on Monday April 12, 2021 @07:53AM (#26778337)
I use a separate account when I need to split something.
Re:M1 dev setup with a virtual Linux box by mixmastamyk on Sunday April 11, 2021 @04:30PM (#26773124)
Homebrew is sending analytics as well, FYI.
Re:M1 dev setup with a virtual Linux box by jamroom on Sunday April 11, 2021 @06:44PM (#26774190)
“brew analytics off” from your terminal.