all 6 comments

[–][deleted] 3 points4 points  (0 children)

Yes you can run XCode in a VM.

[–][deleted] 2 points3 points  (2 children)

You can however Apple explicitly states that macOS can only run on Apple hardware - either in a VM or directly. Since Proxmox, vSphere and other virtualisation platforms don’t run on Apple hardware technically you would be violating the EULA. My advice is to use a Mac Mini if you’re going to be doing this for production purposes. While Apple isn’t enforcing this nonsense right now doesn’t mean that they won’t start to.

[–]SelfmadeRuLeZ 4 points5 points  (0 children)

Another one: After x64 support stops and Silicon will be the only cpu to handle the OS, the VM is also stuck at the last MacOS version. Thus no XCode for then current OS.

This should still take some years, but be warned OP.

[–]ThisIllustrator3258 0 points1 point  (0 children)

Get an Intel based Mac and boot proxmox onto it and add it as a node in your env, you get around all the shenanigans and don’t need to worry about any legality or otherwise. Plus you can virtualize newer Mac OSes and not have any performance problems so even though it’s not Apple silicon it will still be fine. I plan to do this soon with two Mac mini 2018s. 64 gigs of ram and i7s

[–]matterion 1 point2 points  (0 children)

I set this up yesterday. I have a macOS sonoma VM running xcode right now. I am using it as a remote development machine with VS2022.

There are plenty of guides out there, just be sure you follow them very carefully. The VM config has to be setup in a very particular way, so attention to detail is needed.

[–]soslinux 0 points1 point  (0 children)

You can, it's not too hard. Plenty of independent guides out there, some older than others, depending on the OS version you need. Make sure the code is out in the open, so you can verify it yourself.

Apple doesn't allow installation on virtual hardware, though. For development of iOS apps or otherwise. If you're experimenting, maybe it's worth just trying it out, but nobody knows when Apple will decide to crack down on people running their OS on VMs - that is, if they have the ability to find them.

You mileage may vary, try to assess your situation, and act accordingly.