0

I tried to get my DHCP server on vmnet2 to include an option for a particular host, so I added this configuration below the "DO NOT MODIFY SECTION" block in the relevant config file (/Library/Preferences/VMware\ Fusion/vmnet2/dhcpd.conf):

host 10.255.255.11 {
  fixed-address 10.255.255.11;
  hardware ethernet 00:0c:29:4e:19:65;
  option tftp-server-name "https://example.com";
  option bootfile-name "config.yml";
}

I tried restarting VMware Fusion, my entire computer, and also tried the instructions at https://kb.vmware.com/s/article/1026510:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --configure
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start

It didn't work after any of these steps. If I add that block to my own DHCP server on FreeBSD and connect my client to it, it works. I suspect the issue is that VMware Fusion appears to be running isc-dhcp on version ~2.0 based on the header of the config file:

# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet2.

I cannot seem to query the version on the dhcpd binary that ships with VMware Fusion:

gns@gns-mbp:~ :) $ /Applications/VMware\ Fusion.app/Contents/Library/vmnet-dhcpd --help
Internet Software Consortium DHCP Server
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

Usage: vmnet-dhcpd [-p <UDP port #>] [-d] [-f] [-cf config-file]
       [-s pipe descriptor for service to send 
           a two byte startup status code]
       [-lf lease-file] [-pf pidfile] [if0 [...ifN]]
exiting.
gns@gns-mbp:~ :( 1 $

Does anyone know how to include DHCP options in VMware Fusion?

0

I had the same problem and this is what works for me on Fusion 10+. Fusion is pretty finicky and the docs are obscure, so it took a bit of trial and error to figure this out.

On the VM:

  1. Find the exact spelling and capitalization of the hostname. You can run hostname'to find it.
  2. find the mac address by using ifconfig <interface> or ip link show <interface> and copy the "ether" value.
  3. Shutdown the VMs

Editing

For this example,we will use web01 as the hostname and 00:0c:89:9a:99:d3 for the MAC

  1. Shutdown Fusion
  2. backup your dhcp config file for the interface.
  3. Edit the dhcp config file for the interface you want sudo vi /Library/Preferences/VMware\ Fusion/vmnet2/dhcpd.conf
  4. Find the range line. You need to pick an address outside of this range. For this example we are using
    range 192.168.128.128 192.168.128.254
  5. Below the line with text
    '####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######'
    add the static config for the host using the hostname web01, mac 00:0c:89:9a:99:d3 and IP 192.168.128.101.
    host web01 {
    hardware ethernet 00:0c:89:9a:99:d3;
    fixed-address 192.168.128.101;
    }

Note the semicolons ";" on the ethernet and address lines. These are critical.

  1. If you want to add another host to the table, it goes right below the closing brace. Do not add a semicolon to the closing brace of the first entry.
    host web01 {
    hardware ethernet 00:0c:89:9a:99:d3;
    fixed-address 192.168.128.101;
    }
    host web02 {
    hardware ethernet 00:0c:37:55:a4:97;
    fixed-address 192.168.128.102;
    }
  1. Save the config file
  2. Start Fusion

When you start your VMs, they should pick up the assigned address

Gotchas:

  • Missing semicolons ";" on the ethernet and address lines
  • Not having the exact hostname, including capitalization
  • Putting a semicolon ";" after the closing brace "}"
  • Putting a return after the closing brace of the last entry
  • The dhcp file needs to be owned by root, the group is wheel and permissions set for 644
1
  • It looks like Fusion v12 does not require the hostname to be exact live I found in V10. I do not have v11, so I cannot check to see if it does or does not require the exact hostname – Kevin May 5 at 13:45

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.