This happens mostly because of Network. Office network usually preferred VPN. You need to change Network adapter settings everytime. You can add multiple network adapter in the VM settings.
Connect one Adapter as NAT and another as Bridge Adapter. In your "ifconfig", you will find 2 IP's which you can use to connect.
Hope this helps.