Yes, you can have multiple instances on a single VM.
Key things to do.
Always have separate folders for each instance.
Do not put all files in F:\SQLDATA as the first install will put it's own permissions on that folder and the second install will redo permissions. So have something like this:
- Separate Drives for each instance
- Or Separate Folders on the same drive so SQLDATA01 and SQLDATA02 and LOG01 and LOG02 or something like that to keep permissions isolated.
For management of the data and logs, etc. I would recommend using separate Drives as to not have one instance run the drive out of space and the other instance die because of it.
Set Max Server Memory to be something that the instances share, so you may want to split the RAM as necessary so if you have 32 GB of RAM, may be you give 16 GB to one and 10 to the other, but do NOT starve the OS as this will impact your memory for connections and you will run out of connection memory having 2 instances on the server.
Are there any other questions?