Think about how you might do that for a physical machine, and do the same to the VM guest - something like a firewall in the OS, or don’t give it a default gateway so it cannot route to a different IP network.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog