VMware Communities
napp1ng
Contributor
Contributor

[Advanced] Altering dhcpd.conf before its generated on runtime

Hi

I have a setup that requires me to add a few lines to the /Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf file in order to work properly. Unfortunately, dhcpd.conf isn't generated until vmware is run, meaning that I have to actually run the program and then run a script to make this change.

I'd ideally like for this to happen right after installation but before runtime - I'm curious what files/commands generate dhcpd.conf, and whether I can alter or run any of those files/commands post-install to make this change. I'm looking at the commands located in /Applications/VMware\ Fusion.app/Contents/Library - some, like vmnet-cli or vmnet-cfgcli will control or alter dhcpd.conf to some extent, so I'm wondering if I can run these manually with the changes I want or change them such that they'll generate dhcpd.conf with the proper configuration on runtime.

Any help would be greatly appreciated, thanks!

0 Kudos
2 Replies
napp1ng
Contributor
Contributor

Alternatively, if it's possible to run the configuration immediately post-install without actually executing the program (whichever command that is) would work too.

0 Kudos
nancyz
VMware Employee
VMware Employee

napp1ng wrote:

I'm looking at the commands located in /Applications/VMware\ Fusion.app/Contents/Library - some, like vmnet-cli or vmnet-cfgcli will control or alter dhcpd.conf to some extent, so I'm wondering if I can run these manually with the changes I want or change them such that they'll generate dhcpd.conf with the proper configuration on runtime.

Welcome to thenforum.

Yes, there is a script called services.sh could generate the dhcp.conf without launching Fusion UI. It locates in /Applications/VMware Fusion.app/Contents/Library/services. You could using it by

'sudo ./services.sh --start' to generate the dhcp.conf both for host-only and NAT network. 

0 Kudos