Installing Enterprise Edition in a virtual machine
Is it possible? Yes.

Is it legal to use in production? No.

What should I do instead?


If it's for production, and your databases are 10GB or less, check out Express Edition. It's free, and has core and memory limitations, but the price is right.
If it's for production, and you absolutely need to run your own VM, you'll need to buy a production license (like Standard or Enterprise.)
If it's for production, and you don't need to run your own VM, you can rent VMs from Amazon EC2, Google Compute Engine, or Microsoft Azure with the SQL Server licensing included. That way you can pay by the hour and change your licensing based on your needs for that particular day.
If it's for development, consider SQL Server Developer Edition. It's free, and it's available as a download, or as a Docker container.


That'll hopefully help keep the licensing mafia off your back. My friends tell me I shouldn't talk about them anymore, though, because they're probably listening right now. (You might ask, am I referring to the licensing mafia listening, or my friends? Both. They're gunning for me.)