0

Ubuntu 20-04 Guest OS

My Host is Windows 10 Using VMWare Workstation Tech preview 20H1

I'd like to ensure that ip address X is static, i.e always the same for a particular VM client X eg my Ubuntu 2004 Client is known as node1

I believe this is known as DHCP Reservation (https://lifehacker.com/how-to-set-up-dhcp-reservations-and-never-check-an-ip-58226050)

VMWare has a Virtual Network Editor

My VMWare Nat Network is known as VMNet8

On my Windows host I have updated c:\program data\vmware\vmnetdhcp.conf

added the 2nd VMNet8 Add

host VMnet8 {
    hardware ethernet 00:50:56:C0:00:08;
    fixed-address 192.168.64.1;
    option domain-name-servers 0.0.0.0;
    option domain-name "";
    option routers 0.0.0.0;
}

#this next section added by me
host VMnet8 {
    hardware ethernet 00:0C:29:6C:6F:C1;
    fixed-address 194.168.64.21;
}

# End

Q1 Am I trying to reserve an IP address within the DHCP range 124 .. 254 or am I reserving at a starting address before this 192.168.64.3 ... 127 ? -i.e. what should go in the \vmnetdhcp.conf fixed-address

I have tried both options and restarted these services without success enter image description here

Q2 What does the network setting look like on the client Is is DHCP or Manual ?

enter image description here

  • 20.04 is not released yet. For stability, please use 18.04 instead of a beta distro. – K7AAY Apr 13 at 18:34
  • 1
    All you should need to do is assign a static IP to the VM. You really don't need to make a DHCP reservation if you've only got on VM running on your subnet. By defautl, if you look at the VMware NAT setings, the DCHP scope is usually only the last half of the subnet, so just use a lower IP that's outside of the DHCP scope to remove any potential of a IP conflict. – essjae Apr 13 at 19:20
  • Thanks Essjae I followed your suggestion and set up 192.168.64.21 as a static ip address I still had a problem where I could not ping my host IP address or the internet but sudo dhclient did the trick. – JohnC Apr 13 at 21:05
0

See my other post for a better solution using Automatic (DHCP)

Following Essjae's suggestion I used static IP addresses in the 1st half of the subnet. These are never used by dhcp.

I removed the entry from c:\program data\vmware\vmnetdhcp.conf

Updated the /etc/hosts file on other machines so I could ping by name

node1  192.168.64.21

Using the guest machine I was still unable to ping anything outside the 192.168.64 network (eg host machine or google.com)

sudo dhclient (on the guest machine) fixed this problem.

enter image description here

| improve this answer | |
0

Better solution with DHCP and reserved IP addresses

The static IP address above continued to have issues after a few hours I could no longer ping google.com etc. The command sudo dhclient would fix the issue but then "ip a" would often show 2 IP addresses.

A better fix was to use automatic IP addresses but reserve them. e.g. for machine/hostname node11

Getting the MAC address.

sudo lshw -C network --serial

shows the MAC address Also in VMWAre Network adaptor, advanced.

The hardware ethernet (mac address) is linked to your chosen IP address in the range 128..254 If you have other VMs switched on then take care to check what IP addresses are already in use on this VMNetwork (192.168,64.x).

Update c:\program data\vmware\vmnetdhcp.conf

host node11 { 
hardware ethernet 00:0C:29:64:2B:A8; 
fixed-address 192.168.64.131;
 } 

(node11 is the name of the computer/hostname.)

restart the Windows service VMware DHCP Service. If it fails to restart check the file for syntax errors (a generic error will also show in the Windows System log "Configuration file errors encountered -- exiting")

On your client machine set the networking to Automatic

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.