> Sometimes it takes 5 minutes to close
Thats not bad at all ...
The time required to shut down depends on the amount of RAM you assigned , the size of the virtual disks and the number of snapshots.
16 GB RAM is probably way more than you actually need - keep in mind that assigning too much RAM is contraproductive and will also have a bad influence on overall performance.
A typical shutdown of a linux VM on my machine takes about 9 seconds. 5 minutes is when I see the problem but it manages to resolve itself quickly. If I leave the VM running overnight, it will always take much longer to shutdown (i.e. 45 minutes). Also, during this shutdown time with the gray screen, I think the VM has done its thing and it is VMWare Workstation that is hung trying to close. I don't know for sure if this is the case though. Is there any way to get any debugging from Workstation?
AOSP builds require a minimum of 16 GB of RAM (see here: Requirements | Android Open Source Project ). I have hit out-of-memory errors when trying to build Nougat with only 14 GB of RAM. Also, in my experience, if the swap size is also less than 16 GB, it will cause issues as well.
I upgraded to version 15.1.0 and the problem is resolved.