Licensing aside, it's just a computer OS at the end of the day. If you can get the right hardware virtualized there should be no issues. There are premade images that make it really easy to run macOS in a VM without having to go in and change a bunch of configs