There are macOS VMs available VMware Workstation, but they don't support graphics acceleration, making them pretty much unusable for more than very basic tasks. I highly recommend dual-booting macOS (this is fairly easy to accomplish), or, if you're on a Linux box, run it in KVM and use graphics passthrough with a supported graphics card.
VMWare Fusion can install MacOS images with a few tweaks. I don't know about virtualbox though.
Isn't VMWare Fusion a Mac app anyways?
Yes, and the only legal way to run macOS in a VM is when you run it on Mac hardware running macOS.
Yes it's not legal, same as Hackintosh.
What makes you think so? You're only allowed to run macOS on Mac hardware. You're doing that if you run it in a VM.
Argh, brain fart right there. Yes it should be the VMWare Workstation not Fusion.