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

Comment Guidelines: In your first comment, please explain if you agree or disagree with statements made in the post. Please also be respectful of others at all times. Pretend like this is a competition to see who can be the most mature and the most intelligent. And remember, you have the right to remain silent. Anything you post here can and will be used against you. I will not delete your posts just because you are embarrassed that your comments make you look like an idiot. Others may or may not treat you with the same respect you have treated them. And finally, thanks for reading and thanks for your comments!