Assign static IP to VMware Player guest on host-only network

11,208

Solution 1

See https://www.vmware.com/support/ws55/doc/ws_net_advanced_ipaddress.html

Basically, you have several alternatives:

  1. Set up a static ip address in the Linux guest.

  2. If that's the only guest you use, set up the DHCP on the Host to make it hand out just one address (go into the Virtual Network Editor, Edit > Virtual Network Settings > DHCP). But this is an ugly solution.

  3. The best solution would be a bit more complicated: edit the vmnetdhcp.conf file. This file follows the syntax of dhcpd.conf, you can check online how to do it. Basically you specify your guest's MAC address, and the IP address to be reserved for it.

Solution 2

This helped me. I have two hosts and both have static Ip's. I can ping them across as well as from the host.

You have to edit the dhcpd.conf file in found in VMware installation folder. Use the following command in mac OS's,

sudo vim /Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf

Use any text editor to edit the file.

Add similar entry as below,

End of "DO NOT MODIFY SECTION"
host Windows8x64 {
    hardware ethernet MAC_ADDRESS_OF_Windows8x64_GUEST_MACHINE;
    fixed-address  192.168.167.80;
}

Make sure that these lines are added after End of "DO NOT MODIFY SECTION" line. This will make Windows8x64 guest's ip address to 192.168.167.80, edit the IP as required and should be outside the range defined in dhcpd.conf under section "DO NOT MODIFY SECTION". Note: choose your guest name instead of Windows8x64 i.e Ubuntu 14.04 in your case.

Restart VMware and start the guest, i.e Windows8x64 in my case and check the ip address, it should be same as determined in dhcpd.conf

Share:
11,208

Related videos on Youtube

Ben Dilts
Author by

Ben Dilts

Updated on September 18, 2022

Comments

  • Ben Dilts
    Ben Dilts almost 2 years

    I have a VMware guest (Ubuntu 14.04) on a Windows 7 host that has a host-only network adapter (the 192.168.59.xxx address range), and every time I reboot the machine, it gets a new IP address assigned from VMware. How do I tell VMware to give the particular VM the same address every time?

  • ganesh
    ganesh almost 8 years
    Can you addsome relevant content to the answer. Assume that the link rots.