back
79 comments
This is absolutely awesome and something I always wanted (I’m in a 8GB M1 though which I regret often not going to a 16GB). I just want to sandbox some of the applications I need to use but don’t trust on my computer (looking at you Bambu studios). I tried using the sandbox feature on macOS but it’s unusable for me on Ventura.
> I’m in a 8GB M1 though which I regret often not going to a 16GB

You can always upgr.. no, wait

with Chrome/Arc/Edge being what they are, being able to get 24GB was a game changer for me - it allowed me to go back to an Air, which is definitely my preferred form factor.

I never regret money spent on RAM....

> I never regret money spent on RAM....

That's kind of Apple's tiered upselling plan, isn't it? ;-/

But as an Apple user I concur completely. The awful experience of bloated apps (or multiple VMs) slowing your system to a crawl isn't worth the few hundred dollars you saved by opting for a lower memory SiP.

$400 to upgrade 8GB to 24GB is a significant jump and more than a "few hundred"
Anyone have recommendations for devs looking to run a dev environment on a Mac without installing a bunch of dev dependencies on the local machine?

My plan right now is to buy a 2nd mac and use VS Code remote development over ssh.

I've tried a few things:

- Docker, but the docker on mac experience has never been great (even if Colima or Orbstack makes that much better)

- A VM running on my mac where I install whatever I need. Tried debian, silverblue, and used the opportunity to properly learn Nix and use NixOS

- My current setup, especially for hairy projects with dependencies I dislike: an intel NUC running in my local network that I set up with NixOS which runs everything I need. Because I install Tailscale everywhere, I can use it even when working from outside my home.

Depends on what you are trying to solve. If you don't like the fragmentations of dependencies on your system, this won't go away on a second machine. Also, I'd point you to hosted VS Code environments such as GitHubs code spaces or Gitpod.

You may use something that encapsulates your dev dependencies. Some use containers like docker, others use Nix (can be run on MacOS ). As Nix has quite a steep learning curve, there are abstractions such as devenv or devbox, which I haven't used.

Microsoft's Dev Containers [0] is pretty slick, especially when used with GitHub Codespaces [1] if you want remote development.

[0] https://containers.dev [1] https://github.com/features/codespaces

Does nix or devbox [1] do what you want? Technically installing on the local machine, but not in any way that effects you unless you ask for it?

[1] https://www.jetpack.io/devbox

Current setup on my M1 for dev is to use docker with containers for mysql, localstack, rabbitmq, redis, and ruby (debian bullseye), all arm64 images, and then VS Code with the remote container extension. Was pretty rough going when the M1 first came out but is now flawless and lightning fast. Onboarding new devs takes an hour instead of a day.
VS Code remote so you don’t have to pay the cost of volume mount? Is performance that much better? I’m not a VS Code user, do you need things like the lsp server baked into your image to get intellisense to work?
Raspberry pi or other compact linux machine with code-server running in docker. Gets you a web UI that works from anything (ie iPad) and you can do docker-in-docker for other containers.

SBCs have less horsepower but you can always run them from a USB battery bank, letting you dev on the go.

+1 for VSCode Remote.

I've been coding for the past 2 years almost exclusively through VSCode remote on Linux servers with few complaints.

Get a seperate SFTP/network file client as the built-in VSCode one is slow and unstable but otherwise everything works great. If you're considering using any Jetbrains IDE over a network connection however, I'd encourage you to think again.

I would use a VM. You could also use Vagrant in that VM to make it easy to setup that environment again in another VM (or machine) later:

https://developer.hashicorp.com/vagrant/intro

Would UTM be an option?

https://mac.getutm.app/

Works great for me, I run an ARM64 Linux VM using the Apple native framework. macOS is configured to get out of the way, I only need Firefox, iterm2, and some custom shortcuts. I code and do pretty much everything on the VM. As a Linux user this has made the work-issued M1 Pro a great laptop, which I wasn't sure about.
I kind of like this option. Running the front end/client natively and the back end/server in a VM works great.

In the future Asahi or a native Ubuntu port might be a good option, but a VM is almost better in some ways since it's portable/migratable, has easy snapshots, has better isolation, etc.

Utm is just qemu, and qemu is actually open source. Utm hides an enormous amount of what they do (just saying not open source again in a different way), and that's definitely not what you want in a base system.

So it would likely be much better to simply install qemu instead.

UTM is open source (Apache2). You can also add any argument supported by the bundled version of QEMU using the GUI.

https://github.com/utmapp/UTM/blob/main/LICENSE

UTM uses qemu or Apple's own virtualization framework, which runs macOS.
UTM is open source.

Also, running UTM instead of Qemu has some benefits. e.g. bridged networking

Why not just have everything you need on your local machine?

