VMWare Fusion cheat sheet
1 VMWare Fusion Network Setup
There are three options to choose from when setting up your network connection
of your virtualized hosts.
Bridged
Host Only
NAT
These three types are labelled the same way for VMWare Workstation as well as VMWare Fusion.
1.1 Bridged (vmnet0)
This mode replicates another node on the physical network, and each VM
will
receive its own IP address
from a DHCP lease
from the meraki MX
appliance,
or other DHCP server
.
In my case it appears that NAT is happening also, as my vm2 is using
192.168.111.x with GW 192.168.111.1 That is not true. My network 111.x
network is a virtual network that my CentOS8 host created using VMM.
The actual C8host has an interface on vmnet0 that is the 192.168.128.x
network. My mbp
is 192.168.128.70
, and my CentOS8
guest is 192.168.128.76
My host is using 192.168.128.76 and is able to ping my mbp on 192.168.128.70 (correcty generated arp table ) - ip neigh adn or arp -a AND my mbp has the same GW, 192.168.120.1 with the SAME mac addr for .1 as does my c8host.
That is expected behaviour as our VM will be in the same network
as your
host
, if your host IP is 172.16.120.45 then your VM will be like
172.16.120.50. It can be accessed by all computers in your host network.
1.1.1 In Fusion 3.x and later
It uses the vmnet-bridge
and vmnet-netifup
service
1.2 Host Only (vmnet1)
The VM will be assigned one IP
but it is only accessible
by the host
the VM is
running on, and no other outside hosts. hence the name "Host only", meaning
on the VM host, and on other.
Host-only networking creates a network that is completely contained within the host computer. Host-only networking provides a network connection between the virtual machine and the host system by using a virtual network adapter that is visible on the host operating system.
1.3 NAT (vmnet8)
The network interface on the mbp is used for all traffic outside, but it
NATs traffic to different ip addresses inside. No vm <-> vm guest traffic
There can be only one NAT network,
which makes sense because either you can
allow guest VMs to talk to the world using NAT or you cannot.
1.4 Internet Sharing (depracated on Fusion)
The network settings on the Macbook Pro are shared with the VM hosts running on Fusion. This is no longer an option in Fusion 11
1.5 Table of connectivity
Mode | VM -> Host | VM <- Host | VM1 <-> VM2 | VM -> LAN | VM <- LAN |
---|---|---|---|---|---|
Host | |||||
Only | Yes | Yes | Yes | no | no |
Internal | No | No | Yes | No | No |
Bridged | Yes | Yes | Yes | Yes | Yes |
NAT | Yes | port | No | Yes | port |
forward | forwared | ||||
NatService | port | port | |||
Yes | forward | Yes | Yes | forward |
1.6 Shared directory/folder between the vm and your mbp
Under the fusion gui, setup the VM settings, click the "Sharing" folder icon.
1.7 Home
2 VMWare Fusion Host Guest File Sharing, (vmhgfs)
You can mount a fusion share, i.e. a folder that you have configured on the
fusion vm settings, under Sharing
using the vmhgfs-fuse
command on the C8host.
/usr/bin/vmhgfs-fuse .host:/ /var/osx-share -o subtype=vmhgfs-fuse,allow_other
Create an alias "share" for this i.e.
alias share='sudo /usr/bin/vmhgfs-fuse .host:/ /var/osx-share \ -o subtype=vmhgfs-fuse,allow_other'
This will mount the directory .host:/
which is what the VMware fusion GUI
has
allocated for this VM as a shared folder
. (My Fusion GUI was assigned the
directory "fusion-share-folder"
on my external 250GB Sandisk SSD drive)
i.e. /Volumes/ZP-250GB/Virtual Machines/fusion-share-folder
Anyway that is the folder that is designated .host:/
Then my CentOS guest VM
sees that folder as /var/osx-share
.
So recapping;
sudo /usr/bin/vmhgfs-fuse .host:/ /var/osx-share -o subtype=vmhgfs-fuse,allow_other cd /var/osx-share/fusion-share-folder
On my macbook pro the fusion share folder is on my exteranl 250GB drive:
ZP-250GB/Virtual\ Machines/fusion-share-folder