For casual app development I just run MacOS in a free VMWare instance on my Windows machine. It has no graphics acceleration but otherwise works flawlessly.
IIRC, macOS EULA expressly requires that the OS be run on Apple hardware. If it's run in emulation (which is permitted), the host must run on Apple hardware anyway.
Apple is not a software company, it's an electronic appliance company, like Samsung.
Of course, apple won't go after individuals who violate this provision. But is a cloud vendor or a CI vendor tried to pull that off, Apple would smash them.
If you don't agree to the EULA you don't have a license to use MacOS at all, which means you downloading it is (in many countries) a crime.
The question whether or not a EULA is enforcable is only relevant for products you bought which have software preinstalled - it is often argued under First Sale (and similar) that the EULA isn't applicable.
Anyone aware of any options for Hyper-V? Last time I tried this it was pretty impractical to have VMWare/VirtualBox co-exist with Hyper-V for things like Docker and WSL2, but maybe that has changed?
Newer versions of VMWare work under a Hyper-V host [1]. I'm not sure if macOS runs properly in that mode though. I also had some success a while back running macOS under WSL2 using KVM [2], though it was pretty buggy and a pain to set up.
This has been possible for a long time. For the install media, Apple hosts them and will give you the dmg file for free.
The only concern is the terms of the EULA so that's why the earlier poster says "for casual development"
There are a lot of guides online, including "one command" shell/powershell scripts that will automatically pull down the right files for you, and use the vmware/virtualbox api to create the vm automatically, and patch the bootloader to get Catalina or Big Sur loading, etc - if past experience is any indication, people probably already have Monterey beta loading fine already.
again, it's not a matter of "how" it's whether you (or Apple lawyers) care about the EULA.
in addition to what @barkingcat said, for vmware to be able to boot a macos virtual machine you'll need it to unlock it for that OS. Search for vmware unlocker is a free utility that depends on your vmware version, run it once and you're done.
It's very doable, it takes like 10 minutes if your internet is reasonably quick and if you're lucky you might even get GPU acceleration out of it. I used this to set mine up: https://github.com/foxlet/macOS-Simple-KVM
Apple is not a software company, it's an electronic appliance company, like Samsung.
Of course, apple won't go after individuals who violate this provision. But is a cloud vendor or a CI vendor tried to pull that off, Apple would smash them.