4

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?

2 Answers 2

5

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.

1
  • While editing vmnetdhcp.conf file, which IP addresses can I use as static address? Apr 25, 2023 at 5:57
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

1
  • 1
    Can you addsome relevant content to the answer. Assume that the link rots.
    – Hennes
    Jul 20, 2016 at 7:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .