VMWare Network Interface configuration on MacOS

If you would like to use static IP addresses for you Virtual Machines and you might already have one of them, you might run in trouble connecting to them on a different Host System. Assume your VM's on external HD and you connect them to a different Host System.

I don't know how VMWare choose the IP addresses to be used for the network interface but I noticed it is always a different IP address after installation or on different Host system.

Network Interface configuration after installation of VMWare;

vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 192.168.98.1 netmask 0xffffff00 broadcast 192.168.98.255
    ether 00:50:56:c0:00:01
vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 172.16.73.1 netmask 0xffffff00 broadcast 172.16.73.255
    ether 00:50:56:c0:00:08

Because I choose 192.168.250.0 network for all of my VM's I'm unable to connect to them out of the box installing VMWare. In this Blog I'll describe how to change the Host Network Interface configuration for VMWare.


Stop the VMWare network interfaces:

/Library/Application Support/VMware Fusion

./boot.sh --stop
VMware Fusion 215242: Shutting down VMware Fusion:
Stopped DHCP service on vmnet1
Disabled hostonly virtual adapter on vmnet1
Stopped DHCP service on vmnet8
Stopped NAT service on vmnet8
Disabled hostonly virtual adapter on vmnet8
Stopped all configured services on all networks

Now you need to edit the locations, networking file and the dhcp.conf, nat.conf below the interface subdirectory. I use the vmnet8 interface for my setup

grep -i vnet_8 locations
remove_answer VNET_8_HOSTONLY_HOSTADDR
remove_answer VNET_8_HOSTONLY_NETMASK
answer VNET_8_HOSTONLY_HOSTADDR 192.168.250.1
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
remove_answer VNET_8_NAT
answer VNET_8_NAT yes
remove_answer VNET_8_DHCP
answer VNET_8_DHCP yes

grep -i vnet_8 networking
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH 2A9C9A6C4638668427E2D91C857EDE91F35FFFC1
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 192.168.250.0
answer VNET_8_NAT yes
answer VNET_8_VIRTUAL_ADAPTER yes

/Library/Application Support/VMware Fusion/vmnet8

dhcp.conf

allow unknown-clients;
default-lease-time 1800;                # default is 30 minutes
max-lease-time 7200;                    # default is 2 hours

subnet 192.168.250.0 netmask 255.255.255.0 {
    range 192.168.250.128 192.168.250.254;
    option broadcast-address 192.168.250.255;
    option domain-name-servers 192.168.250.2;
    option domain-name localdomain;
    default-lease-time 1800;                # default is 30 minutes
    max-lease-time 7200;                    # default is 2 hours
    option routers 192.168.250.2;
}
host vmnet8 {
    hardware ethernet 00:50:56:C0:00:08;
    fixed-address 192.168.250.1;
    option domain-name-servers 0.0.0.0;
    option domain-name "";
    option routers 0.0.0.0;
}

nat.conf

# NAT gateway address
ip = 192.168.250.2
netmask = 255.255.255.0
# VMnet device if not specified on command line
device = /dev/vmnet8

Start the VMWare service  and the interface now should have the configuration.

./boot.sh --start
VMware Fusion 215242: Starting VMware Fusion:
Verifying files from package 'com.vmware.fusion.application' on '/'.
Finished verifying files from package 'com.vmware.fusion.application' on '/'.
Started network services
Verifying and re-installing files from /Library/Application Support/VMware Fusion/thnuclnt

Network Interface configuration for vmnet8 now looks to be perfect:

vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 192.168.250.1 netmask 0xffffff00 broadcast 192.168.250.255
    ether 00:50:56:c0:00:08

And is it now working? Yes it is....

ping 192.168.250.27
PING 192.168.250.27 (192.168.250.27): 56 data bytes
64 bytes from 192.168.250.27: icmp_seq=0 ttl=255 time=1.021 ms
64 bytes from 192.168.250.27: icmp_seq=1 ttl=255 time=0.357 ms
64 bytes from 192.168.250.27: icmp_seq=2 ttl=255 time=0.409 ms
64 bytes from 192.168.250.27: icmp_seq=3 ttl=255 time=0.411 ms
64 bytes from 192.168.250.27: icmp_seq=4 ttl=255 time=0.364 ms
64 bytes from 192.168.250.27: icmp_seq=5 ttl=255 time=0.402 ms
64 bytes from 192.168.250.27: icmp_seq=6 ttl=255 time=0.390 ms
64 bytes from 192.168.250.27: icmp_seq=7 ttl=255 time=0.395 ms
64 bytes from 192.168.250.27: icmp_seq=8 ttl=255 time=0.300 ms
64 bytes from 192.168.250.27: icmp_seq=9 ttl=255 time=0.521 ms
64 bytes from 192.168.250.27: icmp_seq=10 ttl=255 time=0.367 ms
64 bytes from 192.168.250.27: icmp_seq=11 ttl=255 time=0.474 ms
64 bytes from 192.168.250.27: icmp_seq=12 ttl=255 time=0.464 ms
64 bytes from 192.168.250.27: icmp_seq=13 ttl=255 time=0.473 ms
\^C
--- 192.168.250.27 ping statistics ---
14 packets transmitted, 14 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.300/0.453/1.021/0.167 ms



Comments:

GREAT!
I didn't know I had to edit the networking.conf file as well.

Thank you!

Posted by Navroz on March 21, 2010 at 02:26 PM CET #

thanks man! ... just upgraded to Fusion 3 and didn't realize there's a new networking file

Posted by dave on May 28, 2010 at 04:17 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Andreas Breuer - TSC Engineer - writes about his life in support.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today