Wednesday, October 03, 2018

VMware Fusion connect to guest from host only

In VMware (I use VMware Fusion), sometimes you just want to connect from host (MacOS in my base) to your guest OS.
It's kind of funny how few instructions you can find on how to do it.

First of all, it seems there is no specific "guest" hostname that VMware created your guest automatically.  Something like a "client" hostname Citrix provide its tenants.

Second, it was kind of surprisingly easy if you configure your guest to Host-only (or even NAT) model.  There would be relatively easy!!!

If your guest is configured to connect to Host-only network, then you should be able to access it at 192.168.133.128 - 192.168.133.254 range, depending on the sequence of your VM starts (i.e. your first VM started with Host-only network would have IP address 192.168.133.128)

Your guest OS will be relatively safe in this case, because there would be no route to the outside world, as long as your host is free of malware, etc.

Similarly, your host can also connect to your guest that is configured as NAT.  The address of that would be in the 172.16.210.128 - 172.16.210.254 range, again depending on the sequence the guests started.

Here, you might have a little bit risk as the NAT means your guest would be able to see outside world, and you might also get exposed somewhat.

BUT, you may ask, "I want to use Bridge model" for my guest OS, how can I access my guest from my host network?

Well, it turns out easier than most post I can find online (you will need to shutdown your VM for the following):
You just need to create a new network adaptor for your VM, add a new device, "Network Adapter" in the settings for this VM, it will then add "Network Adapter 2" into your VM settings.  Open this new one from your settings page, and check the "Connect Network Adapter" (it should be checked by default actually), and select "Private to my Mac" in the "This network adapter is configured to use:" list.
Start your VM guest, and you should see your guest has 2 network NIC now, and the second one is a host-only connection.  And now you can access your guest network from host using 192.168.133.128 address.

(Above was tested on VMware Fusion 10, it should work on other versions of VMware Fusion, and other VMware host should have similar settings as well, but I can't guarantee that).