Thursday, April 14, 2011

Change Network Settings In VMWare Fusion

If you want to change the Subnets used by VMWare Fusion, there seems to be no way in the GUI. So you have to do it form the command-line. Here's how I changed the subnet used by my VMWare Fusion on my MacBook.

  1. Open Terminal, or X11 to access the Mac OS command-line and enter the following commands:
    cd /Library/Application\ Support/VMware\ Fusion/
    sudo ./vmnet-cli --stop

    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
    sudo cp -p locations locations.old
  2. Edit the locations file with your favorite editor:
    sudo vi locations
  3. Change the subnet highlighted in yellow to whatever subnet you need to use.
    remove_answer VNET_8_HOSTONLY_HOSTADDR
    remove_answer VNET_8_HOSTONLY_NETMASK
    answer VNET_8_HOSTONLY_HOSTADDR 192.168.246.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
  4. Save the locations file with your updates.
  5. Use vmnet-cli to re-configure and re-start the network.
    sudo ./vmnet-cli --configure
    Stopped all configured services on all networks
    Restored network settings
    sudo ./vmnet-cli --start
    Started DHCP service on vmnet1
    Enabled hostonly virtual adapter on vmnet1
    Started DHCP service on vmnet8
    Started NAT service on vmnet8
    Enabled hostonly virtual adapter on vmnet8
    Started all configured services on all networks
  6. And your subnet should be updated!

No comments:

Post a Comment

Please be respectful of others when commenting.