I have two VMs running in Fusion Pro 7 on my mac.
They are networked via a custom private network.
The two VMs have no trouble communicating with each other.
The custom network settings are:
- allow VMs to connect to external network is OFF
- connect the host mac to this network is ON
- provide addresses via DHCP is ON
- subnet IP - 10.0.1.0
- subnet mask = 255.255.255.0
My problem is how can the host mac access the VMs?
There is no virtual network adapter on the mac, only the physical adapter(s).
Am I missing something?
I would expect the host mac to have a virtual NIC with an IP address from the 10.0.1.xxx range.
Or am I misunderstanding how the host and VMs connect on a private network?
I don't want the VMs to have internet access but I do want the host mac to have internet access.
Any suggestions are appreciated.
Is 10.0.1.0/255.255.255.0 the correct address/netmask for the network attached to your Thunderbolt Ethernet adapter? If so, you cannot use the same network range for vmnet2, because doing so would make it impossible for the host to determine whether packets should be routed out en4 or vmnet2.
Cheers,
--
Darius
So no one from VMWare can explain how the host connects to the guest VMs in a custom private network?
What is the meaning of the "Connect the host Mac to this network" setting?
So no one from VMWare can explain how the host connects to the guest VMs in a custom private network?
We don't always have the time to check this forum to find things to answer, it's not an official part of our jobs, but we try because we love our community and want to improve the product. Sometimes we're busy and can't get to everything, and this is why Support exists so that folks who need an answer right away can get it with a communicated SLA, etc.
As for the issue at hand,
My problem is how can the host mac access the VMs?
By going to the IP address of the VMs.
Custom (and other) networks work by creating a virtual NIC on the host.
See the output of my ifconfig below:
Notice vmnet2. Custom network, and there's the virtual NIC on the host.
So, the host should already have a route to hit the custom network's subnet, therefore if you get to the IP of a VM, it should just work (whatever protocol you're using shouldn't matter... http, ssh, etc.)
I don't want the VMs to have internet access but I do want the host mac to have internet access.
You should just use the host-only / 'Private to my Mac' network type then, as it doesn't expose a gateway by default.
Mikero,
Thank you for taking the time to reply to my questions.
I understand everything you have said -- but I'm missing one part.
How do I create the virtual NIC on the host Mac?
Is there a how-to describing the steps to do that?
Thanks again for your help -- much appreciated.
It gets created automatically when you add a new network.
This is done by clicking the '+' for a custom network.
The host vNIC already exists for the default networks (NAT and Host Only)
It doesn't exist in Bridged mode for (hopefully) obvious reasons. (the physical adapter is the right one, no virtual adapter required for bridge mode, that's the point)
Creating custom networks is a feature that is limited to Fusion Pro, but the NAT, Bridged and Host Only are in Fusion std. and are all created during installation by default.
Ok, got it -- I missed the ifconfig part of your first reply, was looking for the vNIC in the Mac Network prefs.
So here is my ifconfig and ifconfig for the two NICs (one physical and one the custom private I set up before).
Why does the vmnet2 NIC not have an IP address?
Do I need to do something special to enable it to get an IP address?
Just to repeat from the original question ... the VMs using vmnet2 can see each other just fine.
It's only the host that is missing from the vmnet2 private network.
vmnet2 is showing up as 10.0.1.1 on the screenshot you provided. Is that the information you are looking for?
--
Darius
Hi Darius,
If that were true I would expect to see 10.0.1.1 as the reply to the last ipconfig command in the screen shot.
But the reply is nothing -- why is that?
And the host is not part of the network.
Can't ping the VMs from the host or host from VMs.
Host can't see the http server on one of the VMs.
Weird ...
According to the manpage for ipconfig, it only works with interfaces managed by the IPConfiguration component, which as far as I can tell will match the list in System Preferences. In the case of the vmnetX interfaces, we'll directly assign the address to the interface, so I wouldn't expect ipconfig to show it. (Certainly ipconfig ifcount here does not include the vmnetX interfaces in its count.)
Your host network configuration looks absolutely fine to me. Are you running any firewall software on your host?
--
Darius
Also, try running this command on your host:
route get 10.0.1.100
It should report "interface: vmnet2" as part of its output.
Cheers,
--
Darius
Thanks for the explanation of the ifconfig output.
I had the host OS X firewall on -- yes.
But I just disabled it and the results are the same.
Can't ping the VMs or access the HTTP server from the host.
Can't ping the host from the VMs.
Darius,
I ran the route command as you suggested, the output is not as expected.
en4 is my physical NIC (ethernet via Thunderbolt to internet adapter).
dhcp-81-83:~ xxxxx$ route get 10.0.1.100
route to: 10.0.1.100
destination: default
mask: default
gateway: xxxxxxxxxxxxxxxxx.net
interface: en4
flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
dhcp-81-83:~ xxxxx$
I'd be interested to see if vmnet2 shows up in the output of:
ps ax | grep vmnet-netifup
If it doesn't appear there, try quitting Fusion and launching it again, then immediately running that same command again and see if it appears.
--
Darius
before restarting fusion:
dhcp-81-83:~ xxxxx$ ps ax | grep vmnet-netifup
449 ?? Ss 0:00.00 /Applications/VMware Fusion.app/Contents/Library/vmnet-netifup -s 7 -d /var/run/vmnet-netif-vmnet1.pid vmnet1 vmnet1
453 ?? Ss 0:00.00 /Applications/VMware Fusion.app/Contents/Library/vmnet-netifup -s 7 -d /var/run/vmnet-netif-vmnet2.pid vmnet2 vmnet2
460 ?? Ss 0:00.00 /Applications/VMware Fusion.app/Contents/Library/vmnet-netifup -s 7 -d /var/run/vmnet-netif-vmnet8.pid vmnet8 vmnet8
27236 s000 S+ 0:00.00 grep vmnet-netifup
dhcp-81-83:~ xxxxx$
after restarting fusion:
dhcp-81-83:~ xxxxx$ ps ax | grep vmnet-netifup
27535 ?? Ss 0:00.00 /Applications/VMware Fusion.app/Contents/Library/vmnet-netifup -s 7 -d /var/run/vmnet-netif-vmnet1.pid vmnet1 vmnet1
27539 ?? Ss 0:00.00 /Applications/VMware Fusion.app/Contents/Library/vmnet-netifup -s 7 -d /var/run/vmnet-netif-vmnet2.pid vmnet2 vmnet2
27546 ?? Ss 0:00.00 /Applications/VMware Fusion.app/Contents/Library/vmnet-netifup -s 7 -d /var/run/vmnet-netif-vmnet8.pid vmnet8 vmnet8
27555 s000 S+ 0:00.00 grep vmnet-netifup
dhcp-81-83:~ xxxxx$
After restarting Fusion still can't see the host from the VMs and vice versa.
Now I will restart my host and see if anything changes.
Restarted the host and still have the same issue.
Output of the route command is as before (shows interface: en4 not vmnet2)
vmnet2 does show up in the output of the ps ax command (as before).
Not sure what to try next ...
Actually the output of the route command is a little different.
destination and mask now have explicit values, before they both were "default".
xxx$ route get 10.0.1.100
route to: 10.0.1.100
destination: 10.0.1.0
mask: 255.255.255.0
interface: en4
flags: <UP,DONE,CLONING,STATIC>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 -448
xxx$
Is 10.0.1.0/255.255.255.0 the correct address/netmask for the network attached to your Thunderbolt Ethernet adapter? If so, you cannot use the same network range for vmnet2, because doing so would make it impossible for the host to determine whether packets should be routed out en4 or vmnet2.
Cheers,
--
Darius
Bingo!
Yes, where I am now that is the ethernet setup.
I changed it to a different subnet and now everything works.
Many thanks for your patience in trouble shooting this issue.
And DOH! for my forgetting about the subnet.