Niya is right, but there are basically two ways:
what Niya said (same network), which in VirtualBox is called a LAN-Bridge,
or with a NAT-Connection.
It was with the second that i could remap a different port

i‘d look for those two in vmware