(I'm not a Mac user)

So, Mac doesn't come with a package manager. There are things you can do with port and brew, to alleviate some pain.

Me personally, I fool around with a lot of languages, and sometimes I don't quite keep every project up to date with the latest version. For work, the situation is even more challenging, because I don't have the authority to go tell teams to upgrade or not upgrade, but sometimes I need to build their projects.

None of this is really Mac specific. I used to use virtual box for this, which worked pretty well. I could set up a baseline environment and snapshot new boxes with new language revs.

Docker can kind of cover this, but I tend to over do it, breaking things out into the one you build with, and the one you run with, and it's fine, but it's a lot to keep in my head. So, I'm kinda flakey about that.

Now, I'm slowly building up some proficiency with nix. I think this is what I really want, to swap out the whole chain of system dependencies, and build docker containers or vms out of that if I need them.

Perhaps I'm a poor sysadmin. _everything_ locally installed makes things real weird after a while (years).

> Perhaps I'm a poor sysadmin. _everything_ locally installed makes things real weird after a while (years).

Same experience here (years). Because it’s something that creeps up over time, the problems aren’t obvious overnight.

I am a Mac user and I’m curious to know too
Setup a remote server anywhere. Install ThinLinc. Done.
> ThinLinc is a software that enables organizations to implement a Linux server-based computing (SBC) infrastructure. - https://www.cendio.com/thinlinc/what-is-thinlinc/

Back to terminal server again.

Are you building apps for Mac/iOS? If not, I have a 12 core Ryzen with a 3090 that was the same price as a higher ram Mac mini ($1K). I recommend that over another Mac if you’re ok running *nix.
The OP is clearly asking about setting up a Mac dev environment, so suggesting that they buy a non-Mac machine is not helpful.
Not sure if PP was using a desktop or a laptop. MacBook Air isn't a gaming rig but it's a nice, quiet, power-efficient laptop.
VirtualBuddy is my favorite mac vm thanks to their file sharing folder

https://github.com/insidegui/VirtualBuddy

FTA, Vimy has "folder sharing enabled, with the Custom shared folder as the user’s Home folder".

So does big brother Viable:

https://eclecticlight.co/virtualisation-on-apple-silicon/

This looks very cool.

Since it is Eclectic Light, shipping it, I will bet it's great.

Is it possible to run asahi Linux inside this or any other hypervisor on macos?
It's designed to make future linux easier to run out of the box on Mac silicon, not really intended to be run as linux in a VM. If you want vms, use UTM https://mac.getutm.app/
Tart is also very cool. It's not F/OSS but it is source-available and its license is liberal about non-commercial and small-scale commercial use:

https://github.com/cirruslabs/tart

The very cool thing about Tart is how it uses OCI for OS images, so you can use your existing image registry infrastructure to host and pull down OS images.

Cilicon is a compatible F/OSS clone that currently only supports a subset of that functionality: https://github.com/traderepublic/Cilicon

These are more CI-oriented but I like how that makes it easy to manage state with them.

If you're focused on Linux VMs and maybe not on GUI stuff (although I'm sure you can make that work), Lima seems to be the go-to in the user 'community', as it were: https://github.com/lima-vm/lima

If you use ARM guests on Apple Silicon, you should get good perf just like with stuff in the OP. (Like UTM, Lima is based on QEMU.)

You mean qemu.

Utm is qemu, but they just removed the open source part. So it's just definitely worse.

Asahi linux made for apple hardware. For virtual hardware you can run almost any popular distro like Ubuntu, Fedora.
I'm aware, but considering this provides virtual apple hardware to run macos inside the vm, I'm curious if this can also be used to install/run asahi inside the vm.

My motivation here is exploring asahi on my MacBook inside a vm without needing to install it on the metal and modify partitions on the disk

I think you can still take advantage of paravirtualization without running an OS built for Apple Silicon specifically. You can emulate peripherals and the motherboard and stuff without emulating the CPU, so you would probably do better just to run the regular ARM variant of whatever distro.

Both Arch and Fedora, which some releases of Asahi are based on, have regular, shmegular ARM variants.

Has anybody managed to run a Mac Intel env within a Mac Arm?

I am working on that project that needs to be built and packaged for both Arm & Intel.

Can’t you just use Rosetta?
Well there's no easy way to make it work. I need to compile to Intel, not run Intel code. I would need to setup a whole toolchain + homebrew. No idea how to have all of that setup correctly.
Any example use-cases?
In theory running a different version of the OS for testing. Be aware MacOS VMs cannot use iCloud services though, so if your goal is CI/CD in the VM none of your tests for iCloud will work.
Be aware MacOS VMs cannot use iCloud services though

I believe it needs extra work but can be done. It's a relatively common question in the Hackintosh community and they've figured it out.

Annoys me more than it should: it’s something operated with the mouse, and was named Vimy? SMH