Quantcast
Channel: VMware Communities : Discussion List - VMware Fusion® (for Mac)
Viewing all articles
Browse latest Browse all 12061

Fusion 7 Pro: Configuring PXE/tftp boot settings in dhcp.conf with static reservations.

$
0
0

I ran into this issue, so I thought i'd do a quick writeup to maybe save someone  20 mins.

 

I'm playing with PXE booting some containers. I want VMware Fusion to handle DHCP, and I want the VM's to be Nat'ed with my Mac for outside access, thus I need to use vmnet8 by default. I also have several virtual machines that should have static reservations to mimic the production network this system will reside on.

 

How To Add the PXE Boot Configuration  in the relevant VMware Fusion dhcp.conf file.

 

So, I edit /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf

I need to add two simple lines for tftp. The problem is the subnet declaration (line 26 of the stock file) is in the forbidden "###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####" zone.  If you change stuff in the forbidden zone then restart vmware fusion, or restart its networking, it rudely replaces the whole dhcpd.conf file with an auto-generated one. It does rotate the existing one to a backup, but only one rotation (3 would be less rude, so would a prompt or a log entry).


It wasn't immediately obvious to me, but after a little trial and error, I found that the "proper" solution is to simply redeclare the whole subnet declaration below the "DO NOT MODIFY" section. So, to add the next-server and filename options for PXE booting, I had to add the following:


 

####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######
subnet 192.168.87.0 netmask 255.255.255.0 {  range 192.168.87.128 192.168.87.254;  option broadcast-address 192.168.87.255;  option domain-name-servers 192.168.87.2;  option domain-name localdomain;  default-lease-time 1800;                # default is 30 minutes  max-lease-time 7200;                    # default is 2 hours  option netbios-name-servers 192.168.87.2;  option routers 192.168.87.2;  next-server 192.168.87.20;    filename "pxelinux.0";
}
#
host cmhpxe {   hardware ethernet 00:0C:29:DF:06:7F;   fixed-address  192.168.87.20;
}
#

 

 

The fun way to reconfigure and restart DHCP without restarting fusion:

alias vm_restartdhcpd='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'

Viewing all articles
Browse latest Browse all 12061

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>